Index: ui/gfx/canvas_skia.cc |
=================================================================== |
--- ui/gfx/canvas_skia.cc (revision 127021) |
+++ ui/gfx/canvas_skia.cc (working copy) |
@@ -54,6 +54,12 @@ |
: owned_canvas_(new skia::PlatformCanvas(size.width(), size.height(), |
is_opaque)), |
canvas_(owned_canvas_.get()) { |
+#if defined(OS_WIN) || defined(OS_MACOSX) |
+ // skia::PlatformCanvas instances are initialized to 0 by Cairo on Linux, but |
+ // uninitialized on Win and Mac. |
+ if (!is_opaque) |
+ owned_canvas_->clear(SkColorSetARGB(0, 0, 0, 0)); |
+#endif |
} |
CanvasSkia::CanvasSkia(const SkBitmap& bitmap, bool is_opaque) |