Index: src/core/SkBitmapDevice.cpp |
diff --git a/src/core/SkBitmapDevice.cpp b/src/core/SkBitmapDevice.cpp |
index 36afe42f3ac220cf2fda3a6bdb2c472df3fe5939..dcdc55bbfbe8bda27803d30996243a14bbd44ed4 100644 |
--- a/src/core/SkBitmapDevice.cpp |
+++ b/src/core/SkBitmapDevice.cpp |
@@ -142,7 +142,7 @@ const SkBitmap& SkBitmapDevice::onAccessBitmap() { |
} |
bool SkBitmapDevice::onAccessPixels(SkPixmap* pmap) { |
- if (fBitmap.lockPixelsAreWritable() && this->onPeekPixels(pmap)) { |
+ if (this->onPeekPixels(pmap)) { |
fBitmap.notifyPixelsChanged(); |
return true; |
} |
@@ -185,16 +185,12 @@ bool SkBitmapDevice::onReadPixels(const SkImageInfo& dstInfo, void* dstPixels, s |
void SkBitmapDevice::onAttachToCanvas(SkCanvas* canvas) { |
INHERITED::onAttachToCanvas(canvas); |
- if (fBitmap.lockPixelsAreWritable()) { |
- fBitmap.lockPixels(); |
- } |
+ fBitmap.lockPixels(); |
} |
void SkBitmapDevice::onDetachFromCanvas() { |
INHERITED::onDetachFromCanvas(); |
- if (fBitmap.lockPixelsAreWritable()) { |
- fBitmap.unlockPixels(); |
- } |
+ fBitmap.unlockPixels(); |
} |
/////////////////////////////////////////////////////////////////////////////// |