diff options
author | mike@reedtribe.org <mike@reedtribe.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-02-16 20:54:21 +0000 |
---|---|---|
committer | mike@reedtribe.org <mike@reedtribe.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-02-16 20:54:21 +0000 |
commit | 6e58cf36f0eba4b195726aa714d5487c91d06d04 (patch) | |
tree | eeaf849a50be871f66a3567250222633871a4347 /src/core/SkBitmap.cpp | |
parent | 5a346a85027fc8aae5d836d951e455a22b3272d0 (diff) |
restore old behavior of setPixels(): lockPixels after installPixels()
git-svn-id: http://skia.googlecode.com/svn/trunk@13468 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core/SkBitmap.cpp')
-rw-r--r-- | src/core/SkBitmap.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/SkBitmap.cpp b/src/core/SkBitmap.cpp index 3e53cd7635..151ab50290 100644 --- a/src/core/SkBitmap.cpp +++ b/src/core/SkBitmap.cpp @@ -511,6 +511,11 @@ bool SkBitmap::installPixels(const SkImageInfo& info, void* pixels, size_t rb, } this->setPixelRef(pr)->unref(); + + // since we're already allocated, we lockPixels right away + this->lockPixels(); + SkASSERT(this->getPixels()); + SkDEBUGCODE(this->validate();) return true; } |