| Index: src/gpu/SkGpuDevice.cpp
|
| diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
|
| index f8033ec12f99406a6f6db3c14131860ed5464b75..a58b7d10f90796a116181296e35a59f2ee67d227 100644
|
| --- a/src/gpu/SkGpuDevice.cpp
|
| +++ b/src/gpu/SkGpuDevice.cpp
|
| @@ -127,8 +127,8 @@ bool SkGpuDevice::CheckAlphaTypeAndGetFlags(
|
| return true;
|
| }
|
|
|
| -sk_sp<SkGpuDevice> SkGpuDevice::Make(sk_sp<GrRenderTarget> rt, const SkSurfaceProps* props,
|
| - InitContents init) {
|
| +sk_sp<SkGpuDevice> SkGpuDevice::Make(sk_sp<GrRenderTarget> rt, sk_sp<SkColorSpace> colorSpace,
|
| + const SkSurfaceProps* props, InitContents init) {
|
| if (!rt || rt->wasDestroyed() || !rt->getContext()) {
|
| return nullptr;
|
| }
|
| @@ -142,7 +142,8 @@ sk_sp<SkGpuDevice> SkGpuDevice::Make(sk_sp<GrRenderTarget> rt, const SkSurfacePr
|
|
|
| GrContext* context = rt->getContext();
|
|
|
| - sk_sp<GrDrawContext> drawContext(context->drawContext(std::move(rt), props));
|
| + sk_sp<GrDrawContext> drawContext(context->drawContext(std::move(rt), std::move(colorSpace),
|
| + props));
|
| return sk_sp<SkGpuDevice>(new SkGpuDevice(std::move(drawContext), width, height, flags));
|
| }
|
|
|
| @@ -229,7 +230,7 @@ sk_sp<GrDrawContext> SkGpuDevice::CreateDrawContext(GrContext* context,
|
|
|
| return context->newDrawContext(SkBackingFit::kExact, // Why exact?
|
| origInfo.width(), origInfo.height(),
|
| - config, sampleCount,
|
| + config, sk_ref_sp(cs), sampleCount,
|
| kDefault_GrSurfaceOrigin, surfaceProps, budgeted);
|
| }
|
|
|
| @@ -1868,6 +1869,7 @@ SkBaseDevice* SkGpuDevice::onCreateDevice(const CreateInfo& cinfo, const SkPaint
|
| sk_sp<GrDrawContext> dc(fContext->newDrawContext(fit,
|
| cinfo.fInfo.width(), cinfo.fInfo.height(),
|
| fDrawContext->config(),
|
| + sk_ref_sp(fDrawContext->getColorSpace()),
|
| fDrawContext->desc().fSampleCnt,
|
| kDefault_GrSurfaceOrigin,
|
| &props));
|
|
|