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

Unified Diff: gm/yuvtorgbeffect.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/texturedomaineffect.cpp ('k') | include/gpu/GrContext.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/yuvtorgbeffect.cpp
diff --git a/gm/yuvtorgbeffect.cpp b/gm/yuvtorgbeffect.cpp
index b5c6b95314993dfc4ad383cfbf5473984cbe2371..5e7a940e0be36773439b042568abf0091cf1b937 100644
--- a/gm/yuvtorgbeffect.cpp
+++ b/gm/yuvtorgbeffect.cpp
@@ -81,8 +81,6 @@ protected:
return;
}
- GrDrawState* drawState = tt.target()->drawState();
-
SkAutoTUnref<GrTexture> texture[3];
texture[0].reset(GrRefCachedBitmapTexture(context, fBmp[0], NULL));
texture[1].reset(GrRefCachedBitmapTexture(context, fBmp[1], NULL));
@@ -117,11 +115,11 @@ protected:
if (fp) {
SkMatrix viewMatrix;
viewMatrix.setTranslate(x, y);
- drawState->reset(viewMatrix);
- drawState->setRenderTarget(rt);
- drawState->setColor(0xffffffff);
- drawState->addColorProcessor(fp);
- tt.target()->drawSimpleRect(renderRect);
+ GrDrawState drawState(viewMatrix);
+ drawState.setRenderTarget(rt);
+ drawState.setColor(0xffffffff);
+ drawState.addColorProcessor(fp);
+ tt.target()->drawSimpleRect(&drawState, renderRect);
}
x += renderRect.width() + kTestPad;
}
« no previous file with comments | « gm/texturedomaineffect.cpp ('k') | include/gpu/GrContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698