Index: src/image/SkImage.cpp |
diff --git a/src/image/SkImage.cpp b/src/image/SkImage.cpp |
index f11900dcaa29e7fa748d70f5c641280081bb383d..cbde961b7838ed5902c6796ffe963d903d63c49b 100644 |
--- a/src/image/SkImage.cpp |
+++ b/src/image/SkImage.cpp |
@@ -9,14 +9,7 @@ |
#include "SkCanvas.h" |
#include "SkImagePriv.h" |
#include "SkImage_Base.h" |
- |
-static SkImage_Base* as_IB(SkImage* image) { |
- return static_cast<SkImage_Base*>(image); |
-} |
- |
-static const SkImage_Base* as_IB(const SkImage* image) { |
- return static_cast<const SkImage_Base*>(image); |
-} |
+#include "SkSurface.h" |
uint32_t SkImage::NextUniqueID() { |
static int32_t gUniqueID; |
@@ -91,6 +84,13 @@ SkData* SkImage::encode(SkImageEncoder::Type type, int quality) const { |
return NULL; |
} |
+SkSurface* SkImage::newSurface(const SkImageInfo& info, const SkSurfaceProps* props) const { |
+ if (NULL == props) { |
+ props = &as_IB(this)->props(); |
+ } |
+ return as_IB(this)->onNewSurface(info, *props); |
+} |
+ |
/////////////////////////////////////////////////////////////////////////////// |
static bool raster_canvas_supports(const SkImageInfo& info) { |