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

Unified Diff: src/core/SkBitmapProcState.cpp

Issue 26973006: catch the other case where we need to see if fScaledBitmap.lockPixels() might have failed (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 2 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/SkBitmapProcState.cpp
diff --git a/src/core/SkBitmapProcState.cpp b/src/core/SkBitmapProcState.cpp
index db446a2445a50668ad4524894efbdd33c435d7a4..c50266f017328c4adfddc28502281a32b098c644 100644
--- a/src/core/SkBitmapProcState.cpp
+++ b/src/core/SkBitmapProcState.cpp
@@ -299,6 +299,11 @@ bool SkBitmapProcState::lockBaseBitmap() {
}
}
fScaledBitmap.lockPixels(); // just 'cause the cache made a copy :(
+ if (!fScaledBitmap.getPixels()) {
+ // TODO: find out how this can happen, and add a unittest to exercise
+ // inspired by BUG=chromium:295895
+ return false;
+ }
fBitmap = &fScaledBitmap;
return true;
}
« 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