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

Unified Diff: src/gpu/gl/GrGLGeometryProcessor.h

Issue 1272703002: AARectBatch can transform coords on cpu (Closed) Base URL: https://skia.googlesource.com/skia.git@lccleanup5
Patch Set: 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/GrBatch.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 88baecf879886d3662752630396463da9df3b393..412dca21347c0d8c8c030ff193c7694f47b303ce 100644
--- a/src/gpu/gl/GrGLGeometryProcessor.h
+++ b/src/gpu/gl/GrGLGeometryProcessor.h
@@ -19,6 +19,8 @@ class GrGLGPBuilder;
*/
class GrGLGeometryProcessor : public GrGLPrimitiveProcessor {
public:
+ GrGLGeometryProcessor() : fTransformedLocalCoords(false) {}
+
/* Any general emit code goes in the base class emitCode. Subclasses override onEmitCode */
void emitCode(EmitArgs&) override;
@@ -90,6 +92,11 @@ private:
const GrGLProgramDataManager& pdman,
int index,
const SkTArray<const GrCoordTransform*, true>& transforms) {
+ // No need to set if our local coords have already been transformed
+ if (fTransformedLocalCoords) {
+ return;
+ }
+
SkSTArray<2, Transform, true>& procTransforms = fInstalledTransforms[index];
int numTransforms = transforms.count();
for (int t = 0; t < numTransforms; ++t) {
@@ -104,6 +111,7 @@ private:
virtual void onEmitCode(EmitArgs&, GrGPArgs*) = 0;
+ bool fTransformedLocalCoords;
typedef GrGLPrimitiveProcessor INHERITED;
};
« no previous file with comments | « src/gpu/GrBatch.h ('k') | src/gpu/gl/GrGLGeometryProcessor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698