Index: src/core/SkDevice.cpp |
diff --git a/src/core/SkDevice.cpp b/src/core/SkDevice.cpp |
index bc6c892079622f956f00441d7b153c644974dd25..88f718b69c0d9070436dc8e3767a02d08ecd2d0a 100644 |
--- a/src/core/SkDevice.cpp |
+++ b/src/core/SkDevice.cpp |
@@ -12,9 +12,11 @@ |
#include "SkPatchUtils.h" |
#include "SkShader.h" |
#include "SkTextBlob.h" |
+#include "SkImage_Base.h" |
SkBaseDevice::SkBaseDevice() |
: fLeakyProperties(SkNEW_ARGS(SkDeviceProperties, (SkDeviceProperties::kLegacyLCD_InitType))) |
+ , fSurfaceBase(NULL) |
#ifdef SK_DEBUG |
, fAttachedToCanvas(false) |
#endif |
@@ -25,6 +27,7 @@ SkBaseDevice::SkBaseDevice() |
SkBaseDevice::SkBaseDevice(const SkDeviceProperties& dp) |
: fLeakyProperties(SkNEW_ARGS(SkDeviceProperties, (dp))) |
+ , fSurfaceBase(NULL) |
#ifdef SK_DEBUG |
, fAttachedToCanvas(false) |
#endif |
@@ -102,6 +105,16 @@ void SkBaseDevice::drawDRRect(const SkDraw& draw, const SkRRect& outer, |
this->drawPath(draw, path, paint, preMatrix, pathIsMutable); |
} |
+void SkBaseDevice::drawImage(const SkDraw& draw, const SkImage& image, |
+ int x, int y, const SkPaint& paint) { |
+ SkBitmap bitmap; |
+ if (!as_IB(&image)->getROPixels(&bitmap)) { |
+ return; |
+ } |
+ this->drawSprite(draw, bitmap, x, y, paint); |
+} |
+ |
+ |
void SkBaseDevice::drawPatch(const SkDraw& draw, const SkPoint cubics[12], const SkColor colors[4], |
const SkPoint texCoords[4], SkXfermode* xmode, const SkPaint& paint) { |
SkPatchUtils::VertexData data; |