TextureMapperSurfaceBackingStore.h [plain text]
#ifndef TextureMapperSurfaceBackingStore_h
#define TextureMapperSurfaceBackingStore_h
#if USE(GRAPHICS_SURFACE)
#include "GraphicsSurface.h"
#include "TextureMapperBackingStore.h"
#include <wtf/RefPtr.h>
namespace WebCore {
class TextureMapper;
class FloatRect;
class TextureMapperSurfaceBackingStore : public TextureMapperBackingStore {
public:
static PassRefPtr<TextureMapperSurfaceBackingStore> create() { return adoptRef(new TextureMapperSurfaceBackingStore); }
void setGraphicsSurface(PassRefPtr<GraphicsSurface>);
void swapBuffersIfNeeded(uint32_t frontBuffer);
virtual RefPtr<BitmapTexture> texture() const;
virtual void paintToTextureMapper(TextureMapper&, const FloatRect&, const TransformationMatrix&, float);
virtual ~TextureMapperSurfaceBackingStore() { }
private:
TextureMapperSurfaceBackingStore()
: TextureMapperBackingStore()
{ }
RefPtr<GraphicsSurface> m_graphicsSurface;
};
}
#endif
#endif