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

Unified Diff: Source/platform/graphics/Image.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/Image.h
diff --git a/Source/platform/graphics/Image.h b/Source/platform/graphics/Image.h
index afe4e96b5339e58a245bc3710485baa27a18792b..0cf7c1a4df71f022c78d1383e59c221e5e3d1367 100644
--- a/Source/platform/graphics/Image.h
+++ b/Source/platform/graphics/Image.h
@@ -33,7 +33,7 @@
#include "platform/graphics/GraphicsTypes.h"
#include "platform/graphics/ImageAnimationPolicy.h"
#include "platform/graphics/ImageOrientation.h"
-#include "platform/graphics/skia/NativeImageSkia.h"
+#include "third_party/skia/include/core/SkBitmap.h"
f(malita) 2015/03/15 00:32:45 Could this be a fwdecl if we move bitmapForCurrent
Stephen White 2015/03/15 16:49:31 Sadly no, since SkBitmap is returned by value. Out
f(malita) 2015/03/16 03:05:06 I think incomplete return types are allowed in dec
#include "third_party/skia/include/core/SkXfermode.h"
#include "wtf/Assertions.h"
#include "wtf/PassRefPtr.h"
@@ -126,7 +126,7 @@ public:
enum TileRule { StretchTile, RoundTile, SpaceTile, RepeatTile };
- virtual PassRefPtr<NativeImageSkia> nativeImageForCurrentFrame() { return nullptr; }
+ virtual SkBitmap bitmapForCurrentFrame() { return SkBitmap(); }
virtual PassRefPtr<Image> imageForDefaultFrame();
@@ -148,6 +148,8 @@ protected:
void drawTiled(GraphicsContext*, const FloatRect& dstRect, const FloatPoint& srcPoint, const FloatSize& tileSize,
SkXfermode::Mode, const IntSize& repeatSpacing);
void drawTiled(GraphicsContext*, const FloatRect& dstRect, const FloatRect& srcRect, const FloatSize& tileScaleFactor, TileRule hRule, TileRule vRule, SkXfermode::Mode);
+ static void drawBitmap(GraphicsContext*, const SkBitmap&, const SkRect& srcRect, const SkRect& destRect, SkXfermode::Mode);
+ static void drawBitmapPattern(GraphicsContext*, const SkBitmap&, const FloatRect& srcRect, const FloatSize& scale, const FloatPoint& phase, SkXfermode::Mode, const FloatRect& destRect, const IntSize& repeatSpacing);
// Supporting tiled drawing
virtual bool mayFillWithSolidColor() { return false; }

Powered by Google App Engine
This is Rietveld 408576698