summaryrefslogtreecommitdiff
path: root/Source/WebKit2/UIProcess/LayerTreeHostProxy.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit2/UIProcess/LayerTreeHostProxy.h')
-rw-r--r--Source/WebKit2/UIProcess/LayerTreeHostProxy.h79
1 files changed, 14 insertions, 65 deletions
diff --git a/Source/WebKit2/UIProcess/LayerTreeHostProxy.h b/Source/WebKit2/UIProcess/LayerTreeHostProxy.h
index 504c4e19e..f6c31d1bc 100644
--- a/Source/WebKit2/UIProcess/LayerTreeHostProxy.h
+++ b/Source/WebKit2/UIProcess/LayerTreeHostProxy.h
@@ -20,9 +20,10 @@
#ifndef LayerTreeHostProxy_h
#define LayerTreeHostProxy_h
+#if USE(UI_SIDE_COMPOSITING)
+
#include "BackingStore.h"
#include "DrawingAreaProxy.h"
-#include "MessageQueue.h"
#include "Region.h"
#include "WebLayerTreeInfo.h"
#include <WebCore/GraphicsContext.h>
@@ -31,22 +32,18 @@
#include <WebCore/IntSize.h>
#include <WebCore/RunLoop.h>
#include <WebCore/Timer.h>
+#include <wtf/Functional.h>
#include <wtf/HashSet.h>
-#if USE(TEXTURE_MAPPER)
-#include "TextureMapper.h"
-#include "TextureMapperBackingStore.h"
-#endif
+class QSGNode;
namespace WebKit {
-class LayerBackingStore;
class WebLayerInfo;
+class WebLayerTreeRenderer;
class WebLayerUpdateInfo;
-class LayerTreeMessageToRenderer;
-
-class LayerTreeHostProxy : public WebCore::GraphicsLayerClient {
+class LayerTreeHostProxy {
public:
LayerTreeHostProxy(DrawingAreaProxy*);
virtual ~LayerTreeHostProxy();
@@ -54,14 +51,11 @@ public:
void deleteCompositingLayer(WebLayerID);
void setRootCompositingLayer(WebLayerID);
void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
- void paintToCurrentGLContext(const WebCore::TransformationMatrix&, float, const WebCore::FloatRect&);
+ void paintToCurrentGLContext(const WebCore::TransformationMatrix&, float opacity, const WebCore::FloatRect& clip);
void paintToGraphicsContext(BackingStore::PlatformGraphicsContext);
void purgeGLResources();
void setVisibleContentsRectForScaling(const WebCore::IntRect&, float);
void setVisibleContentsRectForPanning(const WebCore::IntRect&, const WebCore::FloatPoint&);
-#if USE(TILED_BACKING_STORE)
- void syncRemoteContent();
- void swapContentBuffers();
void didRenderFrame();
void createTileForLayer(int layerID, int tileID, const WebKit::UpdateInfo&);
void updateTileForLayer(int layerID, int tileID, const WebKit::UpdateInfo&);
@@ -70,64 +64,19 @@ public:
void destroyDirectlyCompositedImage(int64_t);
void didReceiveLayerTreeHostProxyMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
void updateViewport();
-#endif
+ void renderNextFrame();
+ void purgeBackingStores();
+ WebLayerTreeRenderer* layerTreeRenderer() const { return m_renderer.get(); }
protected:
- PassOwnPtr<WebCore::GraphicsLayer> createLayer(WebLayerID);
-
- WebCore::GraphicsLayer* layerByID(WebLayerID id) { return (id == InvalidWebLayerID) ? 0 : m_layers.get(id); }
- WebCore::GraphicsLayer* rootLayer() { return m_rootLayer.get(); }
-
- // Reimplementations from WebCore::GraphicsLayerClient.
- virtual void notifyAnimationStarted(const WebCore::GraphicsLayer*, double) { }
- virtual void notifySyncRequired(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 dispatchUpdate(const Function<void()>&);
DrawingAreaProxy* m_drawingAreaProxy;
-
- typedef HashMap<WebLayerID, WebCore::GraphicsLayer*> LayerMap;
- WebCore::IntRect m_visibleContentsRect;
- float m_contentsScale;
-
- MessageQueue<LayerTreeMessageToRenderer> m_messagesToRenderer;
- void pushUpdateToQueue(PassOwnPtr<LayerTreeMessageToRenderer>);
-
-#if USE(TEXTURE_MAPPER)
- OwnPtr<WebCore::TextureMapper> m_textureMapper;
-#endif
-
-#if PLATFORM(QT)
- void scheduleWebViewUpdate();
- void synchronizeViewport();
- void deleteLayer(WebLayerID);
- void setRootLayerID(WebLayerID);
- void syncLayerParameters(const WebLayerInfo&);
- void createTile(WebLayerID, int, float scale);
- void removeTile(WebLayerID, int);
- void updateTile(WebLayerID, int, const WebCore::IntRect&, const WebCore::IntRect&, ShareableBitmap*);
- void createImage(int64_t, ShareableBitmap*);
- void destroyImage(int64_t);
- void assignImageToLayer(WebCore::GraphicsLayer*, int64_t imageID);
- void flushLayerChanges();
- void ensureRootLayer();
- void ensureLayer(WebLayerID);
- PassRefPtr<LayerBackingStore> getBackingStore(WebLayerID);
- void swapBuffers();
- void syncAnimations();
-#endif
-
- OwnPtr<WebCore::GraphicsLayer> m_rootLayer;
- Vector<WebLayerID> m_layersToDelete;
- HashMap<int64_t, RefPtr<WebCore::TextureMapperBackingStore> > m_directlyCompositedImages;
- HashSet<RefPtr<LayerBackingStore> > m_backingStoresWithPendingBuffers;
-
- LayerMap m_layers;
- WebLayerID m_rootLayerID;
- int m_id;
+ RefPtr<WebLayerTreeRenderer> m_renderer;
};
}
+#endif
+
#endif // LayerTreeHostProxy_h