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

Unified Diff: gm/texdata.cpp

Issue 936943002: Pass clip to context (Closed) Base URL: https://skia.googlesource.com/skia.git@pass_down_rendertarget
Patch Set: feedback inc Created 5 years, 10 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') | src/gpu/GrTextContext.cpp » ('J')
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 e0aa233196db933502e972ac9ca1d5f319c84fcc..927bea5db66ddbd3a03b67d3d78350b7bfcdaf8d 100644
--- a/gm/texdata.cpp
+++ b/gm/texdata.cpp
@@ -91,7 +91,8 @@ protected:
}
SkAutoTUnref<GrTexture> au(texture);
- GrContext::AutoClip acs(ctx, SkRect::MakeWH(2*S, 2*S));
+ // setup new clip
+ GrClip clip(SkRect::MakeWH(2*S, 2*S));
GrPaint paint;
paint.setPorterDuffXPFactory(SkXfermode::kSrcOver_Mode);
@@ -109,7 +110,7 @@ protected:
tm.postIDiv(2*S, 2*S);
paint.addColorTextureProcessor(texture, tm);
- ctx->drawRect(target, paint, vm, SkRect::MakeWH(2*S, 2*S));
+ ctx->drawRect(target, 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
@@ -123,7 +124,7 @@ protected:
texture->writePixels(S, (i ? 0 : S), S, S,
texture->config(), gTextureData.get(),
4 * stride);
- ctx->drawRect(target, paint, vm, SkRect::MakeWH(2*S, 2*S));
+ ctx->drawRect(target, clip, paint, vm, SkRect::MakeWH(2*S, 2*S));
}
} else {
this->drawGpuOnlyMessage(canvas);
« no previous file with comments | « no previous file | include/core/SkMaskFilter.h » ('j') | src/gpu/GrTextContext.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698