Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3583)

Unified Diff: cc/resources/bitmap_content_layer_updater.cc

Issue 80063002: Use SkBitmap backing instead of GDI backed platform canvas for tiles (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/resources/bitmap_content_layer_updater.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 =
« no previous file with comments | « cc/resources/bitmap_content_layer_updater.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698