[Texmap] Avoid using overlap/non-overlap region in cases where the overhead is bigger...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 30 Apr 2013 14:39:56 +0000 (14:39 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 30 Apr 2013 14:39:56 +0000 (14:39 +0000)
commitc455cc0fdbac8a5fb7e371a90a2001435ec2b7dd
treee8de759e6c8379020f2ccfce1e1c8317f0798fb2
parent42c49c35b4de56a1daa31abece28936ac10e15a0
[Texmap] Avoid using overlap/non-overlap region in cases where the overhead is bigger than the gain
https://bugs.webkit.org/show_bug.cgi?id=115226

Patch by Noam Rosenthal <noam@webkit.org> on 2013-04-30
Reviewed by Allan Sandfeld Jensen.

When there are several fragmeneted overlap regions, or when the overlap region is bigger than the
non-overlap region, it's more efficient to have a single intermediate surface rather than split
the rendering to overlap/non-overlap.

Covered by tests in compositing/overlap-blending.

* platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperLayer::shouldBlend):
    Readability fix.

(WebCore::TextureMapperLayer::paintUsingOverlapRegions):
    Consolidate to one overlap rect when one of the following occurs:
    - The overlap region's area is larger than the non-overlap region area.
    - There are many fragmented overlap regions and no non-overlap regions.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@149369 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp