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

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

Issue 820523002: initial changes to add local matrix to primitive processor (Closed) Base URL: https://skia.googlesource.com/skia.git@cleanup-ccm-above-context
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
« no previous file with comments | « src/gpu/effects/GrBitmapTextGeoProc.h ('k') | src/gpu/effects/GrDashingEffect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/effects/GrBitmapTextGeoProc.cpp
diff --git a/src/gpu/effects/GrBitmapTextGeoProc.cpp b/src/gpu/effects/GrBitmapTextGeoProc.cpp
index 1b393f32a37a063f565b5dcf015c700e427a5402..09eee1c70d1ba106be2843d0acf130a178798ae9 100644
--- a/src/gpu/effects/GrBitmapTextGeoProc.cpp
+++ b/src/gpu/effects/GrBitmapTextGeoProc.cpp
@@ -17,6 +17,7 @@
struct BitmapTextBatchTracker {
GrGPInput fInputColorType;
GrColor fColor;
+ bool fUsesLocalCoords;
};
class GrGLBitmapTextGeoProc : public GrGLGeometryProcessor {
@@ -134,12 +135,17 @@ void GrBitmapTextGeoProc::initBatchTracker(GrBatchTracker* bt, const InitBT& ini
BitmapTextBatchTracker* local = bt->cast<BitmapTextBatchTracker>();
local->fInputColorType = GetColorInputType(&local->fColor, this->color(), init,
SkToBool(fInColor));
+ local->fUsesLocalCoords = init.fUsesLocalCoords;
}
-bool GrBitmapTextGeoProc::onCanMakeEqual(const GrBatchTracker& m, const GrBatchTracker& t) const {
+bool GrBitmapTextGeoProc::onCanMakeEqual(const GrBatchTracker& m,
+ const GrGeometryProcessor& that,
+ const GrBatchTracker& t) const {
const BitmapTextBatchTracker& mine = m.cast<BitmapTextBatchTracker>();
const BitmapTextBatchTracker& theirs = t.cast<BitmapTextBatchTracker>();
- return CanCombineOutput(mine.fInputColorType, mine.fColor,
+ return CanCombineLocalMatrices(*this, mine.fUsesLocalCoords,
+ that, theirs.fUsesLocalCoords) &&
+ CanCombineOutput(mine.fInputColorType, mine.fColor,
theirs.fInputColorType, theirs.fColor);
}
« no previous file with comments | « src/gpu/effects/GrBitmapTextGeoProc.h ('k') | src/gpu/effects/GrDashingEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698