From 8d5ce2d9ede0c241b906f1a0df9dac3cf3c3aa55 Mon Sep 17 00:00:00 2001 From: Robert Phillips Date: Fri, 10 Nov 2017 15:28:13 -0500 Subject: Patch up ref counting of proxies Bug: skia: Change-Id: If746283d788368bf7aad6d285f181d8531768e61 Reviewed-on: https://skia-review.googlesource.com/70024 Reviewed-by: Brian Salomon Commit-Queue: Robert Phillips --- tests/OnFlushCallbackTest.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'tests/OnFlushCallbackTest.cpp') diff --git a/tests/OnFlushCallbackTest.cpp b/tests/OnFlushCallbackTest.cpp index 0c2edfba43..c7af59ac9f 100644 --- a/tests/OnFlushCallbackTest.cpp +++ b/tests/OnFlushCallbackTest.cpp @@ -415,8 +415,6 @@ static sk_sp make_upstream_image(GrContext* context, AtlasObject for (int i = 0; i < 3; ++i) { SkRect r = SkRect::MakeXYWH(i*kDrawnTileSize, 0, kDrawnTileSize, kDrawnTileSize); - // TODO: here is the blocker for deferring creation of the atlas. The TextureSamplers - // created here currently require a hard GrTexture. auto fp = GrSimpleTextureEffect::Make(fakeAtlas, SkMatrix::I()); GrPaint paint; paint.addColorFragmentProcessor(std::move(fp)); @@ -481,12 +479,10 @@ sk_sp pre_create_atlas(GrContext* context) { desc.fWidth = 32; desc.fHeight = 16; desc.fConfig = kSkia8888_GrPixelConfig; - sk_sp atlasDest = GrSurfaceProxy::MakeDeferred( - context->resourceProvider(), - desc, SkBackingFit::kExact, - SkBudgeted::kYes, - GrResourceProvider::kNoPendingIO_Flag); - return sk_ref_sp(atlasDest->asTextureProxy()); + return GrSurfaceProxy::MakeDeferred(context->resourceProvider(), + desc, SkBackingFit::kExact, + SkBudgeted::kYes, + GrResourceProvider::kNoPendingIO_Flag); } #endif -- cgit v1.2.3