aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrSurfaceProxy.cpp
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2018-01-17 11:40:14 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-01-17 17:04:26 +0000
commit777707be8445b7d2f9cb235cd040cd1994dd2996 (patch)
tree3b7ee9039c39b1c77e75e6a880210f5a856a146b /src/gpu/GrSurfaceProxy.cpp
parent95379ebc0dfa6fe5af14dbebe251aec43c5ce919 (diff)
Move GrSurfaceProxy::MakeLazy to GrProxyProvider::createLazy
This is pretty much a straight up move of the GrSurfaceProxy code with some plumbing to get the ProxyProvider in the right places. Change-Id: I63cecb242dada503f97dbd1c0ce7ede75323100d Reviewed-on: https://skia-review.googlesource.com/94200 Reviewed-by: Greg Daniel <egdaniel@google.com> Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/GrSurfaceProxy.cpp')
-rw-r--r--src/gpu/GrSurfaceProxy.cpp31
1 files changed, 0 insertions, 31 deletions
diff --git a/src/gpu/GrSurfaceProxy.cpp b/src/gpu/GrSurfaceProxy.cpp
index 0408b79c91..828b936c8b 100644
--- a/src/gpu/GrSurfaceProxy.cpp
+++ b/src/gpu/GrSurfaceProxy.cpp
@@ -250,37 +250,6 @@ sk_sp<GrTextureProxy> GrSurfaceProxy::MakeWrapped(sk_sp<GrTexture> tex, GrSurfac
}
}
-sk_sp<GrTextureProxy> GrSurfaceProxy::MakeLazy(LazyInstantiateCallback&& callback,
- const GrSurfaceDesc& desc,
- GrMipMapped mipMapped,
- SkBackingFit fit,
- SkBudgeted budgeted) {
- SkASSERT((desc.fWidth <= 0 && desc.fHeight <= 0) ||
- (desc.fWidth > 0 && desc.fHeight > 0));
- uint32_t flags = GrResourceProvider::kNoPendingIO_Flag;
- return sk_sp<GrTextureProxy>(SkToBool(kRenderTarget_GrSurfaceFlag & desc.fFlags) ?
- new GrTextureRenderTargetProxy(std::move(callback), desc,
- mipMapped, fit, budgeted, flags) :
- new GrTextureProxy(std::move(callback), desc, mipMapped, fit,
- budgeted, flags));
-}
-
-sk_sp<GrTextureProxy> GrSurfaceProxy::MakeFullyLazy(LazyInstantiateCallback&& callback,
- Renderable renderable, GrPixelConfig config) {
- GrSurfaceDesc desc;
- if (Renderable::kYes == renderable) {
- desc.fFlags = kRenderTarget_GrSurfaceFlag;
- }
- desc.fOrigin = kTopLeft_GrSurfaceOrigin;
- desc.fWidth = -1;
- desc.fHeight = -1;
- desc.fConfig = config;
- desc.fSampleCnt = 0;
-
- return MakeLazy(std::move(callback), desc, GrMipMapped::kNo, SkBackingFit::kApprox,
- SkBudgeted::kYes);
-}
-
int GrSurfaceProxy::worstCaseWidth() const {
SkASSERT(LazyState::kFully != this->lazyInstantiationState());
if (fTarget) {