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

Unified Diff: gm/texdata.cpp

Issue 1404823005: GrDrawContext now holds GrRenderTarget pointer (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix overlength line Created 5 years, 2 months 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 | « no previous file | include/core/SkMaskFilter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/texdata.cpp
diff --git a/gm/texdata.cpp b/gm/texdata.cpp
index e36e94dba443f736b9a72dbbbe56a07f31aff133..c89ce734f7584e3d12d015310d66768f53b26855 100644
--- a/gm/texdata.cpp
+++ b/gm/texdata.cpp
@@ -22,7 +22,7 @@ static const int S = 200;
DEF_SIMPLE_GM_BG(texdata, canvas, 2 * S, 2 * S, SK_ColorBLACK) {
GrRenderTarget* target = canvas->internal_private_accessTopLayerRenderTarget();
GrContext* ctx = canvas->getGrContext();
- SkAutoTUnref<GrDrawContext> drawContext(ctx ? ctx->drawContext() : nullptr);
+ SkAutoTUnref<GrDrawContext> drawContext(ctx ? ctx->drawContext(target) : nullptr);
if (drawContext && target) {
SkAutoTArray<SkPMColor> gTextureData((2 * S) * (2 * S));
static const int stride = 2 * S;
@@ -96,7 +96,7 @@ DEF_SIMPLE_GM_BG(texdata, canvas, 2 * S, 2 * S, SK_ColorBLACK) {
tm.postIDiv(2*S, 2*S);
paint.addColorTextureProcessor(texture, tm);
- drawContext->drawRect(target, clip, paint, vm, SkRect::MakeWH(2*S, 2*S));
+ drawContext->drawRect(clip, paint, vm, SkRect::MakeWH(2*S, 2*S));
// now update the lower right of the texture in first pass
// or upper right in second pass
@@ -110,7 +110,7 @@ DEF_SIMPLE_GM_BG(texdata, canvas, 2 * S, 2 * S, SK_ColorBLACK) {
texture->writePixels(S, (i ? 0 : S), S, S,
texture->config(), gTextureData.get(),
4 * stride);
- drawContext->drawRect(target, clip, paint, vm, SkRect::MakeWH(2*S, 2*S));
+ drawContext->drawRect(clip, paint, vm, SkRect::MakeWH(2*S, 2*S));
}
} else {
skiagm::GM::DrawGpuOnlyMessage(canvas);
« no previous file with comments | « no previous file | include/core/SkMaskFilter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698