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

Unified Diff: src/core/SkPixelRef.cpp

Issue 1159953006: check (runtime) for null-pixels even when lock succeeds (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 7 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 | « src/core/SkMipMap.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPixelRef.cpp
diff --git a/src/core/SkPixelRef.cpp b/src/core/SkPixelRef.cpp
index c5aa3d130d4bb49d55e0f85160ee32f85927af64..4d6526882070d6decec685e0150127322bf75e1d 100644
--- a/src/core/SkPixelRef.cpp
+++ b/src/core/SkPixelRef.cpp
@@ -199,7 +199,7 @@ bool SkPixelRef::lockPixelsInsideMutex() {
}
}
validate_pixels_ctable(fInfo, fRec.fPixels, fRec.fColorTable);
- return true;
+ return fRec.fPixels != NULL;
}
// For historical reasons, we always inc fLockCount, even if we return false.
@@ -224,7 +224,7 @@ bool SkPixelRef::lockPixels() {
}
}
validate_pixels_ctable(fInfo, fRec.fPixels, fRec.fColorTable);
- return true;
+ return fRec.fPixels != NULL;
}
bool SkPixelRef::lockPixels(LockRec* rec) {
@@ -274,7 +274,7 @@ bool SkPixelRef::requestLock(const LockRequest& request, LockResult* result) {
}
}
validate_pixels_ctable(fInfo, result->fPixels, result->fCTable);
- return true;
+ return result->fPixels != NULL;
}
bool SkPixelRef::lockPixelsAreWritable() const {
« no previous file with comments | « src/core/SkMipMap.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698