#ifndef BackingStore_h
#define BackingStore_h
#include "BlackBerryGlobal.h"
#include <BlackBerryPlatformMisc.h>
namespace WebCore {
class ChromeClientBlackBerry;
class FloatPoint;
class FrameLoaderClientBlackBerry;
class GLES2Context;
class IntRect;
}
namespace BlackBerry {
namespace Platform {
class IntRect;
class FloatPoint;
namespace Graphics {
class Buffer;
}
}
}
namespace BlackBerry {
namespace WebKit {
class WebPage;
class WebPagePrivate;
class WebPageCompositorPrivate;
class BackingStorePrivate;
class BackingStoreClient;
class BLACKBERRY_EXPORT BackingStore {
public:
enum ResumeUpdateOperation { None, Blit, RenderAndBlit };
BackingStore(WebPage*, BackingStoreClient*);
virtual ~BackingStore();
void createSurface();
void suspendBackingStoreUpdates();
void resumeBackingStoreUpdates();
void suspendGeometryUpdates();
void resumeGeometryUpdates();
void suspendScreenUpdates();
void resumeScreenUpdates(BackingStore::ResumeUpdateOperation);
bool isScrollingOrZooming() const;
void setScrollingOrZooming(bool);
void blitVisibleContents();
void repaint(int x, int y, int width, int height, bool contentChanged, bool immediate);
bool hasBlitJobs() const;
void blitOnIdle();
void acquireBackingStoreMemory();
void releaseOwnedBackingStoreMemory();
bool drawContents(BlackBerry::Platform::Graphics::Buffer*, const BlackBerry::Platform::IntRect& dstRect, double scale, const BlackBerry::Platform::FloatPoint& documentScrollPosition);
private:
friend class BlackBerry::WebKit::BackingStoreClient;
friend class BlackBerry::WebKit::BackingStorePrivate;
friend class BlackBerry::WebKit::WebPage;
friend class BlackBerry::WebKit::WebPagePrivate; friend class BlackBerry::WebKit::WebPageCompositorPrivate;
friend class WebCore::ChromeClientBlackBerry;
friend class WebCore::FrameLoaderClientBlackBerry;
friend class WebCore::GLES2Context;
BackingStorePrivate *d;
DISABLE_COPY(BackingStore)
};
}
}
#endif // BackingStore_h