aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/CopySurfaceTest.cpp
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2018-01-16 08:06:32 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-01-16 13:28:43 +0000
commit0bd24dc41f2351d84f5fce32130668a5792d134b (patch)
treec46dc6fb7636fd7c2185e1f855f1dd582512fcc4 /tests/CopySurfaceTest.cpp
parent3167aa0c9c84cab1b0252031166e4a345e2afe2d (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/CopySurfaceTest.cpp')
-rw-r--r--tests/CopySurfaceTest.cpp16
1 files changed, 5 insertions, 11 deletions
diff --git a/tests/CopySurfaceTest.cpp b/tests/CopySurfaceTest.cpp
index 0d9fc86460..1c31bbf485 100644
--- a/tests/CopySurfaceTest.cpp
+++ b/tests/CopySurfaceTest.cpp
@@ -11,6 +11,7 @@
#if SK_SUPPORT_GPU
#include "GrContext.h"
#include "GrContextPriv.h"
+#include "GrProxyProvider.h"
#include "GrResourceProvider.h"
#include "GrSurfaceContext.h"
#include "GrSurfaceProxy.h"
@@ -74,17 +75,10 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(CopySurface, reporter, ctxInfo) {
dstDesc.fOrigin = dOrigin;
dstDesc.fFlags = dFlags;
- sk_sp<GrTextureProxy> src(GrSurfaceProxy::MakeDeferred(
- proxyProvider,
- srcDesc, SkBudgeted::kNo,
- srcPixels.get(),
- kRowBytes));
-
- sk_sp<GrTextureProxy> dst(GrSurfaceProxy::MakeDeferred(
- proxyProvider,
- dstDesc, SkBudgeted::kNo,
- dstPixels.get(),
- kRowBytes));
+ sk_sp<GrTextureProxy> src = proxyProvider->createTextureProxy(
+ srcDesc, SkBudgeted::kNo, srcPixels.get(), kRowBytes);
+ sk_sp<GrTextureProxy> dst = proxyProvider->createTextureProxy(
+ dstDesc, SkBudgeted::kNo, dstPixels.get(), kRowBytes);
if (!src || !dst) {
ERRORF(reporter,
"Could not create surfaces for copy surface test.");