diff options
author | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-12-07 15:53:49 +0000 |
---|---|---|
committer | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-12-07 15:53:49 +0000 |
commit | c52295f9ddc5592260b8adfce3d2778d4a21c9f2 (patch) | |
tree | 97f0b8960a231450a93994219fbb6388531203da /src/core | |
parent | d27fe34d1eb7640bb17062aa8529283e297de18e (diff) |
mark bitmaps as immutable as we deserialize them into picture-playback
Review URL: https://codereview.appspot.com/6900045
git-svn-id: http://skia.googlecode.com/svn/trunk@6703 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/SkPicturePlayback.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/SkPicturePlayback.cpp b/src/core/SkPicturePlayback.cpp index b1b51122cf..d0a29d3c9d 100644 --- a/src/core/SkPicturePlayback.cpp +++ b/src/core/SkPicturePlayback.cpp @@ -505,7 +505,9 @@ bool SkPicturePlayback::parseBufferTag(SkOrderedReadBuffer& buffer, case PICT_BITMAP_BUFFER_TAG: { fBitmaps = SkTRefArray<SkBitmap>::Create(size); for (size_t i = 0; i < size; ++i) { - buffer.readBitmap(&fBitmaps->writableAt(i)); + SkBitmap* bm = &fBitmaps->writableAt(i); + buffer.readBitmap(bm); + bm->setImmutable(); } } break; case PICT_MATRIX_BUFFER_TAG: |