Index: cc/resources/bitmap_content_layer_updater.cc |
diff --git a/cc/resources/bitmap_content_layer_updater.cc b/cc/resources/bitmap_content_layer_updater.cc |
index 26aee92cbfcd45a559dfd811bbdd207164a643c6..7168c54f61e3141d1fce735780bbb2654f85b83c 100644 |
--- a/cc/resources/bitmap_content_layer_updater.cc |
+++ b/cc/resources/bitmap_content_layer_updater.cc |
@@ -66,8 +66,12 @@ void BitmapContentLayerUpdater::PrepareToUpdate( |
devtools_instrumentation::ScopedLayerTask paint_setup( |
devtools_instrumentation::kPaintSetup, layer_id_); |
canvas_size_ = content_rect.size(); |
- canvas_ = skia::AdoptRef(skia::CreateBitmapCanvas( |
- canvas_size_.width(), canvas_size_.height(), layer_is_opaque_)); |
+ bitmap_backing_.setConfig( |
+ SkBitmap::kARGB_8888_Config, |
+ canvas_size_.width(), canvas_size_.height(), |
+ 0, layer_is_opaque_ ? kOpaque_SkAlphaType : kPremul_SkAlphaType); |
+ bitmap_backing_.allocPixels(); |
+ canvas_ = skia::AdoptRef(new SkCanvas(bitmap_backing_)); |
} |
base::TimeTicks start_time = |