[Qt] Animated opacity does not trigger accelerated compositing
authorallan.jensen@digia.com <allan.jensen@digia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 25 Apr 2013 18:19:05 +0000 (18:19 +0000)
committerallan.jensen@digia.com <allan.jensen@digia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 25 Apr 2013 18:19:05 +0000 (18:19 +0000)
https://bugs.webkit.org/show_bug.cgi?id=115107

Reviewed by Simon Fraser.

Source/WebCore:

Add extra option to also trigger compositing on animated opacity.

* page/ChromeClient.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::requiresCompositingForAnimation):

Source/WebKit/qt:

We should trigger compositing on animated opacity as it is always faster on Qt.

* WebCoreSupport/ChromeClientQt.cpp:
VideoTrigger removed because we have already disabled AC for video in qwebsettings.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@149123 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/page/ChromeClient.h
Source/WebCore/rendering/RenderLayerCompositor.cpp
Source/WebKit/qt/ChangeLog
Source/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp

index 7fe2764..934b2e9 100644 (file)
@@ -1,3 +1,16 @@
+2013-04-25  Allan Sandfeld Jensen  <allan.jensen@digia.com>
+
+        [Qt] Animated opacity does not trigger accelerated compositing
+        https://bugs.webkit.org/show_bug.cgi?id=115107
+
+        Reviewed by Simon Fraser.
+
+        Add extra option to also trigger compositing on animated opacity.
+
+        * page/ChromeClient.h:
+        * rendering/RenderLayerCompositor.cpp:
+        (WebCore::RenderLayerCompositor::requiresCompositingForAnimation):
+
 2013-04-25  Lamarque V. Souza  <Lamarque.Souza@basyskom.com>
 
         Sec-WebSocket-Extensions header field must not appear more than once in an HTTP response.
index 611cca9..2739bbb 100644 (file)
@@ -279,6 +279,7 @@ public:
         AnimationTrigger = 1 << 4,
         FilterTrigger = 1 << 5,
         ScrollableInnerFrameTrigger = 1 << 6,
+        AnimatedOpacityTrigger = 1 << 7,
         AllTriggers = 0xFFFFFFFF
     };
     typedef unsigned CompositingTriggerFlags;
index 551ed44..25ec2e5 100644 (file)
@@ -2107,7 +2107,8 @@ bool RenderLayerCompositor::requiresCompositingForAnimation(RenderObject* render
         return false;
 
     if (AnimationController* animController = renderer->animation()) {
-        return (animController->isRunningAnimationOnRenderer(renderer, CSSPropertyOpacity) && inCompositingMode())
+        return (animController->isRunningAnimationOnRenderer(renderer, CSSPropertyOpacity)
+                && (inCompositingMode() || (m_compositingTriggers & ChromeClient::AnimatedOpacityTrigger)))
 #if ENABLE(CSS_FILTERS)
 #if !PLATFORM(MAC) || (!PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080)
             // <rdar://problem/10907251> - WebKit2 doesn't support CA animations of CI filters on Lion and below
index b576d29..eeeffb6 100644 (file)
@@ -1,3 +1,15 @@
+2013-04-25  Allan Sandfeld Jensen  <allan.jensen@digia.com>
+
+        [Qt] Animated opacity does not trigger accelerated compositing
+        https://bugs.webkit.org/show_bug.cgi?id=115107
+
+        Reviewed by Simon Fraser.
+
+        We should trigger compositing on animated opacity as it is always faster on Qt.
+
+        * WebCoreSupport/ChromeClientQt.cpp:
+        VideoTrigger removed because we have already disabled AC for video in qwebsettings.
+
 2013-04-23  Allan Sandfeld Jensen  <allan.jensen@digia.com>
 
         [Qt][WK1] MemoryCache is not cleaned by default
index e2c843e..e59449c 100644 (file)
@@ -655,7 +655,7 @@ void ChromeClientQt::scheduleCompositingLayerFlush()
 ChromeClient::CompositingTriggerFlags ChromeClientQt::allowedCompositingTriggers() const
 {
     if (allowsAcceleratedCompositing())
-        return ThreeDTransformTrigger | VideoTrigger | CanvasTrigger | AnimationTrigger;
+        return ThreeDTransformTrigger | CanvasTrigger | AnimationTrigger | AnimatedOpacityTrigger;
 
     return 0;
 }