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

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

Issue 815643005: Move program descriptor and primitive processor off of optstate (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: bug fix 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/GrTest.cpp ('k') | src/gpu/gl/GrGLGpu.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 2013 Google Inc. 2 * Copyright 2013 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 GrGLGeometryProcessor_DEFINED 8 #ifndef GrGLGeometryProcessor_DEFINED
9 #define GrGLGeometryProcessor_DEFINED 9 #define GrGLGeometryProcessor_DEFINED
10 10
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 /** 131 /**
132 * If a GL effect needs a GrGLFullShaderBuilder* object to emit vertex code, the n it must inherit 132 * If a GL effect needs a GrGLFullShaderBuilder* object to emit vertex code, the n it must inherit
133 * from this class. Since paths don't have vertices, this class is only meant to be used internally 133 * from this class. Since paths don't have vertices, this class is only meant to be used internally
134 * by skia, for special cases. 134 * by skia, for special cases.
135 */ 135 */
136 class GrGLGeometryProcessor : public GrGLPrimitiveProcessor { 136 class GrGLGeometryProcessor : public GrGLPrimitiveProcessor {
137 public: 137 public:
138 /* Any general emit code goes in the base class emitCode. Subclasses overri de onEmitCode */ 138 /* Any general emit code goes in the base class emitCode. Subclasses overri de onEmitCode */
139 void emitCode(EmitArgs&) SK_OVERRIDE; 139 void emitCode(EmitArgs&) SK_OVERRIDE;
140 140
141 void setTransformData(const GrPrimitiveProcessor*, 141 void setTransformData(const GrPrimitiveProcessor&,
142 const GrGLProgramDataManager&, 142 const GrGLProgramDataManager&,
143 int index, 143 int index,
144 const SkTArray<const GrCoordTransform*, true>& transfo rms); 144 const SkTArray<const GrCoordTransform*, true>& transfo rms);
145 145
146 protected: 146 protected:
147 // Many GrGeometryProcessors do not need explicit local coords 147 // Many GrGeometryProcessors do not need explicit local coords
148 void emitTransforms(GrGLGPBuilder* gp, 148 void emitTransforms(GrGLGPBuilder* gp,
149 const GrShaderVar& posVar, 149 const GrShaderVar& posVar,
150 const SkMatrix& localMatrix, 150 const SkMatrix& localMatrix,
151 const TransformsIn& tin, 151 const TransformsIn& tin,
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 void emitCode(EmitArgs&) SK_OVERRIDE; 203 void emitCode(EmitArgs&) SK_OVERRIDE;
204 204
205 virtual void emitTransforms(GrGLGPBuilder*, const TransformsIn&, TransformsO ut*) = 0; 205 virtual void emitTransforms(GrGLGPBuilder*, const TransformsIn&, TransformsO ut*) = 0;
206 206
207 virtual void resolveSeparableVaryings(GrGLGpu* gpu, GrGLuint programId) {} 207 virtual void resolveSeparableVaryings(GrGLGpu* gpu, GrGLuint programId) {}
208 208
209 void setData(const GrGLProgramDataManager&, 209 void setData(const GrGLProgramDataManager&,
210 const GrPrimitiveProcessor&, 210 const GrPrimitiveProcessor&,
211 const GrBatchTracker&) SK_OVERRIDE; 211 const GrBatchTracker&) SK_OVERRIDE;
212 212
213 virtual void setTransformData(const GrPrimitiveProcessor*, 213 virtual void setTransformData(const GrPrimitiveProcessor&,
214 int index, 214 int index,
215 const SkTArray<const GrCoordTransform*, true>& transforms, 215 const SkTArray<const GrCoordTransform*, true>& transforms,
216 GrGLPathRendering*, 216 GrGLPathRendering*,
217 GrGLuint programID) = 0; 217 GrGLuint programID) = 0;
218 218
219 virtual void didSetData(GrGLPathRendering*) {} 219 virtual void didSetData(GrGLPathRendering*) {}
220 220
221 private: 221 private:
222 UniformHandle fColorUniform; 222 UniformHandle fColorUniform;
223 GrColor fColor; 223 GrColor fColor;
224 224
225 typedef GrGLPrimitiveProcessor INHERITED; 225 typedef GrGLPrimitiveProcessor INHERITED;
226 }; 226 };
227 227
228 #endif 228 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrTest.cpp ('k') | src/gpu/gl/GrGLGpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698