Source/WebCore: [chromium] Allow modification of size of partially occluded quads...
authorwjmaclean@chromium.org <wjmaclean@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Jan 2012 02:11:55 +0000 (02:11 +0000)
committerwjmaclean@chromium.org <wjmaclean@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Jan 2012 02:11:55 +0000 (02:11 +0000)
commitf1505576fe7ecde0108e45ae1a24bb88bdc656d3
treedc6c1edf15c6cbeb45cad30a844a03088f01118f
parent4400b0132860bf889b8b70d12b565d853d34255d
Source/WebCore: [chromium] Allow modification of size of partially occluded quads during culling to reduce pixel overdraw.
https://bugs.webkit.org/show_bug.cgi?id=76349

Reviewed by James Robinson.

Prior to this patch, draw culling either rejects a DrawQuad because it is completely
occluded, or draws the entire quad (even if it is largely occluded). This patch
attempts to reduce the number of pixels drawn by determining if a partially
occluded DrawQuad can be resized to a smaller quad, based on what portion of the
DrawQuad is actually visible, and performing that resizing where possible.

Added cases to existing unit tests.

* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::drawTileQuad):
* platform/graphics/chromium/cc/CCDrawQuad.cpp:
(WebCore::CCDrawQuad::CCDrawQuad):
* platform/graphics/chromium/cc/CCDrawQuad.h:
(WebCore::CCDrawQuad::setQuadVisibleRect):
(WebCore::CCDrawQuad::quadVisibleRect):
* platform/graphics/chromium/cc/CCQuadCuller.cpp:
(WebCore::rectSubtractRegion):
(WebCore::CCQuadCuller::cullOccludedQuads):

Source/WebKit/chromium: [chromium] Allow modification of size of partially occluded quads.
https://bugs.webkit.org/show_bug.cgi?id=76349

Reviewed by James Robinson.

* tests/CCQuadCullerTest.cpp:
(WebCore::makeTileQuads)
(WebCore::setQuads):
(WebCore::TEST):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106076 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp
Source/WebCore/platform/graphics/chromium/cc/CCDrawQuad.cpp
Source/WebCore/platform/graphics/chromium/cc/CCDrawQuad.h
Source/WebCore/platform/graphics/chromium/cc/CCQuadCuller.cpp
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/tests/CCQuadCullerTest.cpp