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

Unified Diff: Source/web/PageWidgetDelegate.cpp

Issue 725043002: Remove GraphicsContext::applyDeviceScaleFactor() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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
Index: Source/web/PageWidgetDelegate.cpp
diff --git a/Source/web/PageWidgetDelegate.cpp b/Source/web/PageWidgetDelegate.cpp
index b43aba571d5b73f799685c7eb9b36073f7d942b9..c92d29c0d59ca623ec97389bd7172077977f196d 100644
--- a/Source/web/PageWidgetDelegate.cpp
+++ b/Source/web/PageWidgetDelegate.cpp
@@ -67,8 +67,9 @@ void PageWidgetDelegate::paint(Page& page, PageOverlayList* overlays, WebCanvas*
return;
GraphicsContext gc(canvas);
gc.setCertainlyOpaque(background == Opaque);
- gc.applyDeviceScaleFactor(page.deviceScaleFactor());
- gc.setDeviceScaleFactor(page.deviceScaleFactor());
f(malita) 2014/11/14 03:24:56 This looks weird: the device scale factor is suppo
Stephen Chennney 2014/11/14 15:26:22 It's does what it was designed to do, but that may
+ float scaleFactor = page.deviceScaleFactor();
+ gc.scale(scaleFactor, scaleFactor);
+ gc.setDeviceScaleFactor(scaleFactor);
IntRect dirtyRect(rect);
gc.save(); // Needed to save the canvas, not the GraphicsContext.
FrameView* view = root.view();

Powered by Google App Engine
This is Rietveld 408576698