TextureMapperTile.h [plain text]
#ifndef TextureMapperTile_h
#define TextureMapperTile_h
#include "FloatRect.h"
#include "Image.h"
#include "TextureMapper.h"
#include "TextureMapperPlatformLayer.h"
#include <wtf/RefPtr.h>
namespace WebCore {
class GraphicsLayer;
class TextureMapperTile {
public:
inline RefPtr<BitmapTexture> texture() const { return m_texture; }
inline FloatRect rect() const { return m_rect; }
inline void setTexture(BitmapTexture* texture) { m_texture = texture; }
inline void setRect(const FloatRect& rect) { m_rect = rect; }
void updateContents(TextureMapper&, Image*, const IntRect&, BitmapTexture::UpdateContentsFlag UpdateCanModifyOriginalImageData);
void updateContents(TextureMapper&, GraphicsLayer*, const IntRect&, BitmapTexture::UpdateContentsFlag UpdateCanModifyOriginalImageData, float scale = 1);
virtual void paint(TextureMapper&, const TransformationMatrix&, float, const unsigned exposedEdges);
virtual ~TextureMapperTile() { }
explicit TextureMapperTile(const FloatRect& rect)
: m_rect(rect)
{
}
private:
RefPtr<BitmapTexture> m_texture;
FloatRect m_rect;
};
}
#endif