| Index: skia/ext/vector_platform_device_emf_win.cc
|
| diff --git a/skia/ext/vector_platform_device_emf_win.cc b/skia/ext/vector_platform_device_emf_win.cc
|
| index 1dd59d370c4b3c3e0bbe5bf49e532f0294b883ee..31059aff7bd3ecabeb2dc5e77dbf2668638acbdd 100644
|
| --- a/skia/ext/vector_platform_device_emf_win.cc
|
| +++ b/skia/ext/vector_platform_device_emf_win.cc
|
| @@ -81,20 +81,16 @@ SkBaseDevice* VectorPlatformDeviceEmf::create(HDC dc, int width, int height) {
|
| // VectorPlatformDeviceEmf has no way to detect this, so the HBITMAP
|
| // could be released while SkBitmap still has a reference to it. Be
|
| // cautious.
|
| - if (width == bitmap_data.bmWidth &&
|
| - height == bitmap_data.bmHeight) {
|
| - bitmap.setConfig(SkBitmap::kARGB_8888_Config,
|
| - bitmap_data.bmWidth,
|
| - bitmap_data.bmHeight,
|
| - bitmap_data.bmWidthBytes);
|
| - bitmap.setPixels(bitmap_data.bmBits);
|
| - succeeded = true;
|
| + if (width == bitmap_data.bmWidth && height == bitmap_data.bmHeight) {
|
| + SkImageInfo info = SkImageInfo::MakeN32Premul(width, height);
|
| + succeeded = bitmap.installPixels(info, bitmap_data.bmBits,
|
| + bitmap_data.bmWidthBytes);
|
| }
|
| }
|
| }
|
|
|
| if (!succeeded)
|
| - bitmap.setConfig(SkBitmap::kARGB_8888_Config, width, height);
|
| + bitmap.setInfo(SkImageInfo::MakeUnknown(width, height));
|
|
|
| return new VectorPlatformDeviceEmf(dc, bitmap);
|
| }
|
|
|