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

Issue 892453002: neon code for bgra to rgba conversion for copyFTBitmap

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

Description

neon code for bgra to rgba conversion for copyFTBitmap Tested with below: android_run_skia gm --match coloremo --resourcePath /data/local/tmp -w /data/local/tmp --config 8888 <adb pull imag /data/local/tmp/8888/gm/coloremoji.png> Compared output is same. Measurement show improvement of 90%. BUG=skia:

Patch Set 1 #

Total comments: 6

Patch Set 2 : Added handling of SkPMColor formats and updated variable type and formatting #

Unified diffs Side-by-side diffs Delta from patch set Stats (+92 lines, -0 lines) Patch
M gyp/opts.gypi View 1 chunk +1 line, -0 lines 0 comments Download
M gyp/ports.gyp View 1 chunk +1 line, -0 lines 0 comments Download
A src/opts/SkFontHost_FreeType_common_opts_neon.h View 1 1 chunk +7 lines, -0 lines 0 comments Download
A src/opts/SkFontHost_FreeType_common_opts_neon.cpp View 1 1 chunk +72 lines, -0 lines 0 comments Download
M src/ports/SkFontHost_FreeType_common.cpp View 1 2 chunks +11 lines, -0 lines 0 comments Download

Messages

Total messages: 8 (3 generated)
frederic.ma
Please review the patch
5 years, 10 months ago (2015-01-29 15:37:50 UTC) #2
reed1
https://codereview.chromium.org/892453002/diff/1/src/opts/SkFontHost_FreeType_common_opts_neon.cpp File src/opts/SkFontHost_FreeType_common_opts_neon.cpp (right): https://codereview.chromium.org/892453002/diff/1/src/opts/SkFontHost_FreeType_common_opts_neon.cpp#newcode3 src/opts/SkFontHost_FreeType_common_opts_neon.cpp:3: void BGRA2RGBA_Neon(const uint8_t* src, uint8_t* dst, size_t height, const ...
5 years, 10 months ago (2015-01-29 15:47:20 UTC) #4
bungeman-skia
I'm pretty sure this isn't a hot spot in real use.
5 years, 10 months ago (2015-01-29 15:47:41 UTC) #6
frederic.ma
On 2015/01/29 15:47:41, bungeman1 wrote: > I'm pretty sure this isn't a hot spot in ...
5 years, 10 months ago (2015-01-29 15:49:53 UTC) #7
frederic.ma
5 years, 10 months ago (2015-01-29 18:33:09 UTC) #8
Thanks for the review.
Just updated.

https://codereview.chromium.org/892453002/diff/1/src/opts/SkFontHost_FreeType...
File src/opts/SkFontHost_FreeType_common_opts_neon.cpp (right):

https://codereview.chromium.org/892453002/diff/1/src/opts/SkFontHost_FreeType...
src/opts/SkFontHost_FreeType_common_opts_neon.cpp:3: void BGRA2RGBA_Neon(const
uint8_t* src, uint8_t* dst, size_t height, const size_t width, const size_t
dstRowBytes, const int srcPitch)
On 2015/01/29 15:47:19, reed1 wrote:
> 1. col max is 100
> 2. why is dst..rowBytes and src..Pitch? Skia convention is to use rowBytes

1. Col max fixed
2. dst..rowBytes and src..Pitch renamed.

https://codereview.chromium.org/892453002/diff/1/src/opts/SkFontHost_FreeType...
File src/opts/SkFontHost_FreeType_common_opts_neon.h (right):

https://codereview.chromium.org/892453002/diff/1/src/opts/SkFontHost_FreeType...
src/opts/SkFontHost_FreeType_common_opts_neon.h:1: void BGRA2RGBA_Neon(const
uint8_t* src, uint8_t* dst, size_t height, const size_t width, const size_t
dstRowBytes, const int srcPitch);
On 2015/01/29 15:47:20, reed1 wrote:
> Please document this call:
> - why does it take bytes instead of uint32_t?
> - skia's convention is to use "int" for counts such as width and height, and
> only use size_t for byte counts
> - skia's convention reserves "const" for only refs and pointers.

Done.

https://codereview.chromium.org/892453002/diff/1/src/ports/SkFontHost_FreeTyp...
File src/ports/SkFontHost_FreeType_common.cpp (right):

https://codereview.chromium.org/892453002/diff/1/src/ports/SkFontHost_FreeTyp...
src/ports/SkFontHost_FreeType_common.cpp:234: {
On 2015/01/29 15:47:20, reed1 wrote:
> SkPMColor (which is the desired output swizzle) can be either BGRA or RGBA,
> depending on compile flags, so we can't always call the new function. The
> existing code calls a macro for packing, which always does the correct thing.

My bad. I added compile flag to handle SkPMColor formats.

Powered by Google App Engine
This is Rietveld 408576698