Index: components/arc/bitmap/bitmap_struct_traits.cc |
diff --git a/components/arc/bitmap/bitmap_struct_traits.cc b/components/arc/bitmap/bitmap_struct_traits.cc |
index 51aa30f44f0e41cff2c26d34867abdf878029199..c289a5cceca753294867608604d8b5a4c30e3ab4 100644 |
--- a/components/arc/bitmap/bitmap_struct_traits.cc |
+++ b/components/arc/bitmap/bitmap_struct_traits.cc |
@@ -30,7 +30,9 @@ bool StructTraits<arc::mojom::ArcBitmapDataView, SkBitmap>:: |
} |
// Copy the pixels with converting color type. |
- return bitmap.copyTo(out, kN32_SkColorType); |
+ SkImageInfo image_info = info.makeColorType(kN32_SkColorType); |
+ return out->tryAllocPixels(image_info) && |
+ bitmap.readPixels(image_info, out->getPixels(), out->rowBytes(), 0, 0); |
} |
} // namespace mojo |