egdaniel | 0eafe79 | 2015-11-20 14:01:22 -0800 | [diff] [blame] | 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 "glsl/GrGLSLVarying.h" |
| 12 | #include "GrTypesPriv.h" |
| 13 | #include "gl/GrGLProgramDataManager.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. |
Chris Dalton | 2737288 | 2017-12-08 13:34:21 -0700 | [diff] [blame] | 23 | VaryingHandle addPathProcessingVarying(const char* name, GrGLSLVarying*); |
egdaniel | 0eafe79 | 2015-11-20 14:01:22 -0800 | [diff] [blame] | 24 | |
| 25 | private: |
cdalton | c08f196 | 2016-02-12 12:14:06 -0800 | [diff] [blame] | 26 | void onFinalize() override; |
egdaniel | b80ec8b | 2016-02-09 09:54:43 -0800 | [diff] [blame] | 27 | |
cdalton | c08f196 | 2016-02-12 12:14:06 -0800 | [diff] [blame] | 28 | GrGLProgramDataManager::VaryingInfoArray fPathProcVaryingInfos; |
egdaniel | 0eafe79 | 2015-11-20 14:01:22 -0800 | [diff] [blame] | 29 | |
| 30 | friend class GrGLProgramBuilder; |
| 31 | |
halcanary | 9d524f2 | 2016-03-29 09:03:52 -0700 | [diff] [blame] | 32 | typedef GrGLSLVaryingHandler INHERITED; |
egdaniel | 0eafe79 | 2015-11-20 14:01:22 -0800 | [diff] [blame] | 33 | }; |
| 34 | |
| 35 | #endif |