[chromium] CanvasLayerTextureUpdater needs to convert opaque rects back to content...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 30 Jun 2012 15:55:54 +0000 (15:55 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 30 Jun 2012 15:55:54 +0000 (15:55 +0000)
commit068ecbdde66b4e6d4a8526e40256a7f523eff931
treee0ec3f9064b80a616795a4d0180cfaec1c347ca7
parent069a2d399d3f911676b7a218b370c551b5fcecea
[chromium] CanvasLayerTextureUpdater needs to convert opaque rects back to content space.
https://bugs.webkit.org/show_bug.cgi?id=90092

The CanvasLayerTextureUpdater currently receives its opaque rects in
layer space, but is expected to return them in content space and does
not convert them. This patch adds this conversion. To avoid numerical
errors, this patch also switches to using float rects to store opaque
rects where appropriate.

Patch by Ian Vollick <vollick@chromium.org> on 2012-06-30
Reviewed by Adrienne Walker.

Source/Platform:

* chromium/public/WebContentLayerClient.h:
(WebKit):
(WebContentLayerClient):

Source/WebCore:

Unit test: ContentLayerTest.ContentLayerPainterWithDeviceScale

* platform/graphics/chromium/CanvasLayerTextureUpdater.cpp:
(WebCore::CanvasLayerTextureUpdater::paintContents):
* platform/graphics/chromium/ContentLayerChromium.cpp:
(WebCore::ContentLayerPainter::ContentLayerPainter):
(WebCore::ContentLayerPainter::create):
(WebCore::ContentLayerPainter::paint):
* platform/graphics/chromium/ContentLayerChromium.h:
(WebCore):
(ContentLayerDelegate):
(ContentLayerPainter):
* platform/graphics/chromium/LayerPainterChromium.h:
(WebCore):
(LayerPainterChromium):
* platform/graphics/chromium/LinkHighlight.cpp:
(WebCore::LinkHighlight::paintContents):
* platform/graphics/chromium/LinkHighlight.h:
(LinkHighlight):
* platform/graphics/chromium/OpaqueRectTrackingContentLayerDelegate.cpp:
(WebCore::OpaqueRectTrackingContentLayerDelegate::paintContents):
* platform/graphics/chromium/OpaqueRectTrackingContentLayerDelegate.h:
(OpaqueRectTrackingContentLayerDelegate):
* platform/graphics/chromium/ScrollbarLayerChromium.cpp:

Source/WebKit/chromium:

* WebKit.gypi:
* src/WebContentLayerImpl.cpp:
(WebKit::WebContentLayerImpl::paintContents):
* src/WebContentLayerImpl.h:
(WebContentLayerImpl):
* tests/CCLayerTreeHostCommonTest.cpp:
* tests/CCLayerTreeHostTest.cpp:
(WTF::TestOpacityChangeLayerDelegate::paintContents):
(WTF::MockContentLayerDelegate::paintContents):
* tests/ContentLayerChromiumTest.cpp: Added.
(WebKit):
(OpaqueRectDrawingGraphicsContextPainter):
(WebKit::OpaqueRectDrawingGraphicsContextPainter::OpaqueRectDrawingGraphicsContextPainter):
(WebKit::OpaqueRectDrawingGraphicsContextPainter::~OpaqueRectDrawingGraphicsContextPainter):
(MockContentLayerDelegate):
(WebKit::MockContentLayerDelegate::MockContentLayerDelegate):
(WebKit::TEST):
* tests/LayerChromiumTest.cpp:
* tests/OpaqueRectTrackingContentLayerDelegateTest.cpp:
(WebCore::TEST_F):
* tests/TiledLayerChromiumTest.cpp:
* tests/WebLayerTest.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121628 268f45cc-cd09-0410-ab3c-d52691b4dbfc
23 files changed:
Source/Platform/ChangeLog
Source/Platform/chromium/public/WebContentLayerClient.h
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/chromium/CanvasLayerTextureUpdater.cpp
Source/WebCore/platform/graphics/chromium/ContentLayerChromium.cpp
Source/WebCore/platform/graphics/chromium/ContentLayerChromium.h
Source/WebCore/platform/graphics/chromium/LayerPainterChromium.h
Source/WebCore/platform/graphics/chromium/LinkHighlight.cpp
Source/WebCore/platform/graphics/chromium/LinkHighlight.h
Source/WebCore/platform/graphics/chromium/OpaqueRectTrackingContentLayerDelegate.cpp
Source/WebCore/platform/graphics/chromium/OpaqueRectTrackingContentLayerDelegate.h
Source/WebCore/platform/graphics/chromium/ScrollbarLayerChromium.cpp
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/WebKit.gypi
Source/WebKit/chromium/src/WebContentLayerImpl.cpp
Source/WebKit/chromium/src/WebContentLayerImpl.h
Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp
Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp
Source/WebKit/chromium/tests/ContentLayerChromiumTest.cpp [new file with mode: 0644]
Source/WebKit/chromium/tests/LayerChromiumTest.cpp
Source/WebKit/chromium/tests/OpaqueRectTrackingContentLayerDelegateTest.cpp
Source/WebKit/chromium/tests/TiledLayerChromiumTest.cpp
Source/WebKit/chromium/tests/WebLayerTest.cpp