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

Unified Diff: Source/web/PageWidgetDelegate.cpp

Issue 879993006: [Slimming Paint] Move PageWidgetDelegate scale to a transform display item. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/PageWidgetDelegate.cpp
diff --git a/Source/web/PageWidgetDelegate.cpp b/Source/web/PageWidgetDelegate.cpp
index 9f53c7e49e0d79ac297cfc17cd82f181b4b05bf2..79d403b666db2672ae50ba2d7ef7a7b1a49b38b3 100644
--- a/Source/web/PageWidgetDelegate.cpp
+++ b/Source/web/PageWidgetDelegate.cpp
@@ -36,6 +36,7 @@
#include "core/page/AutoscrollController.h"
#include "core/page/EventHandler.h"
#include "core/page/Page.h"
+#include "core/paint/TransformRecorder.h"
#include "core/rendering/RenderView.h"
#include "core/rendering/compositing/RenderLayerCompositor.h"
#include "platform/Logging.h"
@@ -43,6 +44,7 @@
#include "platform/graphics/paint/ClipRecorder.h"
#include "platform/graphics/paint/DisplayItemList.h"
#include "platform/graphics/paint/DrawingRecorder.h"
+#include "platform/transforms/AffineTransform.h"
#include "public/web/WebInputEvent.h"
#include "web/PageOverlayList.h"
#include "web/WebInputEventConversion.h"
@@ -82,8 +84,12 @@ void PageWidgetDelegate::paint(Page& page, PageOverlayList* overlays, WebCanvas*
// be used within Blink paint code.
graphicsContext->setCertainlyOpaque(background == Opaque);
float scaleFactor = page.deviceScaleFactor();
- graphicsContext->scale(scaleFactor, scaleFactor);
graphicsContext->setDeviceScaleFactor(scaleFactor);
+
+ AffineTransform scale;
+ scale.scale(scaleFactor);
+ TransformRecorder scaleRecorder(*graphicsContext, root.displayItemClient(), scale);
jbroman 2015/01/27 22:02:28 Is it fine to use the LocalFrame for this display
chrishtr 2015/01/28 01:50:21 It's fine. The only requirement is that the (Displ
+
IntRect dirtyRect(rect);
FrameView* view = root.view();
if (view) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698