Index: third_party/WebKit/Source/core/frame/ImageBitmap.h |
diff --git a/third_party/WebKit/Source/core/frame/ImageBitmap.h b/third_party/WebKit/Source/core/frame/ImageBitmap.h |
index 71fd4a52f3b7c348eb5679ca5c961ad580afda69..3917d8e19335eeb418fc631aa286f4cbc993e6e1 100644 |
--- a/third_party/WebKit/Source/core/frame/ImageBitmap.h |
+++ b/third_party/WebKit/Source/core/frame/ImageBitmap.h |
@@ -33,12 +33,16 @@ public: |
static PassRefPtrWillBeRawPtr<ImageBitmap> create(ImageData*, const IntRect&); |
static PassRefPtrWillBeRawPtr<ImageBitmap> create(ImageBitmap*, const IntRect&); |
static PassRefPtrWillBeRawPtr<ImageBitmap> create(Image*, const IntRect&); |
+ static PassRefPtrWillBeRawPtr<ImageBitmap> create(SkImage*); |
Justin Novosad
2015/11/11 05:29:08
SkImage* => PassRefPtr<SkImage>
xidachen
2015/11/16 18:00:51
Done.
|
SkImage* skImage() const { return (m_image) ? m_image.get() : nullptr; } |
int width() const { return (m_image) ? m_image->width(): 0; } |
int height() const { return (m_image) ? m_image->height(): 0; } |
IntSize size() const { return (m_image) ? IntSize(m_image->width(), m_image->height()) : IntSize(); } |
+ bool isNeutered() const { return !m_image; } |
Justin Novosad
2015/11/11 05:29:08
are we 100% sure that !m_image always means that t
xidachen
2015/11/16 18:00:51
This is a good point. I think we should have a pri
|
+ PassRefPtr<SkImage> transfer(); |
+ |
~ImageBitmap() override; |
// CanvasImageSource implementation |
@@ -56,6 +60,7 @@ private: |
ImageBitmap(ImageData*, const IntRect&); |
ImageBitmap(ImageBitmap*, const IntRect&); |
ImageBitmap(Image*, const IntRect&); |
+ ImageBitmap(SkImage*); |
PassRefPtr<SkImage> cropImage(PassRefPtr<SkImage>, const IntRect&); |