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

Unified Diff: src/core/SkBitmap.cpp

Issue 1142343010: add assert that the pixelref really did success in requestlock (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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkBitmap.cpp
diff --git a/src/core/SkBitmap.cpp b/src/core/SkBitmap.cpp
index b1198d35d4a762fbc97771db608e01955b5efa90..563fc2875c41221e1cacec39d108febd1f084377 100644
--- a/src/core/SkBitmap.cpp
+++ b/src/core/SkBitmap.cpp
@@ -1361,6 +1361,7 @@ bool SkBitmap::requestLock(SkAutoPixmapUnlock* result) const {
SkPixelRef::LockRequest req = { fInfo.dimensions(), kNone_SkFilterQuality };
SkPixelRef::LockResult res;
if (pr->requestLock(req, &res)) {
+ SkASSERT(res.fPixels);
// The bitmap may be a subset of the pixelref's dimensions
SkASSERT(fPixelRefOrigin.x() + fInfo.width() <= res.fSize.width());
SkASSERT(fPixelRefOrigin.y() + fInfo.height() <= res.fSize.height());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698