[Texmap] Don't paint to an intermediate surface when the result is going to be clippe...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 23 Apr 2013 09:02:03 +0000 (09:02 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 23 Apr 2013 09:02:03 +0000 (09:02 +0000)
commit996622c6331e0529487a3089cecfd10e94a59ab1
tree8d2270129f5572c19719f575e1990e478ae217de
parent1f40ae1d6954df16e468d7829b98ea0d9a62ba5d
[Texmap] Don't paint to an intermediate surface when the result is going to be clipped out completely.
https://bugs.webkit.org/show_bug.cgi?id=115015

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

Maintain a clipBounds rectangle in TextureMapper, and test it against the bounds of an intermediate
surface before it is painted.
This allows us to opt out completely of painting into the surface if the result is going to be optimized
out by the GPU clipping.

Covered by tests in compositing/overlap-blending.

* platform/graphics/texmap/TextureMapper.h:
(TextureMapper):
* platform/graphics/texmap/TextureMapperGL.cpp:
(WebCore::TextureMapperGL::clipBounds):
(WebCore):
* platform/graphics/texmap/TextureMapperGL.h:
* platform/graphics/texmap/TextureMapperImageBuffer.h:
* platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperLayer::paintUsingOverlapRegions):

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