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

Unified Diff: src/gpu/effects/GrDistanceFieldTextureEffect.cpp

Issue 817853002: Remove localcoordchange functions off paint (Closed) Base URL: https://skia.googlesource.com/skia.git@local-matrix-on-gp
Patch Set: changing ignores Created 6 years 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/effects/GrDashingEffect.cpp ('k') | src/gpu/gl/builders/GrGLProgramBuilder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/effects/GrDistanceFieldTextureEffect.cpp
diff --git a/src/gpu/effects/GrDistanceFieldTextureEffect.cpp b/src/gpu/effects/GrDistanceFieldTextureEffect.cpp
index 0f930af371d151d131c5d665bf622f12b9e67c02..f5510d478ba9c915d72ff4bc7ef1dd8e18922193 100755
--- a/src/gpu/effects/GrDistanceFieldTextureEffect.cpp
+++ b/src/gpu/effects/GrDistanceFieldTextureEffect.cpp
@@ -166,8 +166,10 @@ public:
const GrDistanceFieldTextureEffect& dfTexEffect =
processor.cast<GrDistanceFieldTextureEffect>();
const DistanceFieldBatchTracker& local = bt.cast<DistanceFieldBatchTracker>();
- b->add32(dfTexEffect.getFlags());
- b->add32(local.fInputColorType);
+ uint32_t key = dfTexEffect.getFlags();
+ key |= local.fInputColorType << 16;
+ key |= local.fUsesLocalCoords && processor.localMatrix().hasPerspective() ? 0x1 << 24: 0x0;
+ b->add32(key);
}
private:
@@ -422,8 +424,10 @@ public:
proc.cast<GrDistanceFieldNoGammaTextureEffect>();
const DistanceFieldNoGammaBatchTracker& local = bt.cast<DistanceFieldNoGammaBatchTracker>();
- b->add32(dfTexEffect.getFlags());
- b->add32(local.fInputColorType);
+ uint32_t key = dfTexEffect.getFlags();
+ key |= local.fInputColorType << 16;
+ key |= local.fUsesLocalCoords && proc.localMatrix().hasPerspective() ? 0x1 << 24: 0x0;
+ b->add32(key);
}
private:
@@ -724,8 +728,10 @@ public:
processor.cast<GrDistanceFieldLCDTextureEffect>();
const DistanceFieldLCDBatchTracker& local = bt.cast<DistanceFieldLCDBatchTracker>();
- b->add32(dfTexEffect.getFlags());
- b->add32(local.fInputColorType);
+ uint32_t key = dfTexEffect.getFlags();
+ key |= local.fInputColorType << 16;
+ key |= local.fUsesLocalCoords && processor.localMatrix().hasPerspective() ? 0x1 << 24: 0x0;
+ b->add32(key);
}
private:
« no previous file with comments | « src/gpu/effects/GrDashingEffect.cpp ('k') | src/gpu/gl/builders/GrGLProgramBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698