Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(36)

Side by Side Diff: src/gpu/gl/builders/GrGLFragmentShaderBuilder.h

Issue 822423004: Move most of the transform logic into the primitive processors (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: cleanup Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/gpu/gl/GrGLProgramDesc.cpp ('k') | src/gpu/gl/builders/GrGLLegacyNvprProgramBuilder.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLProgramDesc.cpp ('k') | src/gpu/gl/builders/GrGLLegacyNvprProgramBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698