Chromium Code Reviews| Index: Source/platform/graphics/BitmapImage.h |
| diff --git a/Source/platform/graphics/BitmapImage.h b/Source/platform/graphics/BitmapImage.h |
| index 2851422976a8998c7973bcae0b78dd8814d6ddb5..76f75145b0c47b684aad709bf3e7f3b374a7657d 100644 |
| --- a/Source/platform/graphics/BitmapImage.h |
| +++ b/Source/platform/graphics/BitmapImage.h |
| @@ -40,7 +40,6 @@ |
| namespace blink { |
| -class NativeImageSkia; |
| template <typename T> class Timer; |
| class PLATFORM_EXPORT BitmapImage : public Image { |
| @@ -49,7 +48,7 @@ class PLATFORM_EXPORT BitmapImage : public Image { |
| friend class GradientGeneratedImage; |
| friend class GraphicsContext; |
| public: |
| - static PassRefPtr<BitmapImage> create(PassRefPtr<NativeImageSkia>, ImageObserver* = 0); |
| + static PassRefPtr<BitmapImage> create(const SkBitmap&, ImageObserver* = 0); |
| static PassRefPtr<BitmapImage> create(ImageObserver* observer = 0) |
| { |
| @@ -57,7 +56,7 @@ public: |
| } |
| // This allows constructing a BitmapImage with a forced non-default orientation. |
| - static PassRefPtr<BitmapImage> createWithOrientationForTesting(PassRefPtr<NativeImageSkia>, ImageOrientation); |
| + static PassRefPtr<BitmapImage> createWithOrientationForTesting(const SkBitmap&, ImageOrientation); |
| virtual ~BitmapImage(); |
| @@ -85,7 +84,7 @@ public: |
| virtual void setAnimationPolicy(ImageAnimationPolicy policy) override { m_animationPolicy = policy; } |
| virtual ImageAnimationPolicy animationPolicy() override { return m_animationPolicy; } |
| - virtual PassRefPtr<NativeImageSkia> nativeImageForCurrentFrame() override; |
| + virtual bool bitmapForCurrentFrame(SkBitmap*) override; |
|
Justin Novosad
2015/03/16 15:16:58
You should use the WARN_UNUSED_RETURN macro here (
Stephen White
2015/03/16 15:41:11
Good idea, but there are several callers in the ex
|
| virtual PassRefPtr<Image> imageForDefaultFrame() override; |
| virtual bool currentFrameKnownToBeOpaque() override; |
| ImageOrientation currentFrameOrientation(); |
| @@ -106,7 +105,7 @@ private: |
| Certain // The repetition count is known to be correct. |
| }; |
| - BitmapImage(PassRefPtr<NativeImageSkia>, ImageObserver* = 0); |
| + BitmapImage(const SkBitmap &, ImageObserver* = 0); |
| BitmapImage(ImageObserver* = 0); |
| void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRect& srcRect, SkXfermode::Mode, RespectImageOrientationEnum) override; |
| @@ -114,7 +113,7 @@ private: |
| size_t currentFrame() const { return m_currentFrame; } |
| size_t frameCount(); |
| - PassRefPtr<NativeImageSkia> frameAtIndex(size_t); |
| + bool frameAtIndex(size_t, SkBitmap*); |
| bool frameIsCompleteAtIndex(size_t); |
| float frameDurationAtIndex(size_t); |