diff options
Diffstat (limited to 'src/gpu/SkGpuDevice.cpp')
-rw-r--r-- | src/gpu/SkGpuDevice.cpp | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp index 3e94d32956..845b22c3cc 100644 --- a/src/gpu/SkGpuDevice.cpp +++ b/src/gpu/SkGpuDevice.cpp @@ -163,21 +163,10 @@ sk_sp<GrRenderTargetContext> SkGpuDevice::MakeRenderTargetContext( return nullptr; } - SkColorType ct = origInfo.colorType(); - SkAlphaType at = origInfo.alphaType(); - SkColorSpace* cs = origInfo.colorSpace(); - if (kRGB_565_SkColorType == ct || kGray_8_SkColorType == ct) { - at = kOpaque_SkAlphaType; // force this setting - } - if (kOpaque_SkAlphaType != at) { - at = kPremul_SkAlphaType; // force this setting - } - - GrPixelConfig config = SkImageInfo2GrPixelConfig(ct, at, cs, *context->caps()); - + GrPixelConfig config = SkImageInfo2GrPixelConfig(origInfo, *context->caps()); return context->makeRenderTargetContext(SkBackingFit::kExact, // Why exact? origInfo.width(), origInfo.height(), - config, sk_ref_sp(cs), sampleCount, + config, sk_ref_sp(origInfo.colorSpace()), sampleCount, origin, surfaceProps, budgeted); } |