From cfd86b747d32ac22246a1aa908eaa720c63a88c1 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Wed, 7 Nov 2012 11:22:47 +0100 Subject: Imported WebKit commit 20271caf2e2c016d5cef40184cddeefeac4f1876 (http://svn.webkit.org/repository/webkit/trunk@133733) New snapshot that contains all previous fixes as well as build fix for latest QtMultimedia API changes. --- .../CoordinatedGraphics/LayerTreeRenderer.h | 39 ++++++++++++---------- 1 file changed, 22 insertions(+), 17 deletions(-) (limited to 'Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeRenderer.h') diff --git a/Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeRenderer.h b/Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeRenderer.h index 0a6ae3b88..ebe4ca391 100644 --- a/Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeRenderer.h +++ b/Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeRenderer.h @@ -28,6 +28,7 @@ #include "WebLayerTreeInfo.h" #include #include +#include #include #include #include @@ -59,7 +60,7 @@ public: { } }; - LayerTreeRenderer(LayerTreeCoordinatorProxy*); + explicit LayerTreeRenderer(LayerTreeCoordinatorProxy*); virtual ~LayerTreeRenderer(); void purgeGLResources(); void paintToCurrentGLContext(const WebCore::TransformationMatrix&, float, const WebCore::FloatRect&, WebCore::TextureMapper::PaintFlags = 0); @@ -74,7 +75,6 @@ public: void detach(); void appendUpdate(const Function&); - void updateViewport(); void setActive(bool); void deleteLayer(WebLayerID); @@ -91,8 +91,13 @@ public: void flushLayerChanges(); void createImage(int64_t, PassRefPtr); void destroyImage(int64_t); - void setAnimatedOpacity(uint32_t, float); - void setAnimatedTransform(uint32_t, const WebCore::TransformationMatrix&); + void setLayerAnimations(WebLayerID, const WebCore::GraphicsLayerAnimations&); + void setAnimationsLocked(bool); + +#if ENABLE(REQUEST_ANIMATION_FRAME) + void requestAnimationFrame(); + void animationFrameReady(); +#endif private: PassOwnPtr createLayer(WebLayerID); @@ -103,18 +108,25 @@ private: // Reimplementations from WebCore::GraphicsLayerClient. virtual void notifyAnimationStarted(const WebCore::GraphicsLayer*, double) { } virtual void notifyFlushRequired(const WebCore::GraphicsLayer*) { } - virtual bool showDebugBorders(const WebCore::GraphicsLayer*) const { return false; } - virtual bool showRepaintCounter(const WebCore::GraphicsLayer*) const { return false; } void paintContents(const WebCore::GraphicsLayer*, WebCore::GraphicsContext&, WebCore::GraphicsLayerPaintingPhase, const WebCore::IntRect&) { } + void updateViewport(); void dispatchOnMainThread(const Function&); void adjustPositionForFixedLayers(); + void assignImageToLayer(WebCore::GraphicsLayer*, int64_t imageID); + void ensureRootLayer(); + void ensureLayer(WebLayerID); + void commitTileOperations(); + void renderNextFrame(); + void purgeBackingStores(); + typedef HashMap LayerMap; WebCore::FloatSize m_contentsSize; WebCore::FloatRect m_visibleContentsRect; // Render queue can be accessed ony from main thread or updatePaintNode call stack! Vector > m_renderQueue; + Mutex m_renderQueueMutex; #if USE(TEXTURE_MAPPER) OwnPtr m_textureMapper; @@ -127,19 +139,8 @@ private: SurfaceBackingStoreMap m_surfaceBackingStores; #endif - void scheduleWebViewUpdate(); - void synchronizeViewport(); - void assignImageToLayer(WebCore::GraphicsLayer*, int64_t imageID); - void ensureRootLayer(); - void ensureLayer(WebLayerID); - void commitTileOperations(); - void syncAnimations(); - void renderNextFrame(); - void purgeBackingStores(); - LayerTreeCoordinatorProxy* m_layerTreeCoordinatorProxy; OwnPtr m_rootLayer; - Vector m_layersToDelete; LayerMap m_layers; LayerMap m_fixedLayers; @@ -147,6 +148,10 @@ private: WebCore::IntPoint m_renderedContentsScrollPosition; WebCore::IntPoint m_pendingRenderedContentsScrollPosition; bool m_isActive; + bool m_animationsLocked; +#if ENABLE(REQUEST_ANIMATION_FRAME) + bool m_animationFrameRequested; +#endif }; }; -- cgit v1.2.1