| 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 GrGLSLFragmentShaderBuilder_DEFINED | 8 #ifndef GrGLSLFragmentShaderBuilder_DEFINED |
| 9 #define GrGLSLFragmentShaderBuilder_DEFINED | 9 #define GrGLSLFragmentShaderBuilder_DEFINED |
| 10 | 10 |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 | 139 |
| 140 void enableAdvancedBlendEquationIfNeeded(GrBlendEquation) override; | 140 void enableAdvancedBlendEquationIfNeeded(GrBlendEquation) override; |
| 141 | 141 |
| 142 private: | 142 private: |
| 143 // Private public interface, used by GrGLProgramBuilder to build a fragment
shader | 143 // Private public interface, used by GrGLProgramBuilder to build a fragment
shader |
| 144 void enableCustomOutput(); | 144 void enableCustomOutput(); |
| 145 void enableSecondaryOutput(); | 145 void enableSecondaryOutput(); |
| 146 const char* getPrimaryColorOutputName() const; | 146 const char* getPrimaryColorOutputName() const; |
| 147 const char* getSecondaryColorOutputName() const; | 147 const char* getSecondaryColorOutputName() const; |
| 148 | 148 |
| 149 // As GLProcessors emit code, there are some conditions we need to verify.
We use the below | 149 // As GLSLProcessors emit code, there are some conditions we need to verify.
We use the below |
| 150 // state to track this. The reset call is called per processor emitted. | 150 // state to track this. The reset call is called per processor emitted. |
| 151 bool hasReadDstColor() const { return fHasReadDstColor; } | 151 bool hasReadDstColor() const { return fHasReadDstColor; } |
| 152 bool hasReadFragmentPosition() const { return fHasReadFragmentPosition; } | 152 bool hasReadFragmentPosition() const { return fHasReadFragmentPosition; } |
| 153 void reset() { | 153 void reset() { |
| 154 fHasReadDstColor = false; | 154 fHasReadDstColor = false; |
| 155 fHasReadFragmentPosition = false; | 155 fHasReadFragmentPosition = false; |
| 156 } | 156 } |
| 157 | 157 |
| 158 static const char* DeclaredColorOutputName() { return "fsColorOut"; } | 158 static const char* DeclaredColorOutputName() { return "fsColorOut"; } |
| 159 static const char* DeclaredSecondaryColorOutputName() { return "fsSecondaryC
olorOut"; } | 159 static const char* DeclaredSecondaryColorOutputName() { return "fsSecondaryC
olorOut"; } |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 // the program creator | 192 // the program creator |
| 193 bool fHasReadDstColor; | 193 bool fHasReadDstColor; |
| 194 bool fHasReadFragmentPosition; | 194 bool fHasReadFragmentPosition; |
| 195 | 195 |
| 196 friend class GrGLProgramBuilder; | 196 friend class GrGLProgramBuilder; |
| 197 | 197 |
| 198 typedef GrGLSLXPFragmentBuilder INHERITED; | 198 typedef GrGLSLXPFragmentBuilder INHERITED; |
| 199 }; | 199 }; |
| 200 | 200 |
| 201 #endif | 201 #endif |
| OLD | NEW |