1 | /* |
---|---|
2 | * Copyright 2015 Google Inc. |
3 | * |
4 | * Use of this source code is governed by a BSD-style license that can be |
5 | * found in the LICENSE file. |
6 | */ |
7 | |
8 | #ifndef GrGLVaryingHandler_DEFINED |
9 | #define GrGLVaryingHandler_DEFINED |
10 | |
11 | #include "include/private/GrTypesPriv.h" |
12 | #include "src/gpu/gl/GrGLProgramDataManager.h" |
13 | #include "src/gpu/glsl/GrGLSLVarying.h" |
14 | |
15 | class GrGLVaryingHandler : public GrGLSLVaryingHandler { |
16 | public: |
17 | GrGLVaryingHandler(GrGLSLProgramBuilder* program) |
18 | : INHERITED(program), |
19 | fPathProcVaryingInfos(kVaryingsPerBlock) {} |
20 | |
21 | // This function is used by the NVPR PathProcessor to add a varying directly into the fragment |
22 | // shader since there is no vertex shader. |
23 | VaryingHandle addPathProcessingVarying(const char* name, GrGLSLVarying*); |
24 | |
25 | private: |
26 | void onFinalize() override; |
27 | |
28 | GrGLProgramDataManager::VaryingInfoArray fPathProcVaryingInfos; |
29 | |
30 | friend class GrGLProgramBuilder; |
31 | |
32 | typedef GrGLSLVaryingHandler INHERITED; |
33 | }; |
34 | |
35 | #endif |
36 |