OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef GrGLFragmentShaderBuilder_DEFINED | 8 #ifndef GrGLFragmentShaderBuilder_DEFINED |
9 #define GrGLFragmentShaderBuilder_DEFINED | 9 #define GrGLFragmentShaderBuilder_DEFINED |
10 | 10 |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 static DstReadKey KeyForDstRead(const GrTexture* dstCopy, const GrGLCaps&); | 82 static DstReadKey KeyForDstRead(const GrTexture* dstCopy, const GrGLCaps&); |
83 | 83 |
84 /** Returns a key for reading the fragment location. This should only be cal
led if there is an | 84 /** Returns a key for reading the fragment location. This should only be cal
led if there is an |
85 effect that will requires the fragment position. If the fragment position
is not required, | 85 effect that will requires the fragment position. If the fragment position
is not required, |
86 the key is 0. */ | 86 the key is 0. */ |
87 static FragPosKey KeyForFragmentPosition(const GrRenderTarget* dst, const Gr
GLCaps&); | 87 static FragPosKey KeyForFragmentPosition(const GrRenderTarget* dst, const Gr
GLCaps&); |
88 | 88 |
89 GrGLFragmentShaderBuilder(GrGLProgramBuilder* program, uint8_t fragPosKey); | 89 GrGLFragmentShaderBuilder(GrGLProgramBuilder* program, uint8_t fragPosKey); |
90 | 90 |
91 // true public interface, defined explicitly in the abstract interfaces abov
e | 91 // true public interface, defined explicitly in the abstract interfaces abov
e |
92 bool enableFeature(GLSLFeature) SK_OVERRIDE; | 92 bool enableFeature(GLSLFeature) override; |
93 virtual SkString ensureFSCoords2D(const GrGLProcessor::TransformedCoordsArra
y& coords, | 93 virtual SkString ensureFSCoords2D(const GrGLProcessor::TransformedCoordsArra
y& coords, |
94 int index) SK_OVERRIDE; | 94 int index) override; |
95 const char* fragmentPosition() SK_OVERRIDE; | 95 const char* fragmentPosition() override; |
96 const char* dstColor() SK_OVERRIDE; | 96 const char* dstColor() override; |
97 | 97 |
98 private: | 98 private: |
99 // Private public interface, used by GrGLProgramBuilder to build a fragment
shader | 99 // Private public interface, used by GrGLProgramBuilder to build a fragment
shader |
100 void enableCustomOutput(); | 100 void enableCustomOutput(); |
101 void enableSecondaryOutput(); | 101 void enableSecondaryOutput(); |
102 const char* getPrimaryColorOutputName() const; | 102 const char* getPrimaryColorOutputName() const; |
103 const char* getSecondaryColorOutputName() const; | 103 const char* getSecondaryColorOutputName() const; |
104 bool compileAndAttachShaders(GrGLuint programId, SkTDArray<GrGLuint>* shader
Ids); | 104 bool compileAndAttachShaders(GrGLuint programId, SkTDArray<GrGLuint>* shader
Ids); |
105 void bindFragmentShaderLocations(GrGLuint programID); | 105 void bindFragmentShaderLocations(GrGLuint programID); |
106 | 106 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 // the program creator | 153 // the program creator |
154 bool fHasReadDstColor; | 154 bool fHasReadDstColor; |
155 bool fHasReadFragmentPosition; | 155 bool fHasReadFragmentPosition; |
156 | 156 |
157 friend class GrGLProgramBuilder; | 157 friend class GrGLProgramBuilder; |
158 | 158 |
159 typedef GrGLFPFragmentBuilder INHERITED; | 159 typedef GrGLFPFragmentBuilder INHERITED; |
160 }; | 160 }; |
161 | 161 |
162 #endif | 162 #endif |
OLD | NEW |