aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/ops
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 /src/gpu/ops
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 'src/gpu/ops')
-rw-r--r--src/gpu/ops/GrTextureOp.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gpu/ops/GrTextureOp.cpp b/src/gpu/ops/GrTextureOp.cpp
index 6d735f51af..6e2e430a4d 100644
--- a/src/gpu/ops/GrTextureOp.cpp
+++ b/src/gpu/ops/GrTextureOp.cpp
@@ -793,6 +793,7 @@ std::unique_ptr<GrDrawOp> Make(sk_sp<GrTextureProxy> proxy, GrSamplerState::Filt
#if GR_TEST_UTILS
#include "GrContext.h"
#include "GrContextPriv.h"
+#include "GrProxyProvider.h"
GR_DRAW_OP_TEST_DEFINE(TextureOp) {
GrSurfaceDesc desc;
@@ -801,9 +802,10 @@ GR_DRAW_OP_TEST_DEFINE(TextureOp) {
desc.fWidth = random->nextULessThan(90) + 10;
desc.fOrigin = random->nextBool() ? kTopLeft_GrSurfaceOrigin : kBottomLeft_GrSurfaceOrigin;
SkBackingFit fit = random->nextBool() ? SkBackingFit::kApprox : SkBackingFit::kExact;
- sk_sp<GrTextureProxy> proxy = GrSurfaceProxy::MakeDeferred(
- context->contextPriv().proxyProvider(),
- desc, fit, SkBudgeted::kNo);
+
+ GrProxyProvider* proxyProvider = context->contextPriv().proxyProvider();
+ sk_sp<GrTextureProxy> proxy = proxyProvider->createProxy(desc, fit, SkBudgeted::kNo);
+
SkRect rect = GrTest::TestRect(random);
SkRect srcRect;
srcRect.fLeft = random->nextRangeScalar(0.f, proxy->width() / 2.f);