diff options
Diffstat (limited to 'src/image')
-rw-r--r-- | src/image/SkImage.cpp | 11 | ||||
-rw-r--r-- | src/image/SkImage_Base.h | 6 | ||||
-rw-r--r-- | src/image/SkImage_Gpu.cpp | 40 | ||||
-rw-r--r-- | src/image/SkImage_Gpu.h | 4 | ||||
-rw-r--r-- | src/image/SkSurface.cpp | 10 | ||||
-rw-r--r-- | src/image/SkSurface_Base.h | 10 | ||||
-rw-r--r-- | src/image/SkSurface_Gpu.cpp | 23 | ||||
-rw-r--r-- | src/image/SkSurface_Gpu.h | 5 |
8 files changed, 0 insertions, 109 deletions
diff --git a/src/image/SkImage.cpp b/src/image/SkImage.cpp index 3be804fca8..72285bd698 100644 --- a/src/image/SkImage.cpp +++ b/src/image/SkImage.cpp @@ -163,13 +163,6 @@ GrTexture* SkImage::getTexture() const { bool SkImage::isTextureBacked() const { return SkToBool(as_IB(this)->peekProxy()); } -#ifdef SK_SUPPORT_LEGACY_BACKEND_OBJECTS -GrBackendObject SkImage::getTextureHandle(bool flushPendingGrContextIO, - GrSurfaceOrigin* origin) const { - return as_IB(this)->onGetTextureHandle(flushPendingGrContextIO, origin); -} -#endif - GrBackendTexture SkImage::getBackendTexture(bool flushPendingGrContextIO, GrSurfaceOrigin* origin) const { return as_IB(this)->onGetBackendTexture(flushPendingGrContextIO, origin); @@ -188,10 +181,6 @@ GrTexture* SkImage::getTexture() const { return nullptr; } bool SkImage::isTextureBacked() const { return false; } -#ifdef SK_SUPPORT_LEGACY_BACKEND_OBJECTS -GrBackendObject SkImage::getTextureHandle(bool, GrSurfaceOrigin*) const { return 0; } -#endif - GrBackendTexture SkImage::getBackendTexture(bool flushPendingGrContextIO, GrSurfaceOrigin* origin) const { return GrBackendTexture(); // invalid diff --git a/src/image/SkImage_Base.h b/src/image/SkImage_Base.h index 47df69928e..2049fb3561 100644 --- a/src/image/SkImage_Base.h +++ b/src/image/SkImage_Base.h @@ -55,12 +55,6 @@ public: virtual sk_sp<GrTextureProxy> refPinnedTextureProxy(uint32_t* uniqueID) const { return nullptr; } -#ifdef SK_SUPPORT_LEGACY_BACKEND_OBJECTS - virtual GrBackendObject onGetTextureHandle(bool flushPendingGrContextIO, - GrSurfaceOrigin* origin) const { - return 0; - } -#endif virtual GrTexture* onGetTexture() const { return nullptr; } #endif 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); diff --git a/src/image/SkImage_Gpu.h b/src/image/SkImage_Gpu.h index 1425c875ce..cb9a7c7a9f 100644 --- a/src/image/SkImage_Gpu.h +++ b/src/image/SkImage_Gpu.h @@ -50,10 +50,6 @@ public: return fProxy; } -#ifdef SK_SUPPORT_LEGACY_BACKEND_OBJECTS - GrBackendObject onGetTextureHandle(bool flushPendingGrContextIO, - GrSurfaceOrigin* origin) const override; -#endif GrBackendTexture onGetBackendTexture(bool flushPendingGrContextIO, GrSurfaceOrigin* origin) const override; diff --git a/src/image/SkSurface.cpp b/src/image/SkSurface.cpp index 73f3175ab9..1a3eb4312e 100644 --- a/src/image/SkSurface.cpp +++ b/src/image/SkSurface.cpp @@ -218,16 +218,6 @@ void SkSurface::writePixels(const SkBitmap& src, int x, int y) { } } -#ifdef SK_SUPPORT_LEGACY_BACKEND_OBJECTS -GrBackendObject SkSurface::getTextureHandle(BackendHandleAccess access) { - return asSB(this)->onGetTextureHandle(access); -} - -bool SkSurface::getRenderTargetHandle(GrBackendObject* obj, BackendHandleAccess access) { - return asSB(this)->onGetRenderTargetHandle(obj, access); -} -#endif - GrBackendTexture SkSurface::getBackendTexture(BackendHandleAccess access) { return asSB(this)->onGetBackendTexture(access); } diff --git a/src/image/SkSurface_Base.h b/src/image/SkSurface_Base.h index 90bcdff1dd..67d330f9bb 100644 --- a/src/image/SkSurface_Base.h +++ b/src/image/SkSurface_Base.h @@ -19,16 +19,6 @@ public: SkSurface_Base(const SkImageInfo&, const SkSurfaceProps*); virtual ~SkSurface_Base(); -#ifdef SK_SUPPORT_LEGACY_BACKEND_OBJECTS - virtual GrBackendObject onGetTextureHandle(BackendHandleAccess) { - return 0; - } - - virtual bool onGetRenderTargetHandle(GrBackendObject*, BackendHandleAccess) { - return false; - } -#endif - virtual GrBackendTexture onGetBackendTexture(BackendHandleAccess); virtual GrBackendRenderTarget onGetBackendRenderTarget(BackendHandleAccess); diff --git a/src/image/SkSurface_Gpu.cpp b/src/image/SkSurface_Gpu.cpp index b4e6acf0c2..2f7b039488 100644 --- a/src/image/SkSurface_Gpu.cpp +++ b/src/image/SkSurface_Gpu.cpp @@ -51,29 +51,6 @@ static GrRenderTarget* prepare_rt_for_external_access(SkSurface_Gpu* surface, return rtc->accessRenderTarget(); } -#ifdef SK_SUPPORT_LEGACY_BACKEND_OBJECTS -GrBackendObject SkSurface_Gpu::onGetTextureHandle(BackendHandleAccess access) { - GrRenderTarget* rt = prepare_rt_for_external_access(this, access); - if (!rt) { - return 0; - } - GrTexture* texture = rt->asTexture(); - if (texture) { - return texture->getTextureHandle(); - } - return 0; -} - -bool SkSurface_Gpu::onGetRenderTargetHandle(GrBackendObject* obj, BackendHandleAccess access) { - GrRenderTarget* rt = prepare_rt_for_external_access(this, access); - if (!rt) { - return false; - } - *obj = rt->getRenderTargetHandle(); - return true; -} -#endif - GrBackendTexture SkSurface_Gpu::onGetBackendTexture(BackendHandleAccess access) { GrRenderTarget* rt = prepare_rt_for_external_access(this, access); if (!rt) { diff --git a/src/image/SkSurface_Gpu.h b/src/image/SkSurface_Gpu.h index fc014c2cd2..97fe5e5d5a 100644 --- a/src/image/SkSurface_Gpu.h +++ b/src/image/SkSurface_Gpu.h @@ -23,11 +23,6 @@ public: // This is an internal-only factory static sk_sp<SkSurface> MakeWrappedRenderTarget(GrContext*, sk_sp<GrRenderTargetContext>); -#ifdef SK_SUPPORT_LEGACY_BACKEND_OBJECTS - GrBackendObject onGetTextureHandle(BackendHandleAccess) override; - bool onGetRenderTargetHandle(GrBackendObject*, BackendHandleAccess) override; -#endif - GrBackendTexture onGetBackendTexture(BackendHandleAccess) override; GrBackendRenderTarget onGetBackendRenderTarget(BackendHandleAccess) override; |