| Index: src/image/SkSurface_Gpu.cpp
|
| diff --git a/src/image/SkSurface_Gpu.cpp b/src/image/SkSurface_Gpu.cpp
|
| index fa3781476fb4c41d802c4183de26868aa13f4184..75017e954e09f210a32469056a4113bb5bfc5332 100644
|
| --- a/src/image/SkSurface_Gpu.cpp
|
| +++ b/src/image/SkSurface_Gpu.cpp
|
| @@ -134,9 +134,11 @@ void SkSurface_Gpu::onPrepareForExternalIO() {
|
| ///////////////////////////////////////////////////////////////////////////////
|
|
|
| sk_sp<SkSurface> SkSurface::MakeRenderTargetDirect(GrRenderTarget* target,
|
| + sk_sp<SkColorSpace> colorSpace,
|
| const SkSurfaceProps* props) {
|
| sk_sp<SkGpuDevice> device(
|
| - SkGpuDevice::Make(sk_ref_sp(target), props, SkGpuDevice::kUninit_InitContents));
|
| + SkGpuDevice::Make(sk_ref_sp(target), std::move(colorSpace), props,
|
| + SkGpuDevice::kUninit_InitContents));
|
| if (!device) {
|
| return nullptr;
|
| }
|
| @@ -156,6 +158,7 @@ sk_sp<SkSurface> SkSurface::MakeRenderTarget(GrContext* ctx, SkBudgeted budgeted
|
|
|
| sk_sp<SkSurface> SkSurface::MakeFromBackendTexture(GrContext* context,
|
| const GrBackendTextureDesc& desc,
|
| + sk_sp<SkColorSpace> colorSpace,
|
| const SkSurfaceProps* props) {
|
| if (nullptr == context) {
|
| return nullptr;
|
| @@ -168,7 +171,8 @@ sk_sp<SkSurface> SkSurface::MakeFromBackendTexture(GrContext* context,
|
| if (!surface) {
|
| return nullptr;
|
| }
|
| - sk_sp<SkGpuDevice> device(SkGpuDevice::Make(sk_ref_sp(surface->asRenderTarget()), props,
|
| + sk_sp<SkGpuDevice> device(SkGpuDevice::Make(sk_ref_sp(surface->asRenderTarget()),
|
| + std::move(colorSpace), props,
|
| SkGpuDevice::kUninit_InitContents));
|
| if (!device) {
|
| return nullptr;
|
| @@ -178,6 +182,7 @@ sk_sp<SkSurface> SkSurface::MakeFromBackendTexture(GrContext* context,
|
|
|
| sk_sp<SkSurface> SkSurface::MakeFromBackendRenderTarget(GrContext* context,
|
| const GrBackendRenderTargetDesc& desc,
|
| + sk_sp<SkColorSpace> colorSpace,
|
| const SkSurfaceProps* props) {
|
| if (!context) {
|
| return nullptr;
|
| @@ -186,7 +191,7 @@ sk_sp<SkSurface> SkSurface::MakeFromBackendRenderTarget(GrContext* context,
|
| if (!rt) {
|
| return nullptr;
|
| }
|
| - sk_sp<SkGpuDevice> device(SkGpuDevice::Make(std::move(rt), props,
|
| + sk_sp<SkGpuDevice> device(SkGpuDevice::Make(std::move(rt), std::move(colorSpace), props,
|
| SkGpuDevice::kUninit_InitContents));
|
| if (!device) {
|
| return nullptr;
|
| @@ -196,6 +201,7 @@ sk_sp<SkSurface> SkSurface::MakeFromBackendRenderTarget(GrContext* context,
|
|
|
| sk_sp<SkSurface> SkSurface::MakeFromBackendTextureAsRenderTarget(GrContext* context,
|
| const GrBackendTextureDesc& desc,
|
| + sk_sp<SkColorSpace> colorSpace,
|
| const SkSurfaceProps* props) {
|
| if (!context) {
|
| return nullptr;
|
| @@ -204,7 +210,7 @@ sk_sp<SkSurface> SkSurface::MakeFromBackendTextureAsRenderTarget(GrContext* cont
|
| if (!rt) {
|
| return nullptr;
|
| }
|
| - sk_sp<SkGpuDevice> device(SkGpuDevice::Make(std::move(rt), props,
|
| + sk_sp<SkGpuDevice> device(SkGpuDevice::Make(std::move(rt), std::move(colorSpace), props,
|
| SkGpuDevice::kUninit_InitContents));
|
| if (!device) {
|
| return nullptr;
|
|
|