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

Unified Diff: ui/gfx/compositor/layer.cc

Issue 8422009: ui/gfx: Convert CreateCanvas to use gfx::Size. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 2 months 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 | « ui/gfx/canvas_skia.cc ('k') | ui/gfx/compositor/layer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/compositor/layer.cc
diff --git a/ui/gfx/compositor/layer.cc b/ui/gfx/compositor/layer.cc
index e9a9ed578dfdfde1fab4b94b0af6d50f9d396cec..116b338ff6b8e739c080585b313aecc7e8cf2be3 100644
--- a/ui/gfx/compositor/layer.cc
+++ b/ui/gfx/compositor/layer.cc
@@ -412,8 +412,8 @@ void Layer::UpdateLayerCanvas() {
invalid_rect_ = gfx::Rect();
return;
}
- scoped_ptr<gfx::Canvas> canvas(gfx::Canvas::CreateCanvas(
- draw_rect.width(), draw_rect.height(), false));
+ scoped_ptr<gfx::Canvas> canvas(gfx::Canvas::CreateCanvas(draw_rect.size(),
+ false));
canvas->Translate(gfx::Point().Subtract(draw_rect.origin()));
delegate_->OnPaintLayer(canvas.get());
SetCanvas(*canvas->GetSkCanvas(), draw_rect.origin());
« no previous file with comments | « ui/gfx/canvas_skia.cc ('k') | ui/gfx/compositor/layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698