diff options
author | Robert Phillips <robertphillips@google.com> | 2018-01-16 08:06:32 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-01-16 13:28:43 +0000 |
commit | 0bd24dc41f2351d84f5fce32130668a5792d134b (patch) | |
tree | c46dc6fb7636fd7c2185e1f855f1dd582512fcc4 /tests/ResourceAllocatorTest.cpp | |
parent | 3167aa0c9c84cab1b0252031166e4a345e2afe2d (diff) |
Funnel most proxy creation through GrProxyProvider
This is to provide a choke point for DDL to create Lazy Proxies.
Change-Id: If178da13bc6447b31b7601810236d34502d9efbd
Reviewed-on: https://skia-review.googlesource.com/93303
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'tests/ResourceAllocatorTest.cpp')
-rw-r--r-- | tests/ResourceAllocatorTest.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/ResourceAllocatorTest.cpp b/tests/ResourceAllocatorTest.cpp index 8d196f6ba2..6ca4b0cf5c 100644 --- a/tests/ResourceAllocatorTest.cpp +++ b/tests/ResourceAllocatorTest.cpp @@ -14,6 +14,7 @@ #include "GrContextPriv.h" #include "GrGpu.h" +#include "GrProxyProvider.h" #include "GrResourceAllocator.h" #include "GrResourceProvider.h" #include "GrSurfaceProxyPriv.h" @@ -40,18 +41,18 @@ static sk_sp<GrSurfaceProxy> make_deferred(GrProxyProvider* proxyProvider, const desc.fConfig = p.fConfig; desc.fSampleCnt = p.fSampleCnt; - return GrSurfaceProxy::MakeDeferred(proxyProvider, desc, p.fFit, SkBudgeted::kNo); + return proxyProvider->createProxy(desc, p.fFit, SkBudgeted::kNo); } static sk_sp<GrSurfaceProxy> make_backend(GrContext* context, const ProxyParams& p, GrBackendTexture* backendTex) { + GrProxyProvider* proxyProvider = context->contextPriv().proxyProvider(); + *backendTex = context->getGpu()->createTestingOnlyBackendTexture(nullptr, p.fSize, p.fSize, p.fConfig, false, GrMipMapped::kNo); - sk_sp<GrSurface> tex = context->resourceProvider()->wrapBackendTexture(*backendTex, - kBorrow_GrWrapOwnership); - return GrSurfaceProxy::MakeWrapped(std::move(tex), p.fOrigin); + return proxyProvider->createWrappedTextureProxy(*backendTex, p.fOrigin); } static void cleanup_backend(GrContext* context, GrBackendTexture* backendTex) { |