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

Unified Diff: src/gpu/gl/GrGLGeometryProcessor.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrPrimitiveProcessor.h ('k') | src/gpu/gl/GrGLGeometryProcessor.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLGeometryProcessor.h
diff --git a/src/gpu/gl/GrGLGeometryProcessor.h b/src/gpu/gl/GrGLGeometryProcessor.h
index 747d82ab4859f0b76f244562d4ae1a39671eb5d4..88baecf879886d3662752630396463da9df3b393 100644
--- a/src/gpu/gl/GrGLGeometryProcessor.h
+++ b/src/gpu/gl/GrGLGeometryProcessor.h
@@ -41,7 +41,7 @@ public:
}
protected:
- // A helper for subclasses which don't have an explicit local matrix
+ // Emit a uniform matrix for each coord transform.
void emitTransforms(GrGLGPBuilder* gp,
const GrShaderVar& posVar,
const char* localCoords,
@@ -50,6 +50,7 @@ protected:
this->emitTransforms(gp, posVar, localCoords, SkMatrix::I(), tin, tout);
}
+ // Emit pre-transformed coords as a vertex attribute per coord-transform.
void emitTransforms(GrGLGPBuilder*,
const GrShaderVar& posVar,
const char* localCoords,
@@ -57,6 +58,12 @@ protected:
const TransformsIn&,
TransformsOut*);
+ // caller has emitted transforms via attributes
+ void emitTransforms(GrGLGPBuilder*,
+ const char* localCoords,
+ const TransformsIn& tin,
+ TransformsOut* tout);
+
struct GrGPArgs {
// The variable used by a GP to store its position. It can be
// either a vec2 or a vec3 depending on the presence of perspective.
« no previous file with comments | « src/gpu/GrPrimitiveProcessor.h ('k') | src/gpu/gl/GrGLGeometryProcessor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698