LayerTreeHostCAWin.h [plain text]
#ifndef LayerTreeHostCAWin_h
#define LayerTreeHostCAWin_h
#include "HeaderDetection.h"
#if HAVE(WKQCA)
#include "CoalescedWindowGeometriesUpdater.h"
#include "LayerTreeHostCA.h"
#include <WebCore/AbstractCACFLayerTreeHost.h>
#include <wtf/HashSet.h>
#include <wtf/RetainPtr.h>
typedef struct _WKCACFView* WKCACFViewRef;
namespace WebKit {
class WKCACFViewWindow;
class LayerTreeHostCAWin : public LayerTreeHostCA, private WebCore::AbstractCACFLayerTreeHost {
public:
static bool supportsAcceleratedCompositing();
static PassRefPtr<LayerTreeHostCAWin> create(WebPage*);
virtual ~LayerTreeHostCAWin();
#if USE(AVFOUNDATION)
virtual WebCore::GraphicsDeviceAdapter* graphicsDeviceAdapter() const OVERRIDE;
#endif
private:
explicit LayerTreeHostCAWin(WebPage*);
static void contextDidChangeCallback(WKCACFViewRef, void* info);
void contextDidChange();
virtual void invalidate();
virtual void forceRepaint();
virtual void sizeDidChange(const WebCore::IntSize& newSize);
virtual void scheduleLayerFlush();
virtual void setLayerFlushSchedulingEnabled(bool);
virtual void scheduleChildWindowGeometryUpdate(const WindowGeometry&);
virtual void platformInitialize();
virtual void setRootCompositingLayer(WebCore::GraphicsLayer*);
virtual WebCore::PlatformCALayer* rootLayer() const;
virtual void addPendingAnimatedLayer(PassRefPtr<WebCore::PlatformCALayer>);
virtual void layerTreeDidChange();
virtual void flushPendingLayerChangesNow();
OwnPtr<WKCACFViewWindow> m_window;
RetainPtr<WKCACFViewRef> m_view;
HashSet<RefPtr<WebCore::PlatformCALayer> > m_pendingAnimatedLayers;
bool m_isFlushingLayerChanges;
CoalescedWindowGeometriesUpdater m_geometriesUpdater;
};
}
#endif // HAVE(WKQCA)
#endif // LayerTreeHostCAWin_h