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

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

Issue 674543004: OptState owns program descriptor (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: cleaup Created 6 years, 1 month 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/GrGpuGL_program.cpp ('k') | src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp » ('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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 /** Returns a key for adding code to read the copy-of-dst color in service of effects that 77 /** Returns a key for adding code to read the copy-of-dst color in service of effects that
78 require reading the dst. It must not return 0 because 0 indicates that t here is no dst 78 require reading the dst. It must not return 0 because 0 indicates that t here is no dst
79 copy read at all (in which case this function should not be called). */ 79 copy read at all (in which case this function should not be called). */
80 static DstReadKey KeyForDstRead(const GrTexture* dstCopy, const GrGLCaps&); 80 static DstReadKey KeyForDstRead(const GrTexture* dstCopy, const GrGLCaps&);
81 81
82 /** Returns a key for reading the fragment location. This should only be cal led if there is an 82 /** Returns a key for reading the fragment location. This should only be cal led if there is an
83 effect that will requires the fragment position. If the fragment position is not required, 83 effect that will requires the fragment position. If the fragment position is not required,
84 the key is 0. */ 84 the key is 0. */
85 static FragPosKey KeyForFragmentPosition(const GrRenderTarget* dst, const Gr GLCaps&); 85 static FragPosKey KeyForFragmentPosition(const GrRenderTarget* dst, const Gr GLCaps&);
86 86
87 GrGLFragmentShaderBuilder(GrGLProgramBuilder* program, const GrGLProgramDesc & desc); 87 GrGLFragmentShaderBuilder(GrGLProgramBuilder* program, uint8_t fragPosKey);
88 88
89 // true public interface, defined explicitly in the abstract interfaces abov e 89 // true public interface, defined explicitly in the abstract interfaces abov e
90 virtual bool enableFeature(GLSLFeature) SK_OVERRIDE; 90 virtual bool enableFeature(GLSLFeature) SK_OVERRIDE;
91 virtual SkString ensureFSCoords2D(const GrGLProcessor::TransformedCoordsArra y& coords, 91 virtual SkString ensureFSCoords2D(const GrGLProcessor::TransformedCoordsArra y& coords,
92 int index) SK_OVERRIDE; 92 int index) SK_OVERRIDE;
93 virtual const char* fragmentPosition() SK_OVERRIDE; 93 virtual const char* fragmentPosition() SK_OVERRIDE;
94 virtual const char* dstColor() SK_OVERRIDE; 94 virtual const char* dstColor() SK_OVERRIDE;
95 95
96 private: 96 private:
97 // Private public interface, used by GrGLProgramBuilder to build a fragment shader 97 // Private public interface, used by GrGLProgramBuilder to build a fragment shader
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 bool fHasReadDstColor; 155 bool fHasReadDstColor;
156 bool fHasReadFragmentPosition; 156 bool fHasReadFragmentPosition;
157 157
158 friend class GrGLNvprProgramBuilder; 158 friend class GrGLNvprProgramBuilder;
159 friend class GrGLProgramBuilder; 159 friend class GrGLProgramBuilder;
160 160
161 typedef GrGLFPFragmentBuilder INHERITED; 161 typedef GrGLFPFragmentBuilder INHERITED;
162 }; 162 };
163 163
164 #endif 164 #endif
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGpuGL_program.cpp ('k') | src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698