Chromium Code Reviews| Index: src/gpu/SkGpuDevice.cpp |
| diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp |
| index 3c91101b346376b50e190079e5a19c1ac1057f51..e0aec4b6ee3dcff5b1641ebce6ad70813bd9d56a 100644 |
| --- a/src/gpu/SkGpuDevice.cpp |
| +++ b/src/gpu/SkGpuDevice.cpp |
| @@ -138,13 +138,12 @@ static SkBitmap::Config grConfig2skConfig(GrPixelConfig config, bool* isOpaque) |
| } |
| static SkBitmap make_bitmap(GrContext* context, GrRenderTarget* renderTarget) { |
| - GrPixelConfig config = renderTarget->config(); |
| - |
| bool isOpaque; |
| + SkBitmap::Config config = grConfig2skConfig(renderTarget->config(), &isOpaque); |
| + |
| SkBitmap bitmap; |
| - bitmap.setConfig(grConfig2skConfig(config, &isOpaque), |
| - renderTarget->width(), renderTarget->height()); |
| - bitmap.setIsOpaque(isOpaque); |
| + bitmap.setConfig(config, renderTarget->width(), renderTarget->height(), 0, |
| + isOpaque ? kOpaque_SkAlphaType : kPremul_SkAlphaType); |
|
scroggo
2013/10/18 20:04:34
This seems to not be very future proof once we act
reed1
2013/10/18 21:37:35
Render targets don't support unpremul
|
| return bitmap; |
| } |