diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/ClipStackTest.cpp | 4 | ||||
-rw-r--r-- | tests/ImageFilterCacheTest.cpp | 4 | ||||
-rw-r--r-- | tests/ProxyTest.cpp | 9 |
3 files changed, 10 insertions, 7 deletions
diff --git a/tests/ClipStackTest.cpp b/tests/ClipStackTest.cpp index ba80933009..e0df2ca902 100644 --- a/tests/ClipStackTest.cpp +++ b/tests/ClipStackTest.cpp @@ -16,6 +16,7 @@ #include "GrClipStackClip.h" #include "GrReducedClip.h" #include "GrResourceCache.h" +#include "GrSurfaceProxyPriv.h" #include "GrTextureProxy.h" typedef GrReducedClip::ElementList ElementList; typedef GrReducedClip::InitialState InitialState; @@ -1442,7 +1443,8 @@ DEF_GPUTEST_FOR_ALL_CONTEXTS(ClipMaskCache, reporter, ctxInfo) { stack.save(); stack.clipPath(path, m, SkClipOp::kIntersect, true); sk_sp<GrTextureProxy> mask = GrClipStackClip(&stack).testingOnly_createClipMask(context); - GrTexture* tex = mask->instantiateTexture(context->resourceProvider()); + mask->instantiate(context->resourceProvider()); + GrTexture* tex = mask->priv().peekTexture(); REPORTER_ASSERT(reporter, 0 == strcmp(tex->getUniqueKey().tag(), kTag)); // Make sure mask isn't pinned in cache. mask.reset(nullptr); diff --git a/tests/ImageFilterCacheTest.cpp b/tests/ImageFilterCacheTest.cpp index a8b8f87981..d0c6c5bcb5 100644 --- a/tests/ImageFilterCacheTest.cpp +++ b/tests/ImageFilterCacheTest.cpp @@ -206,10 +206,10 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ImageFilterCache_ImageBackedGPU, reporter, ct return; } - GrTexture* tex = srcProxy->instantiateTexture(context->resourceProvider()); - if (!tex) { + if (!srcProxy->instantiate(context->resourceProvider())) { return; } + GrTexture* tex = srcProxy->priv().peekTexture(); GrBackendTexture backendTex = GrTest::CreateBackendTexture(context->contextPriv().getBackend(), kFullSize, diff --git a/tests/ProxyTest.cpp b/tests/ProxyTest.cpp index 40cbeebdc7..dc34c76b66 100644 --- a/tests/ProxyTest.cpp +++ b/tests/ProxyTest.cpp @@ -52,8 +52,8 @@ static void check_rendertarget(skiatest::Reporter* reporter, REPORTER_ASSERT(reporter, rtProxy->numStencilSamples() == numSamples); GrSurfaceProxy::UniqueID idBefore = rtProxy->uniqueID(); - GrRenderTarget* rt = rtProxy->instantiateRenderTarget(provider); - REPORTER_ASSERT(reporter, rt); + REPORTER_ASSERT(reporter, rtProxy->instantiate(provider)); + GrRenderTarget* rt = rtProxy->priv().peekRenderTarget(); REPORTER_ASSERT(reporter, rtProxy->uniqueID() == idBefore); if (wasWrapped) { @@ -86,8 +86,9 @@ static void check_texture(skiatest::Reporter* reporter, SkBackingFit fit, bool wasWrapped) { GrSurfaceProxy::UniqueID idBefore = texProxy->uniqueID(); - GrTexture* tex = texProxy->instantiateTexture(provider); - REPORTER_ASSERT(reporter, tex); + + REPORTER_ASSERT(reporter, texProxy->instantiate(provider)); + GrTexture* tex = texProxy->priv().peekTexture(); REPORTER_ASSERT(reporter, texProxy->uniqueID() == idBefore); if (wasWrapped) { |