diff options
Diffstat (limited to 'src/image')
-rw-r--r-- | src/image/SkSurface.cpp | 7 | ||||
-rw-r--r-- | src/image/SkSurface_Gpu.cpp | 14 |
2 files changed, 21 insertions, 0 deletions
diff --git a/src/image/SkSurface.cpp b/src/image/SkSurface.cpp index e0a058093b..d7fa60589a 100644 --- a/src/image/SkSurface.cpp +++ b/src/image/SkSurface.cpp @@ -241,6 +241,13 @@ sk_sp<SkSurface> SkSurface::MakeFromBackendTexture(GrContext*, const GrBackendTe } sk_sp<SkSurface> SkSurface::MakeFromBackendRenderTarget(GrContext*, + const GrBackendRenderTargetDesc&, + sk_sp<SkColorSpace>, + const SkSurfaceProps*) { + return nullptr; +} + +sk_sp<SkSurface> SkSurface::MakeFromBackendRenderTarget(GrContext*, const GrBackendRenderTarget&, GrSurfaceOrigin origin, sk_sp<SkColorSpace>, diff --git a/src/image/SkSurface_Gpu.cpp b/src/image/SkSurface_Gpu.cpp index 5b51942b38..143a6039f0 100644 --- a/src/image/SkSurface_Gpu.cpp +++ b/src/image/SkSurface_Gpu.cpp @@ -233,6 +233,20 @@ sk_sp<SkSurface> SkSurface::MakeFromBackendTexture(GrContext* context, const GrB } sk_sp<SkSurface> SkSurface::MakeFromBackendRenderTarget(GrContext* context, + const GrBackendRenderTargetDesc& desc, + sk_sp<SkColorSpace> colorSpace, + const SkSurfaceProps* props) { + if (!context) { + return nullptr; + } + + GrBackendRenderTarget backendRT(desc, context->contextPriv().getBackend()); + return MakeFromBackendRenderTarget(context, backendRT, desc.fOrigin, + std::move(colorSpace), props); + +} + +sk_sp<SkSurface> SkSurface::MakeFromBackendRenderTarget(GrContext* context, const GrBackendRenderTarget& backendRT, GrSurfaceOrigin origin, sk_sp<SkColorSpace> colorSpace, |