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

Side by Side Diff: src/gpu/gl/GrGLProgram.h

Issue 25023003: Implement color filter as GrGLEffect (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Fix a small thinko Created 7 years, 2 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 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 8
9 #ifndef GrGLProgram_DEFINED 9 #ifndef GrGLProgram_DEFINED
10 #define GrGLProgram_DEFINED 10 #define GrGLProgram_DEFINED
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 SharedGLState*); 129 SharedGLState*);
130 130
131 private: 131 private:
132 typedef GrGLUniformManager::UniformHandle UniformHandle; 132 typedef GrGLUniformManager::UniformHandle UniformHandle;
133 133
134 // handles for uniforms (aside from per-effect samplers) 134 // handles for uniforms (aside from per-effect samplers)
135 struct UniformHandles { 135 struct UniformHandles {
136 UniformHandle fViewMatrixUni; 136 UniformHandle fViewMatrixUni;
137 UniformHandle fColorUni; 137 UniformHandle fColorUni;
138 UniformHandle fCoverageUni; 138 UniformHandle fCoverageUni;
139 UniformHandle fColorFilterUni;
140 139
141 // We use the render target height to provide a y-down frag coord when s pecifying 140 // We use the render target height to provide a y-down frag coord when s pecifying
142 // origin_upper_left is not supported. 141 // origin_upper_left is not supported.
143 UniformHandle fRTHeightUni; 142 UniformHandle fRTHeightUni;
144 143
145 // Uniforms for computing texture coords to do the dst-copy lookup 144 // Uniforms for computing texture coords to do the dst-copy lookup
146 UniformHandle fDstCopyTopLeftUni; 145 UniformHandle fDstCopyTopLeftUni;
147 UniformHandle fDstCopyScaleUni; 146 UniformHandle fDstCopyScaleUni;
148 UniformHandle fDstCopySamplerUni; 147 UniformHandle fDstCopySamplerUni;
149 }; 148 };
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 // Helper for setData() that sets the view matrix and loads the render targe t height uniform 189 // Helper for setData() that sets the view matrix and loads the render targe t height uniform
191 void setMatrixAndRenderTargetHeight(const GrDrawState&); 190 void setMatrixAndRenderTargetHeight(const GrDrawState&);
192 191
193 // GL program ID 192 // GL program ID
194 GrGLuint fProgramID; 193 GrGLuint fProgramID;
195 194
196 // these reflect the current values of uniforms (GL uniform values travel wi th program) 195 // these reflect the current values of uniforms (GL uniform values travel wi th program)
197 MatrixState fMatrixState; 196 MatrixState fMatrixState;
198 GrColor fColor; 197 GrColor fColor;
199 GrColor fCoverage; 198 GrColor fCoverage;
200 GrColor fColorFilterColor;
201 int fDstCopyTexUnit; 199 int fDstCopyTexUnit;
202 200
203 SkTArray<EffectAndSamplers> fColorEffects; 201 SkTArray<EffectAndSamplers> fColorEffects;
204 SkTArray<EffectAndSamplers> fCoverageEffects; 202 SkTArray<EffectAndSamplers> fCoverageEffects;
205 203
206 GrGLProgramDesc fDesc; 204 GrGLProgramDesc fDesc;
207 GrGpuGL* fGpu; 205 GrGpuGL* fGpu;
208 206
209 GrGLUniformManager fUniformManager; 207 GrGLUniformManager fUniformManager;
210 UniformHandles fUniformHandles; 208 UniformHandles fUniformHandles;
211 209
212 typedef SkRefCnt INHERITED; 210 typedef SkRefCnt INHERITED;
213 }; 211 };
214 212
215 #endif 213 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698