Commit aa6e30c4 authored by xidachen's avatar xidachen Committed by Commit bot

StaticImageBitmap::create should return PassRefPtr<StaticImageBitmap>

instead of PassRefPtr<Image>

Also, move the implementation of "imageForCurrentFrame()" to .cpp file.

Review URL: https://codereview.chromium.org/1460653003

Cr-Commit-Position: refs/heads/master@{#360493}
parent 798856d7
......@@ -14,7 +14,7 @@
namespace blink {
PassRefPtr<Image> StaticBitmapImage::create(PassRefPtr<SkImage> image)
PassRefPtr<StaticBitmapImage> StaticBitmapImage::create(PassRefPtr<SkImage> image)
{
if (!image)
return nullptr;
......@@ -60,4 +60,9 @@ void StaticBitmapImage::draw(SkCanvas* canvas, const SkPaint& paint, const Float
observer->didDraw(this);
}
PassRefPtr<SkImage> StaticBitmapImage::imageForCurrentFrame()
{
return m_image;
}
} // namespace blink
......@@ -15,13 +15,13 @@ public:
bool currentFrameIsComplete() override { return true; }
static PassRefPtr<Image> create(PassRefPtr<SkImage>);
static PassRefPtr<StaticBitmapImage> create(PassRefPtr<SkImage>);
virtual void destroyDecodedData(bool destroyAll) { }
virtual bool currentFrameKnownToBeOpaque();
virtual IntSize size() const;
void draw(SkCanvas*, const SkPaint&, const FloatRect& dstRect, const FloatRect& srcRect, RespectImageOrientationEnum, ImageClampingMode) override;
PassRefPtr<SkImage> imageForCurrentFrame() override { return m_image; }
PassRefPtr<SkImage> imageForCurrentFrame() override;
protected:
StaticBitmapImage(PassRefPtr<SkImage>);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment