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

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

Issue 783763002: Initial CL to move color / coverage off of drawstate (Closed) Base URL: https://skia.googlesource.com/skia.git@no-static-gp
Patch Set: todo added 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/GrCustomCoordsTextureEffect.cpp
diff --git a/src/gpu/effects/GrCustomCoordsTextureEffect.cpp b/src/gpu/effects/GrCustomCoordsTextureEffect.cpp
index a132e86cf9e3e1104e5c868c6ad5dc4f04ab61bb..597fa8cf3e7f71252c8690506dcf407cfbb9cff6 100644
--- a/src/gpu/effects/GrCustomCoordsTextureEffect.cpp
+++ b/src/gpu/effects/GrCustomCoordsTextureEffect.cpp
@@ -67,10 +67,11 @@ private:
///////////////////////////////////////////////////////////////////////////////
-GrCustomCoordsTextureEffect::GrCustomCoordsTextureEffect(GrTexture* texture,
+GrCustomCoordsTextureEffect::GrCustomCoordsTextureEffect(GrColor color,
+ GrTexture* texture,
const GrTextureParams& params,
bool hasColor)
- : fTextureAccess(texture, params), fInColor(NULL) {
+ : INHERITED(color), fTextureAccess(texture, params), fInColor(NULL) {
this->initClassID<GrCustomCoordsTextureEffect>();
fInPosition = &this->addVertexAttrib(GrAttribute("inPosition", kVec2f_GrVertexAttribType));
if (hasColor) {
@@ -129,5 +130,5 @@ GrGeometryProcessor* GrCustomCoordsTextureEffect::TestCreate(SkRandom* random,
GrTextureParams params(tileModes, random->nextBool() ? GrTextureParams::kBilerp_FilterMode :
GrTextureParams::kNone_FilterMode);
- return GrCustomCoordsTextureEffect::Create(textures[texIdx], params, random->nextBool());
+ return GrCustomCoordsTextureEffect::Create(GrRandomColor(random), textures[texIdx], params, random->nextBool());
}

Powered by Google App Engine
This is Rietveld 408576698