aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/image/SkImage_Gpu.cpp
diff options
context:
space:
mode:
authorGravatar Greg Daniel <egdaniel@google.com>2018-05-03 16:54:03 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-05-21 18:25:38 +0000
commit6d138bf681eee54a8b4a40e5dbbd08a137ae0d93 (patch)
tree7eb05a8c09ad212fc9a693296287f2b62b2f99f8 /src/image/SkImage_Gpu.cpp
parentbe3c1d22c7d3e18cee9f1697827392e16b436df2 (diff)
Reland "Remove GrBackendObject and all related functions from Skia."
This is a reland of ccd4cfc23ebbbecbc6b292359352aad335ad7b73 Original change's description: > 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> Bug: skia: Change-Id: Ibd1b9bd04b36840d9d872e2f0970dd6bac378bc9 Reviewed-on: https://skia-review.googlesource.com/129380 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'src/image/SkImage_Gpu.cpp')
-rw-r--r--src/image/SkImage_Gpu.cpp40
1 files changed, 0 insertions, 40 deletions
diff --git a/src/image/SkImage_Gpu.cpp b/src/image/SkImage_Gpu.cpp
index 62b97ae131..40e055e520 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);