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
+2015-03-28 Simon Fraser <simon.fraser@apple.com>
+
+ 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):
+
2015-03-28 Anders Carlsson <andersca@apple.com>
Remove an unused SPI method from WebKitLegacy
if (isRootLayer() || renderer().isRoot())
return true;
+ if (damageRect.isEmpty())
+ return false;
+
// If we aren't an inline flow, and our layer bounds do intersect the damage rect, then we
// can go ahead and return true.
if (!renderer().isRenderInline()) {