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

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

Issue 764643004: Create xfer processor backend. (Closed) Base URL: https://skia.googlesource.com/skia.git@xferBlendSolo
Patch Set: Blend off ODS and only on XP Created 6 years 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
98 void emitCodeToReadDstTexture(); 98 void emitCodeToReadDstTexture();
99 void enableCustomOutput(); 99 void enableCustomOutput();
100 void enableSecondaryOutput(); 100 void enableSecondaryOutput();
101 const char* getPrimaryColorOutputName() const; 101 const char* getPrimaryColorOutputName() const;
102 const char* getSecondaryColorOutputName() const; 102 const char* getSecondaryColorOutputName() const;
103 void enableSecondaryOutput(const GrGLSLExpr4& inputColor, const GrGLSLExpr4& inputCoverage);
104 void combineColorAndCoverage(const GrGLSLExpr4& inputColor, const GrGLSLExpr 4& inputCoverage);
105 bool compileAndAttachShaders(GrGLuint programId, SkTDArray<GrGLuint>* shader Ids) const; 103 bool compileAndAttachShaders(GrGLuint programId, SkTDArray<GrGLuint>* shader Ids) const;
106 void bindFragmentShaderLocations(GrGLuint programID); 104 void bindFragmentShaderLocations(GrGLuint programID);
107 105
108 // As GLProcessors emit code, there are some conditions we need to verify. We use the below 106 // As GLProcessors emit code, there are some conditions we need to verify. We use the below
109 // state to track this. The reset call is called per processor emitted. 107 // state to track this. The reset call is called per processor emitted.
110 bool hasReadDstColor() const { return fHasReadDstColor; } 108 bool hasReadDstColor() const { return fHasReadDstColor; }
111 bool hasReadFragmentPosition() const { return fHasReadFragmentPosition; } 109 bool hasReadFragmentPosition() const { return fHasReadFragmentPosition; }
112 void reset() { 110 void reset() {
113 fHasReadDstColor = false; 111 fHasReadDstColor = false;
114 fHasReadFragmentPosition = false; 112 fHasReadFragmentPosition = false;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 bool fHasReadDstColor; 153 bool fHasReadDstColor;
156 bool fHasReadFragmentPosition; 154 bool fHasReadFragmentPosition;
157 155
158 friend class GrGLNvprProgramBuilder; 156 friend class GrGLNvprProgramBuilder;
159 friend class GrGLProgramBuilder; 157 friend class GrGLProgramBuilder;
160 158
161 typedef GrGLFPFragmentBuilder INHERITED; 159 typedef GrGLFPFragmentBuilder INHERITED;
162 }; 160 };
163 161
164 #endif 162 #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