Index: src/core/SkDevice.cpp |
diff --git a/src/core/SkDevice.cpp b/src/core/SkDevice.cpp |
index 9ce8b6b5df2e2a002bbd7fee9d5836df557c244d..4bf8516fd7a1dca231d5f97675e0fc71d5a4b0bc 100644 |
--- a/src/core/SkDevice.cpp |
+++ b/src/core/SkDevice.cpp |
@@ -65,6 +65,16 @@ SkMetaData& SkBaseDevice::getMetaData() { |
return *fMetaData; |
} |
+// TODO: when we can remove width/height/config from SkBaseDevice, then other |
+// classes should explicitly override this guy. |
+SkImageInfo SkBaseDevice::imageInfo() const { |
+ return SkImageInfo::Make(this->width(), |
+ this->height(), |
+ SkBitmapConfigToColorType(this->config()), |
+ this->isOpaque() ? kOpaque_SkAlphaType : |
+ kPremul_SkAlphaType); |
+} |
+ |
const SkBitmap& SkBaseDevice::accessBitmap(bool changePixels) { |
const SkBitmap& bitmap = this->onAccessBitmap(); |
if (changePixels) { |
@@ -117,3 +127,5 @@ bool SkBaseDevice::readPixels(SkBitmap* bitmap, int x, int y, |
} |
SkSurface* SkBaseDevice::newSurface(const SkImageInfo&) { return NULL; } |
+ |
+const void* SkBaseDevice::peekPixels(SkImageInfo*, size_t*) { return NULL; } |