Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1429)

Unified Diff: Source/platform/graphics/BitmapImage.h

Issue 1001703003: Take NativeImageSkia out behind the woodshed. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Make bitmapForCurrentFrame() return SkBitmap by value. Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/platform/graphics/BitmapImage.h
diff --git a/Source/platform/graphics/BitmapImage.h b/Source/platform/graphics/BitmapImage.h
index 2851422976a8998c7973bcae0b78dd8814d6ddb5..29c0943183e3262cf327766b57d6f1fe424e9e40 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 SkBitmap bitmapForCurrentFrame() override;
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);
+ SkBitmap frameAtIndex(size_t);
bool frameIsCompleteAtIndex(size_t);
float frameDurationAtIndex(size_t);

Powered by Google App Engine
This is Rietveld 408576698