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

Side by Side Diff: src/gpu/GrPrimitiveProcessor.h

Issue 1243583002: Add support for transformedLocalCoords to GrDefaultGeoProc (Closed) Base URL: https://skia.googlesource.com/skia.git@pipelinetobatch2
Patch Set: tweaks Created 5 years, 4 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/GrPathProcessor.h ('k') | src/gpu/gl/GrGLGeometryProcessor.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 GrPrimitiveProcessor_DEFINED 8 #ifndef GrPrimitiveProcessor_DEFINED
9 #define GrPrimitiveProcessor_DEFINED 9 #define GrPrimitiveProcessor_DEFINED
10 10
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 213
214 214
215 /** Returns a new instance of the appropriate *GL* implementation class 215 /** Returns a new instance of the appropriate *GL* implementation class
216 for the given GrProcessor; caller is responsible for deleting 216 for the given GrProcessor; caller is responsible for deleting
217 the object. */ 217 the object. */
218 virtual GrGLPrimitiveProcessor* createGLInstance(const GrBatchTracker& bt, 218 virtual GrGLPrimitiveProcessor* createGLInstance(const GrBatchTracker& bt,
219 const GrGLSLCaps& caps) con st = 0; 219 const GrGLSLCaps& caps) con st = 0;
220 220
221 bool isPathRendering() const { return fIsPathRendering; } 221 bool isPathRendering() const { return fIsPathRendering; }
222 222
223 /**
224 * No Local Coord Transformation is needed in the shader, instead transforme d local coords will
225 * be provided via vertex attribute.
226 */
227 virtual bool hasTransformedLocalCoords() const = 0;
228
223 protected: 229 protected:
224 GrPrimitiveProcessor(bool isPathRendering) 230 GrPrimitiveProcessor(bool isPathRendering)
225 : fNumAttribs(0) 231 : fNumAttribs(0)
226 , fVertexStride(0) 232 , fVertexStride(0)
227 , fIsPathRendering(isPathRendering) {} 233 , fIsPathRendering(isPathRendering) {}
228 234
229 Attribute fAttribs[kMaxVertexAttribs]; 235 Attribute fAttribs[kMaxVertexAttribs];
230 int fNumAttribs; 236 int fNumAttribs;
231 size_t fVertexStride; 237 size_t fVertexStride;
232 238
233 private: 239 private:
234 virtual bool hasExplicitLocalCoords() const = 0; 240 virtual bool hasExplicitLocalCoords() const = 0;
235 241
236 bool fIsPathRendering; 242 bool fIsPathRendering;
237 243
238 typedef GrProcessor INHERITED; 244 typedef GrProcessor INHERITED;
239 }; 245 };
240 246
241 #endif 247 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrPathProcessor.h ('k') | src/gpu/gl/GrGLGeometryProcessor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698