From 50f5eaa1d1d82147480483db51ca12990995b6ee Mon Sep 17 00:00:00 2001 From: Ben Murdoch Date: Thu, 11 Aug 2011 16:10:18 +0100 Subject: Force canvas scale factor to 1. This Android modification was lost over the course of two WebKit merges and means that we are allocating the backing images for canvas significantly larger than they need to be. For the original change, see Change-Id: I9652d6b88e01f27d69c804ac6bc56b527b33c219 Bug: 5142892 Change-Id: I01549c017cc3b8d683b273948826433c6451de72 --- Source/WebCore/html/HTMLCanvasElement.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'Source/WebCore') diff --git a/Source/WebCore/html/HTMLCanvasElement.cpp b/Source/WebCore/html/HTMLCanvasElement.cpp index 764620c..9f51f10 100644 --- a/Source/WebCore/html/HTMLCanvasElement.cpp +++ b/Source/WebCore/html/HTMLCanvasElement.cpp @@ -79,7 +79,19 @@ HTMLCanvasElement::HTMLCanvasElement(const QualifiedName& tagName, Document* doc , m_size(DefaultWidth, DefaultHeight) , m_rendererIsCanvas(false) , m_ignoreReset(false) +#ifdef ANDROID + /* In Android we capture the drawing into a displayList, and then + replay that list at various scale factors (sometimes zoomed out, other + times zoomed in for "normal" reading, yet other times at arbitrary + zoom values based on the user's choice). In all of these cases, we do + not re-record the displayList, hence it is usually harmful to perform + any pre-rounding, since we just don't know the actual drawing resolution + at record time. + */ + , m_pageScaleFactor(1) +#else , m_pageScaleFactor(document->frame() ? document->frame()->page()->chrome()->scaleFactor() : 1) +#endif , m_originClean(true) , m_hasCreatedImageBuffer(false) { -- cgit v1.1