Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(278)

Issue 14230022: Fixes for piping bitmaps with encoded data. (Closed)

Created:
7 years, 8 months ago by scroggo
Modified:
7 years, 7 months ago
Reviewers:
djsollen, reed1
CC:
skia-review_googlegroups.com
Visibility:
Public.

Description

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 Committed: https://code.google.com/p/skia/source/detail?r=8917

Patch Set 1 #

Total comments: 4

Patch Set 2 : Make order of code match order of serialized data. #

Patch Set 3 : Add some asserts and comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+108 lines, -50 lines) Patch
M gm/gmmain.cpp View 3 chunks +8 lines, -3 lines 0 comments Download
M include/core/SkPicture.h View 1 chunk +2 lines, -1 line 0 comments Download
M include/pipe/SkGPipe.h View 3 chunks +11 lines, -4 lines 0 comments Download
M samplecode/SampleApp.cpp View 3 chunks +3 lines, -0 lines 0 comments Download
M src/core/SkOrderedReadBuffer.cpp View 1 1 chunk +37 lines, -19 lines 0 comments Download
M src/core/SkOrderedWriteBuffer.cpp View 1 4 chunks +20 lines, -16 lines 0 comments Download
M src/pipe/SkGPipeRead.cpp View 1 2 5 chunks +17 lines, -2 lines 0 comments Download
M src/pipe/SkGPipeWrite.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/pipe/utils/SamplePipeControllers.h View 3 chunks +4 lines, -2 lines 0 comments Download
M src/pipe/utils/SamplePipeControllers.cpp View 3 chunks +5 lines, -2 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
scroggo
Alternate solution to the changes in https://codereview.chromium.org/14437012/#ps4001
7 years, 8 months ago (2013-04-25 18:46:10 UTC) #1
djsollen
https://codereview.chromium.org/14230022/diff/1/src/core/SkOrderedWriteBuffer.cpp File src/core/SkOrderedWriteBuffer.cpp (right): https://codereview.chromium.org/14230022/diff/1/src/core/SkOrderedWriteBuffer.cpp#newcode155 src/core/SkOrderedWriteBuffer.cpp:155: // 2. Write an encoded version of the bitmap. ...
7 years, 8 months ago (2013-04-25 19:20:36 UTC) #2
scroggo
https://codereview.chromium.org/14230022/diff/1/src/core/SkOrderedWriteBuffer.cpp File src/core/SkOrderedWriteBuffer.cpp (right): https://codereview.chromium.org/14230022/diff/1/src/core/SkOrderedWriteBuffer.cpp#newcode155 src/core/SkOrderedWriteBuffer.cpp:155: // 2. Write an encoded version of the bitmap. ...
7 years, 8 months ago (2013-04-25 20:19:13 UTC) #3
djsollen
lgtm, but Mike may want to comment on the addition of the InstallPixelRefProc
7 years, 8 months ago (2013-04-26 16:14:22 UTC) #4
scroggo
7 years, 7 months ago (2013-04-30 02:34:38 UTC) #5
Message was sent while issue was closed.
Committed patchset #3 manually as r8917 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698