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

Issue 1645963002: Optimize the SkRawStream when the input is an asset stream (Closed)

Created:
4 years, 10 months ago by yujieqin
Modified:
4 years, 10 months ago
Reviewers:
msarett, scroggo
CC:
reviews_skia.org, adaubert
Base URL:
https://skia.googlesource.com/skia.git@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Patch Set 1 #

Total comments: 15

Patch Set 2 : Use peekData() instead of getBaseMemory() #

Total comments: 2

Patch Set 3 : Refactor the SkRawStream logic #

Patch Set 4 : Handle the case when getBaseMemory() == nullptr #

Total comments: 24

Patch Set 5 : Address comments and add test #

Total comments: 10

Patch Set 6 : Rebase #

Patch Set 7 : Address comments #

Patch Set 8 : Add missing override #

Unified diffs Side-by-side diffs Delta from patch set Stats (+210 lines, -55 lines) Patch
A + resources/dng_with_preview.dng View 1 2 3 4 Binary file 0 comments Download
M src/codec/SkRawCodec.cpp View 1 2 3 4 5 6 7 6 chunks +160 lines, -55 lines 0 comments Download
M tests/CodexTest.cpp View 1 2 3 4 5 6 3 chunks +50 lines, -0 lines 0 comments Download

Messages

Total messages: 33 (10 generated)
yujieqin
Hi scroggo & msarett, I try to improve the TODO in SkRawCodec about the special ...
4 years, 10 months ago (2016-01-28 11:45:32 UTC) #3
adaubert
https://codereview.chromium.org/1645963002/diff/1/src/codec/SkRawCodec.cpp File src/codec/SkRawCodec.cpp (right): https://codereview.chromium.org/1645963002/diff/1/src/codec/SkRawCodec.cpp#newcode169 src/codec/SkRawCodec.cpp:169: , fIsMemoryStream(fStream->getMemoryBase() != nullptr) {} Would it be better ...
4 years, 10 months ago (2016-01-28 11:54:23 UTC) #4
yujieqin
https://codereview.chromium.org/1645963002/diff/1/src/codec/SkRawCodec.cpp File src/codec/SkRawCodec.cpp (right): https://codereview.chromium.org/1645963002/diff/1/src/codec/SkRawCodec.cpp#newcode169 src/codec/SkRawCodec.cpp:169: , fIsMemoryStream(fStream->getMemoryBase() != nullptr) {} On 2016/01/28 11:54:22, adaubert ...
4 years, 10 months ago (2016-01-28 12:25:14 UTC) #5
yujieqin
On 2016/01/28 11:45:32, yujieqin wrote: > Hi scroggo & msarett, > > I try to ...
4 years, 10 months ago (2016-01-28 12:33:05 UTC) #6
msarett
I like the optimizations to read(). I'm a little concerned about the changes to transferBuffer(). ...
4 years, 10 months ago (2016-01-28 17:25:40 UTC) #8
scroggo
I think this idea is a reasonable optimization to make, although we won't see a ...
4 years, 10 months ago (2016-01-28 18:53:44 UTC) #9
msarett
"It might make more sense to special case for streams that are seekable, which will ...
4 years, 10 months ago (2016-01-29 14:13:09 UTC) #10
yujieqin
https://codereview.chromium.org/1645963002/diff/1/src/codec/SkRawCodec.cpp File src/codec/SkRawCodec.cpp (right): https://codereview.chromium.org/1645963002/diff/1/src/codec/SkRawCodec.cpp#newcode182 src/codec/SkRawCodec.cpp:182: (sum > fStream->getLength()) || On 2016/01/28 17:25:40, msarett wrote: ...
4 years, 10 months ago (2016-02-01 12:59:48 UTC) #12
yujieqin
> I'm a little concerned about the changes to transferBuffer(). Supposing that > the original ...
4 years, 10 months ago (2016-02-01 13:01:37 UTC) #13
msarett
Can we answer these questions? (1) What BitmapFactory APIs are used/important for RAW decodes? (2) ...
4 years, 10 months ago (2016-02-01 16:23:43 UTC) #14
scroggo
On 2016/02/01 16:23:43, msarett wrote: > Can we answer these questions? > > (1) What ...
4 years, 10 months ago (2016-02-01 16:40:18 UTC) #15
msarett
"- SkFILEStream - This one we wrap to make sure we don't rewind past the ...
4 years, 10 months ago (2016-02-01 16:54:23 UTC) #16
scroggo
On 2016/02/01 16:54:23, msarett wrote: > "- SkFILEStream > - This one we wrap to ...
4 years, 10 months ago (2016-02-01 17:12:18 UTC) #17
scroggo
On 2016/02/01 17:12:18, scroggo wrote: > On 2016/02/01 16:54:23, msarett wrote: > > "- SkFILEStream ...
4 years, 10 months ago (2016-02-01 18:26:26 UTC) #18
yujieqin
On 2016/02/01 18:26:26, scroggo wrote: > On 2016/02/01 17:12:18, scroggo wrote: > > On 2016/02/01 ...
4 years, 10 months ago (2016-02-02 13:15:28 UTC) #20
scroggo
We should probably add tests for some of this stuff. In particular, I'm concerned about ...
4 years, 10 months ago (2016-02-02 19:23:06 UTC) #21
yujieqin
I also added some tests. https://codereview.chromium.org/1645963002/diff/60001/src/codec/SkRawCodec.cpp File src/codec/SkRawCodec.cpp (right): https://codereview.chromium.org/1645963002/diff/60001/src/codec/SkRawCodec.cpp#newcode167 src/codec/SkRawCodec.cpp:167: * Gets the length ...
4 years, 10 months ago (2016-02-04 14:50:32 UTC) #22
yujieqin
One question, when I try to run: out/Debug/dm --match Codec for executing the test on ...
4 years, 10 months ago (2016-02-04 14:52:35 UTC) #23
scroggo
From the commit message: > BUG=26841494 This actually makes a link to https://code.google.com/p/chromium/issues/detail?id=26841494. I don't ...
4 years, 10 months ago (2016-02-04 15:46:24 UTC) #24
yujieqin
Rebased. :) https://codereview.chromium.org/1645963002/diff/80001/src/codec/SkRawCodec.cpp File src/codec/SkRawCodec.cpp (right): https://codereview.chromium.org/1645963002/diff/80001/src/codec/SkRawCodec.cpp#newcode160 src/codec/SkRawCodec.cpp:160: bool IsStreamSeekable(const SkStream& stream) { On 2016/02/04 ...
4 years, 10 months ago (2016-02-05 08:53:21 UTC) #26
scroggo
lgtm
4 years, 10 months ago (2016-02-05 15:08:00 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1645963002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1645963002/140001
4 years, 10 months ago (2016-02-05 15:53:03 UTC) #30
commit-bot: I haz the power
4 years, 10 months ago (2016-02-05 16:21:25 UTC) #33
Message was sent while issue was closed.
Committed patchset #8 (id:140001) as
https://skia.googlesource.com/skia/+/9c7a8a464894436fc71a15b5419e818905226cdf

Powered by Google App Engine
This is Rietveld 408576698