WebWidget should be able to paint into a zoomed canvas without aliasing
authorabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 22 Aug 2012 20:24:56 +0000 (20:24 +0000)
committerabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 22 Aug 2012 20:24:56 +0000 (20:24 +0000)
commit21517746404edddfbd8133d0e2b0975abf3b3cbf
tree9b46e31819ccae7c90d5d327215410930eaa25aa
parentec18f5bb364a815e94441cbdec0ec5b11caf04ab
WebWidget should be able to paint into a zoomed canvas without aliasing
https://bugs.webkit.org/show_bug.cgi?id=92043

Reviewed by James Robinson.

If accelerated compositing is enabled, WebWidget::paint reads back from
the compositor rather than re-painting the widget. That approach works
well if the canvas we're rendering into is at a similar resolution to
the pixels in the compositor, but if the canvas has been scaled (e.g.,
to help the user disambiguate links), then reading back from the
compositor will cause aliasing artifacts.

This patch adds an option to paint to let the embedder request a
software re-rendering of the widget to avoid these aliasing artifacts.

* public/WebWidget.h:
(WebKit::WebWidget::paint):
* src/WebPagePopupImpl.cpp:
(WebKit::WebPagePopupImpl::paint):
* src/WebPagePopupImpl.h:
(WebPagePopupImpl):
* src/WebPopupMenuImpl.cpp:
(WebKit::WebPopupMenuImpl::paint):
* src/WebPopupMenuImpl.h:
* src/WebViewImpl.cpp:
(WebKit::canvasBackgroundForTransparencey):
(WebKit):
(WebKit::WebViewImpl::paint):
* src/WebViewImpl.h:
(WebViewImpl):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@126344 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/public/WebWidget.h
Source/WebKit/chromium/src/WebPagePopupImpl.cpp
Source/WebKit/chromium/src/WebPagePopupImpl.h
Source/WebKit/chromium/src/WebPopupMenuImpl.cpp
Source/WebKit/chromium/src/WebPopupMenuImpl.h
Source/WebKit/chromium/src/WebViewImpl.cpp
Source/WebKit/chromium/src/WebViewImpl.h