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

Unified Diff: src/core/SkBitmapDevice.cpp

Issue 2177063002: lockPixelsAreWritable is deprecated (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update test Created 4 years, 5 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
« no previous file with comments | « include/core/SkBitmap.h ('k') | tests/ReadPixelsTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
///////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « include/core/SkBitmap.h ('k') | tests/ReadPixelsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698