aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrOnFlushResourceProvider.cpp
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2018-02-14 11:09:57 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-02-14 16:31:47 +0000
commit7d79e7b588e8286edee853e2c274a6daa48d88d1 (patch)
tree797350c6fc7ea8eed92f4088294ce96c7250182d /src/gpu/GrOnFlushResourceProvider.cpp
parent5b6fa82ee12bcebbb5bced07347a6d113a0d87fd (diff)
Use a lazy proxy in OnFlushCallbackTest to fulfill some old TODOs
Change-Id: I194e38c87c2f341f16a5048f02027165d7c28ae9 Reviewed-on: https://skia-review.googlesource.com/107022 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'src/gpu/GrOnFlushResourceProvider.cpp')
-rw-r--r--src/gpu/GrOnFlushResourceProvider.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gpu/GrOnFlushResourceProvider.cpp b/src/gpu/GrOnFlushResourceProvider.cpp
index ba80631ad1..32fb3a959b 100644
--- a/src/gpu/GrOnFlushResourceProvider.cpp
+++ b/src/gpu/GrOnFlushResourceProvider.cpp
@@ -53,8 +53,6 @@ sk_sp<GrRenderTargetContext> GrOnFlushResourceProvider::makeRenderTargetContext(
return renderTargetContext;
}
-// TODO: we only need this entry point as long as we have to pre-allocate the atlas.
-// Remove it ASAP.
sk_sp<GrRenderTargetContext> GrOnFlushResourceProvider::makeRenderTargetContext(
sk_sp<GrSurfaceProxy> proxy,
sk_sp<SkColorSpace> colorSpace,
@@ -85,6 +83,10 @@ sk_sp<GrRenderTargetContext> GrOnFlushResourceProvider::makeRenderTargetContext(
bool GrOnFlushResourceProvider::instatiateProxy(GrSurfaceProxy* proxy) {
auto resourceProvider = fDrawingMgr->getContext()->contextPriv().resourceProvider();
+ if (GrSurfaceProxy::LazyState::kNot != proxy->lazyInstantiationState()) {
+ return proxy->priv().doLazyInstantiation(resourceProvider);
+ }
+
return proxy->instantiate(resourceProvider);
}