diff options
author | Greg Daniel <egdaniel@google.com> | 2018-05-03 16:54:03 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-05-10 14:44:55 +0000 |
commit | ccd4cfc23ebbbecbc6b292359352aad335ad7b73 (patch) | |
tree | 88940d88f16be8fe4bd943e0264b4c9f4b531ad7 /src/image/SkImage_Gpu.cpp | |
parent | f77db110e1c4d2b813ed40de0cf63f65f84b4b64 (diff) |
Remove GrBackendObject and all related functions from Skia.
Bug: skia:
Change-Id: I59434b7477c0bc26fd982bd81eb97ab94bbba073
Reviewed-on: https://skia-review.googlesource.com/125822
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'src/image/SkImage_Gpu.cpp')
-rw-r--r-- | src/image/SkImage_Gpu.cpp | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/src/image/SkImage_Gpu.cpp b/src/image/SkImage_Gpu.cpp index 17a0a25f5a..08c9010228 100644 --- a/src/image/SkImage_Gpu.cpp +++ b/src/image/SkImage_Gpu.cpp @@ -162,46 +162,6 @@ static void apply_premul(const SkImageInfo& info, void* pixels, size_t rowBytes) } } -#ifdef SK_SUPPORT_LEGACY_BACKEND_OBJECTS -GrBackendObject SkImage_Gpu::onGetTextureHandle(bool flushPendingGrContextIO, - GrSurfaceOrigin* origin) const { - SkASSERT(fProxy); - - if (!fContext->contextPriv().resourceProvider() && !fProxy->priv().isInstantiated()) { - // This image was created with a DDL context and cannot be instantiated. Thus we return 0 - // here which is considered invalid for all backends. - return 0; - } - - if (GrSurfaceProxy::LazyState::kNot != fProxy->lazyInstantiationState()) { - SkASSERT(fContext->contextPriv().resourceProvider()); - fProxy->priv().doLazyInstantiation(fContext->contextPriv().resourceProvider()); - if (!fProxy->priv().isInstantiated()) { - // We failed to instantiate the lazy proxy. Thus we return 0 here which is considered - // invalid for all backends. - return 0; - } - } - - if (!fProxy->instantiate(fContext->contextPriv().resourceProvider())) { - return 0; - } - - GrTexture* texture = fProxy->priv().peekTexture(); - - if (texture) { - if (flushPendingGrContextIO) { - fContext->contextPriv().prepareSurfaceForExternalIO(fProxy.get()); - } - if (origin) { - *origin = fProxy->origin(); - } - return texture->getTextureHandle(); - } - return 0; -} -#endif - GrBackendTexture SkImage_Gpu::onGetBackendTexture(bool flushPendingGrContextIO, GrSurfaceOrigin* origin) const { SkASSERT(fProxy); |