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

Unified Diff: content/browser/renderer_host/compositing_iosurface_mac.mm

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 | « content/browser/renderer_host/backing_store_mac.mm ('k') | content/browser/renderer_host/dip_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/compositing_iosurface_mac.mm
diff --git a/content/browser/renderer_host/compositing_iosurface_mac.mm b/content/browser/renderer_host/compositing_iosurface_mac.mm
index db49a82dfee8c0fd0e544d1f45d0259a6e8af2a3..d7478768c0fb0536cdc45d2348ce97a8b7a35aea 100644
--- a/content/browser/renderer_host/compositing_iosurface_mac.mm
+++ b/content/browser/renderer_host/compositing_iosurface_mac.mm
@@ -329,13 +329,13 @@ void CompositingIOSurfaceMac::DrawIOSurface(NSView* view, float scale_factor) {
[glContext_ setView:view];
gfx::Size window_size(NSSizeToCGSize([view frame].size));
gfx::Size pixel_window_size = gfx::ToFlooredSize(
- window_size.Scale(scale_factor));
+ gfx::ScaleSize(window_size, scale_factor));
glViewport(0, 0, pixel_window_size.width(), pixel_window_size.height());
// TODO: After a resolution change, the DPI-ness of the view and the
// IOSurface might not be in sync.
io_surface_size_ = gfx::ToFlooredSize(
- pixel_io_surface_size_.Scale(1.0 / scale_factor));
+ gfx::ScaleSize(pixel_io_surface_size_, 1.0 / scale_factor));
quad_.set_size(io_surface_size_, pixel_io_surface_size_);
glMatrixMode(GL_PROJECTION);
« no previous file with comments | « content/browser/renderer_host/backing_store_mac.mm ('k') | content/browser/renderer_host/dip_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698