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

Unified Diff: gm/texturedomaineffect.cpp

Issue 732693002: Drawstate on stack (Closed) Base URL: https://skia.googlesource.com/skia.git@real_def_gp
Patch Set: tiny fix Created 6 years, 1 month 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 | « gm/rrects.cpp ('k') | gm/yuvtorgbeffect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/texturedomaineffect.cpp
diff --git a/gm/texturedomaineffect.cpp b/gm/texturedomaineffect.cpp
index d235f7f86bc10a427d1fb473a17d103b48c0c0fc..efa753183a73a28a3075d2557b2080a3fe9d2267 100644
--- a/gm/texturedomaineffect.cpp
+++ b/gm/texturedomaineffect.cpp
@@ -90,8 +90,6 @@ protected:
return;
}
- GrDrawState* drawState = tt.target()->drawState();
-
SkAutoTUnref<GrTexture> texture(GrRefCachedBitmapTexture(context, fBmp, NULL));
if (!texture) {
return;
@@ -132,12 +130,12 @@ protected:
}
SkMatrix viewMatrix;
viewMatrix.setTranslate(x, y);
- drawState->reset(viewMatrix);
- drawState->setRenderTarget(rt);
- drawState->setColor(0xffffffff);
- drawState->addColorProcessor(fp);
+ GrDrawState drawState(viewMatrix);
+ drawState.setRenderTarget(rt);
+ drawState.setColor(0xffffffff);
+ drawState.addColorProcessor(fp);
- tt.target()->drawSimpleRect(renderRect);
+ tt.target()->drawSimpleRect(&drawState, renderRect);
x += renderRect.width() + kTestPad;
}
y += renderRect.height() + kTestPad;
« no previous file with comments | « gm/rrects.cpp ('k') | gm/yuvtorgbeffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698