Line data Source code
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 0 : class GrGLVaryingHandler : public GrGLSLVaryingHandler {
16 : public:
17 0 : GrGLVaryingHandler(GrGLSLProgramBuilder* program)
18 0 : : INHERITED(program),
19 0 : 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, GrGLSLVertToFrag*,
24 : GrSLPrecision fsPrecision = kDefault_GrSLPrecision);
25 :
26 : private:
27 : void onFinalize() override;
28 :
29 : GrGLProgramDataManager::VaryingInfoArray fPathProcVaryingInfos;
30 :
31 : friend class GrGLProgramBuilder;
32 :
33 : typedef GrGLSLVaryingHandler INHERITED;
34 : };
35 :
36 : #endif
|