Fixes for piping bitmaps with encoded data.
authorscroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Tue, 30 Apr 2013 02:32:41 +0000 (02:32 +0000)
committerscroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Tue, 30 Apr 2013 02:32:41 +0000 (02:32 +0000)
commit74b7ffda687c66d46ac3cfa4f2baedd4c62e3fbe
tree32a50dd0204aabd8ba2264f396f462c8dd05182c
parentaf5c506cd6b63f43a0ebee2fb171ea55ba98e09f
Fixes for piping bitmaps with encoded data.

Similar goals as https://codereview.chromium.org/14437012.

Builds on patch set 1 from that issue
(https://codereview.chromium.org/14437012/#ps1).

Instead of the changes in patch set 2 from that issue, this
changes SkOrderedWriteBuffer::writeBitmap to store whether an
SkBitmapHeap was used when to store the index of the SkBitmap.
SkOrderedReadBuffer::readBitmap now uses that information to
distinguish between using the heap and unflattening.

In addition, writeBitmap now records the width/height first in
all cases. If now SkBitmapHeapReader is attached, but an
SkBitmapHeap was used to record the bitmap, reading will fail
and provide the same red SkBitmap as in the case where the
SkBitmap was encoded but could not be decoded.

Updates the PICTURE_VERSION as well.

The key differences in this CL to look at are in:
SkOrderedWriteBuffer,
SkOrderedReadBuffer,
and SkPicture.

BUG=
R=djsollen@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@8917 2bbb7eff-a529-9590-31e7-b0007b416f81
gm/gmmain.cpp
include/core/SkPicture.h
include/pipe/SkGPipe.h
samplecode/SampleApp.cpp
src/core/SkOrderedReadBuffer.cpp
src/core/SkOrderedWriteBuffer.cpp
src/pipe/SkGPipeRead.cpp
src/pipe/SkGPipeWrite.cpp
src/pipe/utils/SamplePipeControllers.cpp
src/pipe/utils/SamplePipeControllers.h