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

Unified Diff: src/core/SkBitmap.cpp

Issue 172603002: revert to previous behavior in installPixels, allowing for NULL address (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 10 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 5b83b44a66375ff391090c4689c8f94400d6387c..6c9e81f120f88001807295654d9b08c24e605bbe 100644
--- a/src/core/SkBitmap.cpp
+++ b/src/core/SkBitmap.cpp
@@ -503,11 +503,6 @@ bool SkBitmap::installPixels(const SkImageInfo& info, void* pixels, size_t rb,
return false;
}
- // No pixels means just behave like setConfig()
- if (NULL == pixels) {
- return true;
- }
-
SkPixelRef* pr = SkMallocPixelRef::NewWithProc(info, rb, NULL, pixels,
releaseProc, context);
if (!pr) {
@@ -519,7 +514,6 @@ bool SkBitmap::installPixels(const SkImageInfo& info, void* pixels, size_t rb,
// since we're already allocated, we lockPixels right away
this->lockPixels();
- SkASSERT(this->getPixels());
SkDEBUGCODE(this->validate();)
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