aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/image
diff options
context:
space:
mode:
authorGravatar Greg Daniel <egdaniel@google.com>2017-04-27 18:48:15 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-04-27 18:48:19 +0000
commite3bd422fafc74dd3410c3de24a576635be92c3b4 (patch)
tree63bc3f6768299f8e4dde996df333ea4022855efe /src/image
parentdf7e075c74110fcfebdc49ca503684162e118af5 (diff)
Revert "Plumb the use of GrBackendRenderTarget throughout Skia"
This reverts commit fdd77daedbba3b7c53be74a82fb9fae891b51696. Reason for revert: Apparently I have a few more build files to update before this can land. Original change's description: > Plumb the use of GrBackendRenderTarget throughout Skia > > Bug: skia: > Change-Id: Ib99a58d9552f5c7b8d77c09dcc72fa88326c26aa > Reviewed-on: https://skia-review.googlesource.com/14148 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Reviewed-by: Robert Phillips <robertphillips@google.com> > Commit-Queue: Greg Daniel <egdaniel@google.com> > TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I984e1909870182474c4c3cce257f01b6a9d8581f Reviewed-on: https://skia-review.googlesource.com/14531 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'src/image')
-rw-r--r--src/image/SkSurface_Gpu.cpp33
1 files changed, 13 insertions, 20 deletions
diff --git a/src/image/SkSurface_Gpu.cpp b/src/image/SkSurface_Gpu.cpp
index 5001811cea..96ac31e16c 100644
--- a/src/image/SkSurface_Gpu.cpp
+++ b/src/image/SkSurface_Gpu.cpp
@@ -261,36 +261,19 @@ sk_sp<SkSurface> SkSurface::MakeFromBackendRenderTarget(GrContext* context,
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,
- const SkSurfaceProps* props) {
- if (!context) {
- return nullptr;
- }
- if (!SkSurface_Gpu::Valid(context, backendRT.config(), colorSpace.get())) {
+ if (!SkSurface_Gpu::Valid(context, desc.fConfig, colorSpace.get())) {
return nullptr;
}
sk_sp<GrRenderTargetContext> rtc(
- context->contextPriv().makeBackendRenderTargetRenderTargetContext(backendRT,
- origin,
+ context->contextPriv().makeBackendRenderTargetRenderTargetContext(desc,
std::move(colorSpace),
props));
if (!rtc) {
return nullptr;
}
- sk_sp<SkGpuDevice> device(SkGpuDevice::Make(context, std::move(rtc),
- backendRT.width(), backendRT.height(),
+ sk_sp<SkGpuDevice> device(SkGpuDevice::Make(context, std::move(rtc), desc.fWidth, desc.fHeight,
SkGpuDevice::kUninit_InitContents));
if (!device) {
return nullptr;
@@ -299,6 +282,16 @@ sk_sp<SkSurface> SkSurface::MakeFromBackendRenderTarget(GrContext* context,
return sk_make_sp<SkSurface_Gpu>(std::move(device));
}
+sk_sp<SkSurface> SkSurface::MakeFromBackendRenderTarget(GrContext*,
+ const GrBackendRenderTarget&,
+ GrSurfaceOrigin origin,
+ sk_sp<SkColorSpace>,
+ const SkSurfaceProps*) {
+ // This function is not implemented yet
+ sk_throw();
+ return nullptr;
+}
+
sk_sp<SkSurface> SkSurface::MakeFromBackendTextureAsRenderTarget(GrContext* context,
const GrBackendTextureDesc& desc,
sk_sp<SkColorSpace> colorSpace,