Optimize RenderLayer::intersectsDamageRect() slightly
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 28 Mar 2015 23:17:30 +0000 (23:17 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 28 Mar 2015 23:17:30 +0000 (23:17 +0000)
commitb26546add1709d882e9f534ba0088dec1763968d
treefccd2cbe12a8848004b139cafe9b3216ee9855a9
parent9a7d45b1eef81cccfc4da5df0a81b1f03f7b74a2
Optimize RenderLayer::intersectsDamageRect() slightly
https://bugs.webkit.org/show_bug.cgi?id=143186

Reviewed by Zalan Bujtas.

We can early return from RenderLayer::intersectsDamageRect() if the
damageRect is empty, since nothing will intersect with the empty rect.

Slight performance gain when scrolling overflow-scroll with lots of nested,
clipping layers.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateClipRects):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@182116 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderLayer.cpp