| 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 30 matching lines...) Expand all Loading... |
| 41 */ | 41 */ |
| 42 virtual SkString ensureFSCoords2D(const GrGLProcessor::TransformedCoordsArra
y& coords, | 42 virtual SkString ensureFSCoords2D(const GrGLProcessor::TransformedCoordsArra
y& coords, |
| 43 int index) = 0; | 43 int index) = 0; |
| 44 | 44 |
| 45 | 45 |
| 46 /** Returns a variable name that represents the position of the fragment in
the FS. The position | 46 /** Returns a variable name that represents the position of the fragment in
the FS. The position |
| 47 is in device space (e.g. 0,0 is the top left and pixel centers are at ha
lf-integers). */ | 47 is in device space (e.g. 0,0 is the top left and pixel centers are at ha
lf-integers). */ |
| 48 virtual const char* fragmentPosition() = 0; | 48 virtual const char* fragmentPosition() = 0; |
| 49 | 49 |
| 50 private: | 50 private: |
| 51 friend class GrGLNormalPathProcessor; |
| 52 |
| 51 typedef GrGLShaderBuilder INHERITED; | 53 typedef GrGLShaderBuilder INHERITED; |
| 52 }; | 54 }; |
| 53 | 55 |
| 54 /* | 56 /* |
| 55 * Fragment processor's, in addition to all of the above, may need to use dst co
lor so they use | 57 * Fragment processor's, in addition to all of the above, may need to use dst co
lor so they use |
| 56 * this builder to create their shader. Because this is the only shader builder
the FP sees, we | 58 * this builder to create their shader. Because this is the only shader builder
the FP sees, we |
| 57 * just call it FPShaderBuilder | 59 * just call it FPShaderBuilder |
| 58 */ | 60 */ |
| 59 class GrGLFPFragmentBuilder : public GrGLGPFragmentBuilder { | 61 class GrGLFPFragmentBuilder : public GrGLGPFragmentBuilder { |
| 60 public: | 62 public: |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 bool fHasSecondaryOutput; | 148 bool fHasSecondaryOutput; |
| 147 bool fSetupFragPosition; | 149 bool fSetupFragPosition; |
| 148 bool fTopLeftFragPosRead; | 150 bool fTopLeftFragPosRead; |
| 149 int fCustomColorOutputIndex; | 151 int fCustomColorOutputIndex; |
| 150 | 152 |
| 151 // some state to verify shaders and effects are consistent, this is reset be
tween effects by | 153 // some state to verify shaders and effects are consistent, this is reset be
tween effects by |
| 152 // the program creator | 154 // the program creator |
| 153 bool fHasReadDstColor; | 155 bool fHasReadDstColor; |
| 154 bool fHasReadFragmentPosition; | 156 bool fHasReadFragmentPosition; |
| 155 | 157 |
| 156 friend class GrGLNvprProgramBuilder; | |
| 157 friend class GrGLProgramBuilder; | 158 friend class GrGLProgramBuilder; |
| 158 | 159 |
| 159 typedef GrGLFPFragmentBuilder INHERITED; | 160 typedef GrGLFPFragmentBuilder INHERITED; |
| 160 }; | 161 }; |
| 161 | 162 |
| 162 #endif | 163 #endif |
| OLD | NEW |