revert to previous behavior in installPixels, allowing for NULL address

BUG=skia:

Review URL: https://codereview.chromium.org/172603002

git-svn-id: http://skia.googlecode.com/svn/trunk@13501 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
reed@google.com 2014-02-19 16:57:29 +00:00
parent 6e7ddee374
commit cbad22b0de

View File

@ -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;
}