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

Unified Diff: src/gpu/effects/GrDistanceFieldGeoProc.h

Issue 1502253003: Allow LCD text to batch across colorchanges. This will always use (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweaks Created 5 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.cpp ('k') | src/gpu/effects/GrDistanceFieldGeoProc.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/effects/GrDistanceFieldGeoProc.h
diff --git a/src/gpu/effects/GrDistanceFieldGeoProc.h b/src/gpu/effects/GrDistanceFieldGeoProc.h
index e17a0ce7819ccff3352a8ace0759da097dbac08e..ad14c518d085031685add260dd2b46b1e363a340 100644
--- a/src/gpu/effects/GrDistanceFieldGeoProc.h
+++ b/src/gpu/effects/GrDistanceFieldGeoProc.h
@@ -35,7 +35,8 @@ enum GrDistanceFieldEffectFlags {
kLCD_DistanceFieldEffectMask = kSimilarity_DistanceFieldEffectFlag |
kRectToRect_DistanceFieldEffectFlag |
kUseLCD_DistanceFieldEffectFlag |
- kBGR_DistanceFieldEffectFlag,
+ kBGR_DistanceFieldEffectFlag |
+ kColorAttr_DistanceFieldEffectFlag,
};
/**
@@ -197,10 +198,12 @@ public:
const char* name() const override { return "DistanceFieldLCDTexture"; }
const Attribute* inPosition() const { return fInPosition; }
+ const Attribute* inColor() const { return fInColor; }
const Attribute* inTextureCoords() const { return fInTextureCoords; }
DistanceAdjust getDistanceAdjust() const { return fDistanceAdjust; }
GrColor color() const { return fColor; }
bool colorIgnored() const { return GrColor_ILLEGAL == fColor; }
+ bool hasVertexColor() const { return SkToBool(fInColor); }
const SkMatrix& viewMatrix() const { return fViewMatrix; }
uint32_t getFlags() const { return fFlags; }
bool usesLocalCoords() const { return fUsesLocalCoords; }
@@ -221,6 +224,7 @@ private:
DistanceAdjust fDistanceAdjust;
uint32_t fFlags;
const Attribute* fInPosition;
+ const Attribute* fInColor;
const Attribute* fInTextureCoords;
bool fUsesLocalCoords;
« no previous file with comments | « src/gpu/effects/GrBitmapTextGeoProc.cpp ('k') | src/gpu/effects/GrDistanceFieldGeoProc.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698