diff options
author | bungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-07-25 16:09:10 +0000 |
---|---|---|
committer | bungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-07-25 16:09:10 +0000 |
commit | 7cf0e9e555290e11d18496a01d85a0ece00b3f43 (patch) | |
tree | 652ebe6976e81c60f7a839bb54e6542f2f7b913a /src | |
parent | de9ac1446c4e2b231af83337186105ec7350c751 (diff) |
Prevent MipMaps from crashing.
git-svn-id: http://skia.googlecode.com/svn/trunk@4753 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src')
-rw-r--r-- | src/core/SkBitmap.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/SkBitmap.cpp b/src/core/SkBitmap.cpp index 2df5e56e5a..687cf7a000 100644 --- a/src/core/SkBitmap.cpp +++ b/src/core/SkBitmap.cpp @@ -1161,11 +1161,13 @@ void SkBitmap::buildMipMap(bool forceRebuild) { dstBM.setConfig(config, width, height, rowBytes); dstBM.setPixels(addr); + srcBM.lockPixels(); for (int y = 0; y < height; y++) { for (int x = 0; x < width; x++) { proc(&dstBM, x, y, srcBM); } } + srcBM.unlockPixels(); srcBM = dstBM; addr += height * rowBytes; |