BackingStoreBackendCairo.h [plain text]
#ifndef BackingStoreBackendCairo_h
#define BackingStoreBackendCairo_h
#if USE(CAIRO)
#include "IntRect.h"
#include "RefPtrCairo.h"
#include <wtf/FastMalloc.h>
#include <wtf/Noncopyable.h>
typedef struct _cairo_surface cairo_surface_t;
namespace WebCore {
class BackingStoreBackendCairo {
WTF_MAKE_NONCOPYABLE(BackingStoreBackendCairo);
WTF_MAKE_FAST_ALLOCATED;
public:
virtual ~BackingStoreBackendCairo() { }
cairo_surface_t* surface() const { return m_surface.get(); }
const IntSize& size() const { return m_size; }
virtual void scroll(const IntRect& scrollRect, const IntSize& scrollOffset) = 0;
protected:
BackingStoreBackendCairo(const IntSize& size)
: m_size(size)
{
}
RefPtr<cairo_surface_t> m_surface;
IntSize m_size;
};
}
#endif // USE(CAIRO)
#endif // BackingStoreBackendCairo_h