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

Issue 1671003004: Skip memcpy() swizzles in SkPngCodec (Closed)

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

Description

Skip memcpy() swizzles in SkPngCodec Index8->Index8 PNG Decode Time (Nexus 6P) 0.97x Gray8->Gray8 PNG Decode Time (Nexus 6P) 0.97x RGBA->RGBA-Unpremul PNG Decode Time (Nexus 6P) 0.98x BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1671003004 CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Patch Set 1 : First Approach #

Total comments: 4

Patch Set 2 : Second attempt #

Total comments: 3

Patch Set 3 : Try making a single call to read_rows #

Unified diffs Side-by-side diffs Delta from patch set Stats (+115 lines, -68 lines) Patch
M src/codec/SkPngCodec.h View 1 1 chunk +6 lines, -6 lines 0 comments Download
M src/codec/SkPngCodec.cpp View 1 2 13 chunks +109 lines, -62 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 10 (5 generated)
msarett
I'm leaning against landing something like this. Though I might try to refactor Patch Set ...
4 years, 10 months ago (2016-02-05 20:48:18 UTC) #6
scroggo
On 2016/02/05 20:48:18, msarett wrote: > I'm leaning against landing something like this. Though I ...
4 years, 10 months ago (2016-02-05 20:51:59 UTC) #7
msarett
Sorry I meant to mention this. Yes, please look at Patch Set 2. No reason ...
4 years, 10 months ago (2016-02-05 20:53:51 UTC) #8
scroggo
lgtm https://codereview.chromium.org/1671003004/diff/40001/src/codec/SkPngCodec.cpp File src/codec/SkPngCodec.cpp (right): https://codereview.chromium.org/1671003004/diff/40001/src/codec/SkPngCodec.cpp#newcode563 src/codec/SkPngCodec.cpp:563: png_read_rows(fPng_ptr, &rowPtr, nullptr, 1); if (!swizzler), would it ...
4 years, 10 months ago (2016-02-05 21:36:52 UTC) #9
msarett
4 years, 10 months ago (2016-02-05 22:14:16 UTC) #10
I'm closing this.

As we discussed in person, I don't think it makes sense to add this amount of
complexity for minimal gains.

https://codereview.chromium.org/1671003004/diff/40001/src/codec/SkPngCodec.cpp
File src/codec/SkPngCodec.cpp (right):

https://codereview.chromium.org/1671003004/diff/40001/src/codec/SkPngCodec.cp...
src/codec/SkPngCodec.cpp:563: png_read_rows(fPng_ptr, &rowPtr, nullptr, 1);
On 2016/02/05 21:36:52, scroggo wrote:
> if (!swizzler), would it make sense to call this with an array of row pointers
> and height for the last parameter, instead of looping?

This looks like it makes things another half percent faster...

Powered by Google App Engine
This is Rietveld 408576698