| 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 | 105 |
| 106 /* | 106 /* |
| 107 * Fragment processor's, in addition to all of the above, may need to use dst co
lor so they use | 107 * Fragment processor's, in addition to all of the above, may need to use dst co
lor so they use |
| 108 * this builder to create their shader. Because this is the only shader builder
the FP sees, we | 108 * this builder to create their shader. Because this is the only shader builder
the FP sees, we |
| 109 * just call it FPShaderBuilder | 109 * just call it FPShaderBuilder |
| 110 */ | 110 */ |
| 111 class GrGLXPFragmentBuilder : public GrGLFragmentBuilder { | 111 class GrGLXPFragmentBuilder : public GrGLFragmentBuilder { |
| 112 public: | 112 public: |
| 113 GrGLXPFragmentBuilder(GrGLProgramBuilder* program) : INHERITED(program) {} | 113 GrGLXPFragmentBuilder(GrGLProgramBuilder* program) : INHERITED(program) {} |
| 114 | 114 |
| 115 /** Returns the variable name that holds the color of the destination pixel.
This may be NULL if | 115 /** Returns the variable name that holds the color of the destination pixel.
This may be nullptr if |
| 116 no effect advertised that it will read the destination. */ | 116 no effect advertised that it will read the destination. */ |
| 117 virtual const char* dstColor() = 0; | 117 virtual const char* dstColor() = 0; |
| 118 | 118 |
| 119 /** Adds any necessary layout qualifiers in order to legalize the supplied b
lend equation with | 119 /** Adds any necessary layout qualifiers in order to legalize the supplied b
lend equation with |
| 120 this shader. It is only legal to call this method with an advanced blend
equation, and only | 120 this shader. It is only legal to call this method with an advanced blend
equation, and only |
| 121 if these equations are supported. */ | 121 if these equations are supported. */ |
| 122 virtual void enableAdvancedBlendEquationIfNeeded(GrBlendEquation) = 0; | 122 virtual void enableAdvancedBlendEquationIfNeeded(GrBlendEquation) = 0; |
| 123 | 123 |
| 124 private: | 124 private: |
| 125 typedef GrGLFragmentBuilder INHERITED; | 125 typedef GrGLFragmentBuilder INHERITED; |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 // the program creator | 212 // the program creator |
| 213 bool fHasReadDstColor; | 213 bool fHasReadDstColor; |
| 214 bool fHasReadFragmentPosition; | 214 bool fHasReadFragmentPosition; |
| 215 | 215 |
| 216 friend class GrGLProgramBuilder; | 216 friend class GrGLProgramBuilder; |
| 217 | 217 |
| 218 typedef GrGLXPFragmentBuilder INHERITED; | 218 typedef GrGLXPFragmentBuilder INHERITED; |
| 219 }; | 219 }; |
| 220 | 220 |
| 221 #endif | 221 #endif |
| OLD | NEW |