diff options
author | Ben Murdoch <benm@google.com> | 2011-08-11 16:10:18 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2011-08-11 16:10:18 +0100 |
commit | 50f5eaa1d1d82147480483db51ca12990995b6ee (patch) | |
tree | 15bc42b2e684314c885a0d2fbc59f05ee893f39f /Source | |
parent | f9bc4199d5ebea7d85e1d74f76abd1b6329f20c2 (diff) | |
download | external_webkit-50f5eaa1d1d82147480483db51ca12990995b6ee.zip external_webkit-50f5eaa1d1d82147480483db51ca12990995b6ee.tar.gz external_webkit-50f5eaa1d1d82147480483db51ca12990995b6ee.tar.bz2 |
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
Diffstat (limited to 'Source')
-rw-r--r-- | Source/WebCore/html/HTMLCanvasElement.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
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) { |