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

Unified Diff: content/renderer/render_widget.cc

Issue 14348033: NOT FOR SUBMIT - Windows Views HiDPI (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Revert spurious changes, plus some corrections. Created 7 years, 7 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 | « chrome/browser/ui/views/tabs/tab_drag_controller.cc ('k') | ui/base/win/dpi.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_widget.cc
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
index 39b7b3f98a9e60d56e5cebd3b12c99c6d5287d27..480371afc324f29c9537757987a9dcc7f29f1af0 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -50,6 +50,7 @@
#include "third_party/skia/include/core/SkShader.h"
#include "ui/base/ui_base_switches.h"
#include "ui/gfx/point.h"
+#include "ui/gfx/point_conversions.h"
#include "ui/gfx/rect_conversions.h"
#include "ui/gfx/size_conversions.h"
#include "ui/gfx/skia_util.h"
@@ -1235,9 +1236,11 @@ void RenderWidget::DoDeferredUpdate() {
bounds.Inset(-1, -1);
bounds.Intersect(gfx::Rect(size_));
}
-
- gfx::Rect pixel_bounds = gfx::ToEnclosingRect(
- gfx::ScaleRect(bounds, device_scale_factor_));
+ // TODO: Migrate this sizing logic into backing store win/aura.
+ gfx::Rect pixel_bounds = gfx::Rect(
+ gfx::ToFlooredPoint(
+ gfx::ScalePoint(bounds.origin(),device_scale_factor_)),
+ gfx::ToCeiledSize(gfx::ScaleSize(bounds.size(),device_scale_factor_)));
scoped_ptr<skia::PlatformCanvas> canvas(
RenderProcess::current()->GetDrawingCanvas(&current_paint_buf_,
« no previous file with comments | « chrome/browser/ui/views/tabs/tab_drag_controller.cc ('k') | ui/base/win/dpi.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698