ChunkedUpdateDrawingAreaProxy.h [plain text]
#ifndef ChunkedUpdateDrawingAreaProxy_h
#define ChunkedUpdateDrawingAreaProxy_h
#include "DrawingAreaProxy.h"
#include <WebCore/IntSize.h>
#include <wtf/PassOwnPtr.h>
#include <wtf/OwnPtr.h>
#if PLATFORM(MAC)
#include <wtf/RetainPtr.h>
OBJC_CLASS WKView;
#elif PLATFORM(QT)
#include <QImage>
class QGraphicsWKView;
#elif PLATFORM(GTK)
typedef struct _cairo_surface cairo_surface_t;
typedef struct _WebKitWebViewBase WebKitWebViewBase;
#endif
namespace WebKit {
class UpdateChunk;
class WebPageProxy;
#if PLATFORM(MAC)
typedef WKView PlatformWebView;
#elif PLATFORM(WIN)
class WebView;
typedef WebView PlatformWebView;
#elif PLATFORM(QT)
typedef QGraphicsWKView PlatformWebView;
#elif PLATFORM(GTK)
typedef WebKitWebViewBase PlatformWebView;
#endif
class ChunkedUpdateDrawingAreaProxy : public DrawingAreaProxy {
public:
static PassOwnPtr<ChunkedUpdateDrawingAreaProxy> create(PlatformWebView*, WebPageProxy*);
virtual ~ChunkedUpdateDrawingAreaProxy();
private:
ChunkedUpdateDrawingAreaProxy(PlatformWebView*, WebPageProxy*);
WebPageProxy* page() const;
virtual void deviceScaleFactorDidChange() { }
virtual void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
virtual bool paint(const WebCore::IntRect&, PlatformDrawingContext);
virtual void sizeDidChange();
virtual void setPageIsVisible(bool isVisible);
void ensureBackingStore();
void invalidateBackingStore();
bool platformPaint(const WebCore::IntRect&, PlatformDrawingContext);
void drawUpdateChunkIntoBackingStore(UpdateChunk*);
void didSetSize(UpdateChunk*);
void deprecatedUpdate(UpdateChunk*);
void sendSetSize();
bool m_isWaitingForDidSetFrameNotification;
bool m_isVisible;
bool m_forceRepaintWhenResumingPainting;
#if PLATFORM(MAC)
RetainPtr<CGContextRef> m_bitmapContext;
#elif PLATFORM(WIN)
OwnPtr<HDC> m_backingStoreDC;
OwnPtr<HBITMAP> m_backingStoreBitmap;
#elif PLATFORM(QT)
QImage m_backingStoreImage;
#elif PLATFORM(GTK)
cairo_surface_t* m_backingStoreImage;
#endif
PlatformWebView* m_webView;
};
}
#endif // ChunkedUpdateDrawingAreaProxy_h