#ifndef BackingStore_h
#define BackingStore_h
#include "BlackBerryGlobal.h"
#include <BlackBerryPlatformGraphics.h>
namespace WebCore {
class ChromeClientBlackBerry;
class FloatPoint;
class FrameLoaderClientBlackBerry;
class GLES2Context;
class IntRect;
}
namespace BlackBerry {
namespace Platform {
class IntRect;
}
}
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 suspendScreenAndBackingStoreUpdates();
void resumeScreenAndBackingStoreUpdates(ResumeUpdateOperation);
bool isScrollingOrZooming() const;
void setScrollingOrZooming(bool);
void blitContents(const BlackBerry::Platform::IntRect& dstRect, const BlackBerry::Platform::IntRect& contents);
void repaint(int x, int y, int width, int height, bool contentChanged, bool immediate);
bool hasRenderJobs() const;
void renderOnIdle();
bool defersBlit() const;
void setDefersBlit(bool);
bool hasBlitJobs() const;
void blitOnIdle();
bool isDirectRenderingToWindow() const;
void createBackingStoreMemory();
void releaseBackingStoreMemory();
void drawContents(BlackBerry::Platform::Graphics::Drawable*, double , const BlackBerry::Platform::IntRect&);
private:
friend class BlackBerry::WebKit::BackingStoreClient;
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;
};
}
}
#endif // BackingStore_h