Title: [108405] trunk/Source/WebKit2
- Revision
- 108405
- Author
- noam.rosent...@nokia.com
- Date
- 2012-02-21 14:57:55 -0800 (Tue, 21 Feb 2012)
Log Message
[Qt][WK2] Accelerated animations don't work on Mac
https://bugs.webkit.org/show_bug.cgi?id=78963
Problem came from using a non-RunLoop timer.
Remove the unused viewportUpdateTimer, and use the existing animationTimer instead.
Use a continuous timer that we only stop when animations stop.
Reviewed by Kenneth Rohde Christiansen.
* UIProcess/LayerTreeHostProxy.h:
(LayerTreeHostProxy):
* UIProcess/qt/LayerTreeHostProxyQt.cpp:
(WebKit::LayerTreeHostProxy::LayerTreeHostProxy):
(WebKit::LayerTreeHostProxy::paintToCurrentGLContext):
(WebKit):
(WebKit::LayerTreeHostProxy::syncAnimations):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (108404 => 108405)
--- trunk/Source/WebKit2/ChangeLog 2012-02-21 22:51:31 UTC (rev 108404)
+++ trunk/Source/WebKit2/ChangeLog 2012-02-21 22:57:55 UTC (rev 108405)
@@ -1,3 +1,22 @@
+2012-02-21 No'am Rosenthal <noam.rosent...@nokia.com>
+
+ [Qt][WK2] Accelerated animations don't work on Mac
+ https://bugs.webkit.org/show_bug.cgi?id=78963
+
+ Problem came from using a non-RunLoop timer.
+ Remove the unused viewportUpdateTimer, and use the existing animationTimer instead.
+ Use a continuous timer that we only stop when animations stop.
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ * UIProcess/LayerTreeHostProxy.h:
+ (LayerTreeHostProxy):
+ * UIProcess/qt/LayerTreeHostProxyQt.cpp:
+ (WebKit::LayerTreeHostProxy::LayerTreeHostProxy):
+ (WebKit::LayerTreeHostProxy::paintToCurrentGLContext):
+ (WebKit):
+ (WebKit::LayerTreeHostProxy::syncAnimations):
+
2012-02-21 Sam Weinig <s...@webkit.org>
Attempt to fix the Snow Leopard build.
Modified: trunk/Source/WebKit2/UIProcess/LayerTreeHostProxy.h (108404 => 108405)
--- trunk/Source/WebKit2/UIProcess/LayerTreeHostProxy.h 2012-02-21 22:51:31 UTC (rev 108404)
+++ trunk/Source/WebKit2/UIProcess/LayerTreeHostProxy.h 2012-02-21 22:57:55 UTC (rev 108405)
@@ -85,7 +85,6 @@
virtual bool showRepaintCounter(const WebCore::GraphicsLayer*) const { return false; }
void paintContents(const WebCore::GraphicsLayer*, WebCore::GraphicsContext&, WebCore::GraphicsLayerPaintingPhase, const WebCore::IntRect&) { }
- WebCore::RunLoop::Timer<LayerTreeHostProxy> m_animationTimer;
DrawingAreaProxy* m_drawingAreaProxy;
typedef HashMap<WebLayerID, WebCore::GraphicsLayer*> LayerMap;
@@ -116,6 +115,7 @@
void ensureLayer(WebLayerID);
PassRefPtr<LayerBackingStore> getBackingStore(WebLayerID);
void swapBuffers();
+ void syncAnimations();
#endif
OwnPtr<WebCore::GraphicsLayer> m_rootLayer;
@@ -123,11 +123,6 @@
HashMap<int64_t, RefPtr<WebCore::TextureMapperBackingStore> > m_directlyCompositedImages;
HashSet<RefPtr<LayerBackingStore> > m_backingStoresWithPendingBuffers;
-#if PLATFORM(QT)
- void didFireViewportUpdateTimer(WebCore::Timer<LayerTreeHostProxy>*);
- WebCore::Timer<LayerTreeHostProxy> m_viewportUpdateTimer;
-#endif
-
LayerMap m_layers;
WebLayerID m_rootLayerID;
int m_id;
Modified: trunk/Source/WebKit2/UIProcess/qt/LayerTreeHostProxyQt.cpp (108404 => 108405)
--- trunk/Source/WebKit2/UIProcess/qt/LayerTreeHostProxyQt.cpp 2012-02-21 22:51:31 UTC (rev 108404)
+++ trunk/Source/WebKit2/UIProcess/qt/LayerTreeHostProxyQt.cpp 2012-02-21 22:57:55 UTC (rev 108405)
@@ -155,9 +155,7 @@
}
LayerTreeHostProxy::LayerTreeHostProxy(DrawingAreaProxy* drawingAreaProxy)
- : m_animationTimer(RunLoop::main(), this, &LayerTreeHostProxy::updateViewport)
- , m_drawingAreaProxy(drawingAreaProxy)
- , m_viewportUpdateTimer(this, &LayerTreeHostProxy::didFireViewportUpdateTimer)
+ : m_drawingAreaProxy(drawingAreaProxy)
, m_rootLayerID(0)
{
}
@@ -198,12 +196,19 @@
m_textureMapper->endClip();
m_textureMapper->endPainting();
- if (layer->descendantsOrSelfHaveRunningAnimations()) {
- layer->syncAnimationsRecursively();
- m_viewportUpdateTimer.startOneShot(0);
- }
+ syncAnimations();
}
+void LayerTreeHostProxy::syncAnimations()
+{
+ TextureMapperLayer* layer = toTextureMapperLayer(rootLayer());
+ ASSERT(layer);
+
+ layer->syncAnimationsRecursively();
+ if (layer->descendantsOrSelfHaveRunningAnimations())
+ updateViewport();
+}
+
void LayerTreeHostProxy::paintToGraphicsContext(QPainter* painter)
{
if (!m_textureMapper)
@@ -224,12 +229,6 @@
m_textureMapper->setGraphicsContext(0);
}
-
-void LayerTreeHostProxy::didFireViewportUpdateTimer(Timer<LayerTreeHostProxy>*)
-{
- updateViewport();
-}
-
void LayerTreeHostProxy::updateViewport()
{
m_drawingAreaProxy->updateViewport();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes