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

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: cleanup 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
Index: src/gpu/effects/GrDistanceFieldTextureEffect.cpp
diff --git a/src/gpu/effects/GrDistanceFieldTextureEffect.cpp b/src/gpu/effects/GrDistanceFieldTextureEffect.cpp
index 0f930af371d151d131c5d665bf622f12b9e67c02..10b1c629d5708ccef3b11b1e04855ad060a7f7c7 100755
--- a/src/gpu/effects/GrDistanceFieldTextureEffect.cpp
+++ b/src/gpu/effects/GrDistanceFieldTextureEffect.cpp
@@ -167,7 +167,8 @@ public:
processor.cast<GrDistanceFieldTextureEffect>();
const DistanceFieldBatchTracker& local = bt.cast<DistanceFieldBatchTracker>();
b->add32(dfTexEffect.getFlags());
- b->add32(local.fInputColorType);
+ b->add32((local.fInputColorType << 16) |
bsalomon 2014/12/22 21:13:55 consolidate in a single int?
+ (local.fUsesLocalCoords && processor.localMatrix().hasPerspective() ? 0x1 : 0x0));
}
private:
@@ -423,7 +424,8 @@ public:
const DistanceFieldNoGammaBatchTracker& local = bt.cast<DistanceFieldNoGammaBatchTracker>();
b->add32(dfTexEffect.getFlags());
- b->add32(local.fInputColorType);
+ b->add32((local.fInputColorType << 16) |
+ (local.fUsesLocalCoords && proc.localMatrix().hasPerspective() ? 0x1 : 0x0));
}
private:
@@ -725,7 +727,8 @@ public:
const DistanceFieldLCDBatchTracker& local = bt.cast<DistanceFieldLCDBatchTracker>();
b->add32(dfTexEffect.getFlags());
- b->add32(local.fInputColorType);
+ b->add32((local.fInputColorType << 16) |
+ (local.fUsesLocalCoords && processor.localMatrix().hasPerspective() ? 0x1 : 0x0));
}
private:

Powered by Google App Engine
This is Rietveld 408576698