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

Unified Diff: ui/gfx/canvas.cc

Issue 11377068: ui: Make gfx::Size::Scale() mutate the class. Add gfx::ScaleSize() similar to Rect/Point. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebaseTOGO Created 8 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 | « ui/compositor/layer.cc ('k') | ui/gfx/display.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/canvas.cc
diff --git a/ui/gfx/canvas.cc b/ui/gfx/canvas.cc
index bf41bc1357effecc63f8a7187d68ffc1d2149a75..eb11b379156b09e4441684cd2f8cebdd1d522a63 100644
--- a/ui/gfx/canvas.cc
+++ b/ui/gfx/canvas.cc
@@ -29,8 +29,8 @@ Canvas::Canvas(const gfx::Size& size,
: scale_factor_(scale_factor),
owned_canvas_(NULL),
canvas_(NULL) {
- gfx::Size pixel_size = gfx::ToFlooredSize(size.Scale(
- ui::GetScaleFactorScale(scale_factor)));
+ gfx::Size pixel_size = gfx::ToFlooredSize(
+ gfx::ScaleSize(size, ui::GetScaleFactorScale(scale_factor)));
owned_canvas_.reset(new skia::PlatformCanvas(pixel_size.width(),
pixel_size.height(),
is_opaque));
@@ -77,7 +77,7 @@ void Canvas::RecreateBackingCanvas(const gfx::Size& size,
bool is_opaque) {
scale_factor_ = scale_factor;
gfx::Size pixel_size = gfx::ToFlooredSize(
- size.Scale(ui::GetScaleFactorScale(scale_factor)));
+ gfx::ScaleSize(size, ui::GetScaleFactorScale(scale_factor)));
owned_canvas_.reset(new skia::PlatformCanvas(pixel_size.width(),
pixel_size.height(),
is_opaque));
« no previous file with comments | « ui/compositor/layer.cc ('k') | ui/gfx/display.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698