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

Unified Diff: src/core/SkBitmapProcState.cpp

Issue 27530003: check of fScaledBitmap failed to lock (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 69af8b9061a4d5e820cdb6e0a677ba06336ade9a..db446a2445a50668ad4524894efbdd33c435d7a4 100644
--- a/src/core/SkBitmapProcState.cpp
+++ b/src/core/SkBitmapProcState.cpp
@@ -159,6 +159,12 @@ bool SkBitmapProcState::possiblyScaleImage() {
fScaledBitmap);
}
fScaledBitmap.lockPixels(); // wonder if Resize() should have locked this
+ 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;
// set the inv matrix type to translate-only;
« 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