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; | 51 friend class GrGLPathProcessor; |
52 | 52 |
53 typedef GrGLShaderBuilder INHERITED; | 53 typedef GrGLShaderBuilder INHERITED; |
54 }; | 54 }; |
55 | 55 |
56 /* | 56 /* |
57 * 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 |
58 * 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 |
59 * just call it FPShaderBuilder | 59 * just call it FPShaderBuilder |
60 */ | 60 */ |
61 class GrGLFPFragmentBuilder : public GrGLGPFragmentBuilder { | 61 class GrGLFPFragmentBuilder : public GrGLGPFragmentBuilder { |
(...skipping 91 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 |