Don't invalidate composition for style changes in non-composited layers
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 13 Apr 2017 23:20:50 +0000 (23:20 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 13 Apr 2017 23:20:50 +0000 (23:20 +0000)
commit42b6c7152653bb1874ca4dde3fc4875f899229a8
treee49d9effb4de8032b8f17ae5b8054407643e04df
parentfeadcaa85cca757d261af3f20137a2dd43631f63
Don't invalidate composition for style changes in non-composited layers
https://bugs.webkit.org/show_bug.cgi?id=170805
<rdar://problem/31606185>

Reviewed by Simon Fraser.

Source/WebCore:

Test: compositing/updates/animation-non-composited.html

In most cases they can't affect composition. Composition updates are expensive, this can
save a lot of work (tumblr.com animations hit this at the moment).

* rendering/RenderElement.h:
(WebCore::RenderElement::createsGroup):
(WebCore::RenderElement::createsGroupForStyle):

    Factor to a static function so we can test style directly.

* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::layerStyleChanged):
(WebCore::RenderLayerCompositor::styleChangeMayAffectIndirectCompositingReasons):

    Test if style change might cause compositing change that can't be determined without compositing update.

* rendering/RenderLayerCompositor.h:

LayoutTests:

* compositing/updates/animation-non-composited-expected.txt: Added.
* compositing/updates/animation-non-composited.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215347 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/compositing/updates/animation-non-composited-expected.txt [new file with mode: 0644]
LayoutTests/compositing/updates/animation-non-composited.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderElement.h
Source/WebCore/rendering/RenderLayerCompositor.cpp
Source/WebCore/rendering/RenderLayerCompositor.h