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

Unified Diff: ui/gfx/canvas_paint_win.cc

Issue 674763002: remove ui::gfx::GetDeviceScaleFactor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dpi-cleanup-3
Patch Set: rebase-4 Created 6 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/base/layout.cc ('k') | ui/gfx/screen_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/canvas_paint_win.cc
diff --git a/ui/gfx/canvas_paint_win.cc b/ui/gfx/canvas_paint_win.cc
index 7d20fbcd1c88355358cfc574876625e9173b1df5..f377b8d57a18c73f8ec1ec3645c550c3f6bc07cc 100644
--- a/ui/gfx/canvas_paint_win.cc
+++ b/ui/gfx/canvas_paint_win.cc
@@ -55,9 +55,7 @@ void CanvasSkiaPaint::Init(bool opaque) {
const int width = ps_.rcPaint.right - ps_.rcPaint.left;
const int height = ps_.rcPaint.bottom - ps_.rcPaint.top;
- RecreateBackingCanvas(gfx::Size(width, height),
- gfx::win::GetDeviceScaleFactor(),
- opaque);
+ RecreateBackingCanvas(gfx::Size(width, height), gfx::GetDPIScale(), opaque);
skia::PlatformCanvas* canvas = platform_canvas();
canvas->clear(SkColorSetARGB(0, 0, 0, 0));
@@ -65,8 +63,8 @@ void CanvasSkiaPaint::Init(bool opaque) {
// This will bring the canvas into the screen coordinate system for the
// dirty rect
canvas->translate(
- -ps_.rcPaint.left / gfx::win::GetDeviceScaleFactor(),
- -ps_.rcPaint.top / gfx::win::GetDeviceScaleFactor());
+ -ps_.rcPaint.left / gfx::GetDPIScale(),
+ -ps_.rcPaint.top / gfx::GetDPIScale());
}
} // namespace gfx
« no previous file with comments | « ui/base/layout.cc ('k') | ui/gfx/screen_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698