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

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

Issue 791743003: Remove GP from drawstate, revision of invariant output for GP (Closed) Base URL: https://skia.googlesource.com/skia.git@color-to-gp
Patch Set: more windows fix 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/GrConvexPolyEffect.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 1578fd8fe4f35794337efff1c9719ce624ff0e03..c93db90a91b1107c8af35ba6b7042b34f648070c 100644
--- a/src/gpu/effects/GrBitmapTextGeoProc.cpp
+++ b/src/gpu/effects/GrBitmapTextGeoProc.cpp
@@ -66,8 +66,9 @@ private:
///////////////////////////////////////////////////////////////////////////////
GrBitmapTextGeoProc::GrBitmapTextGeoProc(GrColor color, GrTexture* texture,
- const GrTextureParams& params, bool useColorAttrib)
- : INHERITED(color), fTextureAccess(texture, params), fInColor(NULL) {
+ const GrTextureParams& params, bool useColorAttrib,
+ bool opaqueVertexColors)
+ : INHERITED(color, opaqueVertexColors), fTextureAccess(texture, params), fInColor(NULL) {
this->initClassID<GrBitmapTextGeoProc>();
fInPosition = &this->addVertexAttrib(GrAttribute("inPosition", kVec2f_GrVertexAttribType));
if (useColorAttrib) {
@@ -84,15 +85,15 @@ bool GrBitmapTextGeoProc::onIsEqual(const GrGeometryProcessor& other) const {
return SkToBool(this->inColor()) == SkToBool(gp.inColor());
}
-void GrBitmapTextGeoProc::onComputeInvariantOutput(GrInvariantOutput* inout) const {
+void GrBitmapTextGeoProc::onGetInvariantOutputCoverage(GrInitInvariantOutput* out) const {
if (GrPixelConfigIsAlphaOnly(this->texture(0)->config())) {
- inout->mulByUnknownAlpha();
+ out->setUnknownSingleComponent();
} else if (GrPixelConfigIsOpaque(this->texture(0)->config())) {
- inout->mulByUnknownOpaqueColor();
- inout->setUsingLCDCoverage();
+ out->setUnknownOpaqueFourComponents();
+ out->setUsingLCDCoverage();
} else {
- inout->mulByUnknownColor();
- inout->setUsingLCDCoverage();
+ out->setUnknownFourComponents();
+ out->setUsingLCDCoverage();
}
}
@@ -129,5 +130,5 @@ GrGeometryProcessor* GrBitmapTextGeoProc::TestCreate(SkRandom* random,
GrTextureParams::kNone_FilterMode);
return GrBitmapTextGeoProc::Create(GrRandomColor(random), textures[texIdx], params,
- random->nextBool());
+ random->nextBool(), random->nextBool());
}
« no previous file with comments | « src/gpu/effects/GrBitmapTextGeoProc.h ('k') | src/gpu/effects/GrConvexPolyEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698