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

Unified Diff: trunk/src/ui/compositor/layer_unittest.cc

Issue 100923002: Revert 225751 "BitmapContentLayerUpdater shouldn't reallocate bi..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years 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 | « trunk/src/cc/resources/skpicture_content_layer_updater.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/ui/compositor/layer_unittest.cc
===================================================================
--- trunk/src/ui/compositor/layer_unittest.cc (revision 238278)
+++ trunk/src/ui/compositor/layer_unittest.cc (working copy)
@@ -180,9 +180,8 @@
// Overridden from LayerDelegate:
virtual void OnPaintLayer(gfx::Canvas* canvas) OVERRIDE {
- SkIRect clip_bounds;
- canvas->sk_canvas()->getClipDeviceBounds(&clip_bounds);
- paint_size_ = gfx::Size(clip_bounds.width(), clip_bounds.height());
+ gfx::ImageSkiaRep contents = canvas->ExtractImageRep();
+ paint_size_ = gfx::Size(contents.pixel_width(), contents.pixel_height());
canvas->FillRect(gfx::Rect(paint_size_), colors_[color_index_]);
color_index_ = (color_index_ + 1) % static_cast<int>(colors_.size());
const SkMatrix& matrix = canvas->sk_canvas()->getTotalMatrix();
« no previous file with comments | « trunk/src/cc/resources/skpicture_content_layer_updater.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698