Index: Source/core/page/ImageBitmap.h |
diff --git a/Source/core/page/ImageBitmap.h b/Source/core/page/ImageBitmap.h |
index 8b8c01c740152758474622c112de18a4dcdc193b..da08ea49ca3a06d4f1b7487a0ea662f7806038c3 100644 |
--- a/Source/core/page/ImageBitmap.h |
+++ b/Source/core/page/ImageBitmap.h |
@@ -30,16 +30,18 @@ public: |
static PassRefPtr<ImageBitmap> create(ImageData*, IntRect); |
static PassRefPtr<ImageBitmap> create(ImageBitmap*, IntRect); |
- BitmapImage* bitmapImage() const { return m_bitmap.get(); } |
+ PassRefPtr<Image> bitmapImage() const { return m_bitmap; } |
+ bool derivedFromCanvas() const { return m_derivedFromCanvas; } |
- int bitmapWidth() const { return m_bitmap->width(); } |
- int bitmapHeight() const { return m_bitmap->height(); } |
- IntSize bitmapSize() const { return m_bitmap->size(); } |
+ int bitmapWidth() const { return m_bitmapSize.width(); } |
+ int bitmapHeight() const { return m_bitmapSize.height(); } |
+ IntSize bitmapSize() const { return m_bitmapSize; } |
IntPoint bitmapOffset() const { return m_bitmapOffset; } |
- int width() const { return m_size.width(); } |
- int height() const { return m_size.height(); } |
- IntSize size() const { return m_size; } |
+ int width() const { return m_cropRect.width(); } |
+ int height() const { return m_cropRect.height(); } |
+ IntSize size() const { return m_cropRect.size(); } |
+ IntRect cropRect() const { return m_cropRect; } |
~ImageBitmap() { }; |
@@ -50,11 +52,14 @@ private: |
ImageBitmap(ImageData*, IntRect); |
ImageBitmap(ImageBitmap*, IntRect); |
- RefPtr<BitmapImage> m_bitmap; |
+ RefPtr<Image> m_bitmap; |
Justin Novosad
2013/07/22 15:35:41
With what we've discussed, should this be CachedIm
|
OwnPtr<ImageBuffer> m_buffer; |
IntPoint m_bitmapOffset; // offset applied to the image when it is drawn to the context |
- IntSize m_size; // user defined size of the ImageBitmap |
+ IntSize m_bitmapSize; // actual size of the BitmapImage |
+ IntRect m_cropRect; // user defined size of the ImageBitmap |
+ |
+ bool m_derivedFromCanvas; |
}; |
} // namespace WebCore |