diff options
author | vandebo@chromium.org <vandebo@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2010-10-26 19:43:14 +0000 |
---|---|---|
committer | vandebo@chromium.org <vandebo@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2010-10-26 19:43:14 +0000 |
commit | ad11495e3d0809e4cc264f7302e399a7a5f430d0 (patch) | |
tree | 8ee2c2b99edadf02e69c684a18e27e24b7f9942b | |
parent | 9b49dc0db8254e3dcdc2de4a1e0add4f8a7ac5a8 (diff) |
Bug fix in SkPDFImage.
Need to lock the pixels to make sure they are there.
Review URL: http://codereview.appspot.com/2717041
git-svn-id: http://skia.googlecode.com/svn/trunk@615 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r-- | src/pdf/SkPDFImage.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/pdf/SkPDFImage.cpp b/src/pdf/SkPDFImage.cpp index b480089b17..65b9b24514 100644 --- a/src/pdf/SkPDFImage.cpp +++ b/src/pdf/SkPDFImage.cpp @@ -31,6 +31,7 @@ namespace { SkMemoryStream* extractImageData(const SkBitmap& bitmap) { SkMemoryStream* result; + bitmap.lockPixels(); switch (bitmap.getConfig()) { case SkBitmap::kIndex8_Config: result = new SkMemoryStream(bitmap.getPixels(), bitmap.getSize(), @@ -110,6 +111,7 @@ SkMemoryStream* extractImageData(const SkBitmap& bitmap) { default: SkASSERT(false); } + bitmap.unlockPixels(); return result; } |