diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/GrMipMappedTest.cpp | 6 | ||||
-rw-r--r-- | tests/OnFlushCallbackTest.cpp | 12 |
2 files changed, 7 insertions, 11 deletions
diff --git a/tests/GrMipMappedTest.cpp b/tests/GrMipMappedTest.cpp index f023018902..c2a0df2e5d 100644 --- a/tests/GrMipMappedTest.cpp +++ b/tests/GrMipMappedTest.cpp @@ -53,7 +53,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(GrWrappedMipMappedTest, reporter, ctxInfo) { mipMapped, backendHandle); - GrTextureProxy* proxy; + sk_sp<GrTextureProxy> proxy; sk_sp<SkImage> image; if (isRT) { sk_sp<SkSurface> surface = SkSurface::MakeFromBackendTexture( @@ -65,12 +65,12 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(GrWrappedMipMappedTest, reporter, ctxInfo) { nullptr); SkGpuDevice* device = ((SkSurface_Gpu*)surface.get())->getDevice(); - proxy = device->accessRenderTargetContext()->asTextureProxy(); + proxy = device->accessRenderTargetContext()->asTextureProxyRef(); } else { image = SkImage::MakeFromTexture(context, backendTex, kTopLeft_GrSurfaceOrigin, kPremul_SkAlphaType, nullptr); - proxy = as_IB(image)->peekProxy(); + proxy = as_IB(image)->asTextureProxyRef(); } REPORTER_ASSERT(reporter, proxy); if (!proxy) { 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<GrTextureProxy> 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<GrTextureProxy> pre_create_atlas(GrContext* context) { desc.fWidth = 32; desc.fHeight = 16; desc.fConfig = kSkia8888_GrPixelConfig; - sk_sp<GrSurfaceProxy> 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 |