diff options
author | Greg Daniel <egdaniel@google.com> | 2017-04-18 15:52:36 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-04-18 20:33:58 +0000 |
commit | 9440345a81d6c2372ac0aed937080f3da67439dd (patch) | |
tree | 6db32e47129a4469dff10d0f980d29a4d04b07ef /src/image/SkSurface.cpp | |
parent | 4d8adbccc46b53e44000c433dabade338eb35c6f (diff) |
Add backend safe classes for passing in external texture and render targets into gpu
This CL adds the GrBackend* classes as well as just updates the API for SkSurface and
SkImage. The implementation on SkSurface/Image and the plumbing down into Ganesh will
be in an additional CL.
Besides the change to use the type safe classes, we also pull the SurfaceFlags, origin,
samples, out of the descriptor and pass those in directly.
Bug: skia:
Change-Id: I9702981fe26c3d5d7d2cbcf6977ba569d356d854
Reviewed-on: https://skia-review.googlesource.com/13122
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/image/SkSurface.cpp')
-rw-r--r-- | src/image/SkSurface.cpp | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/src/image/SkSurface.cpp b/src/image/SkSurface.cpp index 55aab3e992..cd2a5f185f 100644 --- a/src/image/SkSurface.cpp +++ b/src/image/SkSurface.cpp @@ -201,6 +201,12 @@ sk_sp<SkSurface> SkSurface::MakeFromBackendTexture(GrContext*, const GrBackendTe return nullptr; } +sk_sp<SkSurface> SkSurface::MakeFromBackendTexture(GrContext*, const GrBackendTexture&, + GrSurfaceOrigin origin, int sampleCnt, + sk_sp<SkColorSpace>, const SkSurfaceProps*) { + return nullptr; +} + sk_sp<SkSurface> SkSurface::MakeFromBackendRenderTarget(GrContext*, const GrBackendRenderTargetDesc&, sk_sp<SkColorSpace>, @@ -208,8 +214,27 @@ sk_sp<SkSurface> SkSurface::MakeFromBackendRenderTarget(GrContext*, return nullptr; } -sk_sp<SkSurface> MakeFromBackendTextureAsRenderTarget(GrContext*, const GrBackendTextureDesc&, - sk_sp<SkColorSpace>, const SkSurfaceProps*) { +sk_sp<SkSurface> SkSurface::MakeFromBackendRenderTarget(GrContext*, + const GrBackendRenderTarget&, + GrSurfaceOrigin origin, + sk_sp<SkColorSpace>, + const SkSurfaceProps*) { + return nullptr; +} + +sk_sp<SkSurface> SkSurface::MakeFromBackendTextureAsRenderTarget(GrContext*, + const GrBackendTextureDesc&, + sk_sp<SkColorSpace>, + const SkSurfaceProps*) { + return nullptr; +} + +sk_sp<SkSurface> SkSurface::MakeFromBackendTextureAsRenderTarget(GrContext*, + const GrBackendTexture&, + GrSurfaceOrigin origin, + int sampleCnt, + sk_sp<SkColorSpace>, + const SkSurfaceProps*) { return nullptr; } |