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

Issue 15402003: Improve the performance of SkConvertConfig8888Pixels using Array lookup (Closed)

Created:
7 years, 7 months ago by Jun Jiang
Modified:
7 years, 6 months ago
CC:
skia-review_googlegroups.com, ernstm
Visibility:
Public.

Description

Improve the performance of SkConvertConfig8888Pixels using Array lookup BUG=242097 Committed: http://code.google.com/p/skia/source/detail?r=9605

Patch Set 1 #

Patch Set 2 : Move to SkUnPreMultiply and add bench test #

Total comments: 4

Patch Set 3 : change some code to follow the style #

Total comments: 6

Patch Set 4 : Move the bench to another CL #

Patch Set 5 : change to use SkMulDiv255Round to benifit ARM architecture #

Unified diffs Side-by-side diffs Delta from patch set Stats (+10 lines, -12 lines) Patch
M src/core/SkConfig8888.cpp View 1 2 3 4 2 chunks +10 lines, -12 lines 0 comments Download

Messages

Total messages: 49 (0 generated)
Jun Jiang
This issue is found when investigating the issue of http://code.google.com/p/chromium/issues/detail?id=235783. With this patch, the performance ...
7 years, 7 months ago (2013-05-19 15:33:16 UTC) #1
reed1
Since this CL involve allocating a modest amount of memory, and therefore adds some complexity, ...
7 years, 7 months ago (2013-05-20 13:37:02 UTC) #2
Ken Russell (switch to Gerrit)
Manfred's investigated color conversions throughout Skia, WebKit and Chrome and will be interested in looking ...
7 years, 7 months ago (2013-05-20 21:45:30 UTC) #3
vangelis
On 2013/05/20 21:45:30, kbr wrote: > Manfred's investigated color conversions throughout Skia, WebKit and Chrome ...
7 years, 7 months ago (2013-05-21 04:47:31 UTC) #4
Jun Jiang
On 2013/05/21 04:47:31, vangelis wrote: > On 2013/05/20 21:45:30, kbr wrote: > > Manfred's investigated ...
7 years, 7 months ago (2013-05-21 15:40:01 UTC) #5
Jun Jiang
On 2013/05/21 15:40:01, Jun Jiang wrote: > On 2013/05/21 04:47:31, vangelis wrote: > > On ...
7 years, 7 months ago (2013-05-27 13:14:49 UTC) #6
Jun Jiang
Sorry for the delay due to my business travel. I have refined the patch according ...
7 years, 6 months ago (2013-05-30 08:14:58 UTC) #7
bsalomon
Have you run the "tests" unit test app?
7 years, 6 months ago (2013-05-30 13:03:41 UTC) #8
Tom Hudson
On 2013/05/30 08:14:58, Jun Jiang wrote: ... > Obvious performance gain is obtained by having ...
7 years, 6 months ago (2013-05-30 13:11:30 UTC) #9
Jun Jiang
On 2013/05/30 13:03:41, bsalomon wrote: > Have you run the "tests" unit test app? Yes, ...
7 years, 6 months ago (2013-05-31 00:37:29 UTC) #10
Jun Jiang
On 2013/05/30 13:11:30, Tom Hudson wrote: > On 2013/05/30 08:14:58, Jun Jiang wrote: > ...
7 years, 6 months ago (2013-05-31 00:49:06 UTC) #11
Jun Jiang
On 2013/05/31 00:49:06, Jun Jiang wrote: > On 2013/05/30 13:11:30, Tom Hudson wrote: > > ...
7 years, 6 months ago (2013-05-31 08:45:48 UTC) #12
bsalomon
I don't understand why you're seeing a perf increase for the GPU and NULLGPU configs. ...
7 years, 6 months ago (2013-05-31 12:42:07 UTC) #13
Jun Jiang
On 2013/05/31 12:42:07, bsalomon wrote: > I don't understand why you're seeing a perf increase ...
7 years, 6 months ago (2013-05-31 14:22:29 UTC) #14
bsalomon
On 2013/05/31 14:22:29, Jun Jiang wrote: > On 2013/05/31 12:42:07, bsalomon wrote: > > I ...
7 years, 6 months ago (2013-05-31 14:31:44 UTC) #15
Jun Jiang
On 2013/05/31 14:31:44, bsalomon wrote: > On 2013/05/31 14:22:29, Jun Jiang wrote: > > On ...
7 years, 6 months ago (2013-05-31 14:52:39 UTC) #16
bsalomon
On 2013/05/31 14:52:39, Jun Jiang wrote: > On 2013/05/31 14:31:44, bsalomon wrote: > > On ...
7 years, 6 months ago (2013-05-31 15:04:37 UTC) #17
Jun Jiang
The code has been changed to follow the style. https://codereview.chromium.org/15402003/diff/20001/bench/PremulAndUnpremulAlphaOpsBench.cpp File bench/PremulAndUnpremulAlphaOpsBench.cpp (right): https://codereview.chromium.org/15402003/diff/20001/bench/PremulAndUnpremulAlphaOpsBench.cpp#newcode30 bench/PremulAndUnpremulAlphaOpsBench.cpp:30: ...
7 years, 6 months ago (2013-05-31 15:10:58 UTC) #18
Noel Gordon
https://codereview.chromium.org/15402003/diff/34002/src/core/SkConfig8888.cpp File src/core/SkConfig8888.cpp (right): https://codereview.chromium.org/15402003/diff/34002/src/core/SkConfig8888.cpp#newcode62 src/core/SkConfig8888.cpp:62: // performant way to unpremul than (value * 0xff) ...
7 years, 6 months ago (2013-06-04 05:55:18 UTC) #19
Jun Jiang
https://codereview.chromium.org/15402003/diff/34002/src/core/SkConfig8888.cpp File src/core/SkConfig8888.cpp (right): https://codereview.chromium.org/15402003/diff/34002/src/core/SkConfig8888.cpp#newcode62 src/core/SkConfig8888.cpp:62: // performant way to unpremul than (value * 0xff) ...
7 years, 6 months ago (2013-06-04 06:35:10 UTC) #20
Noel Gordon
Per https://codereview.appspot.com/3466042 seems we might regress third_party/WebKit/LayoutTest/canvas/philip/tests/2d.imageData.put.unchanged.html when using SkUnPreMultiply::ApplyScale() to compute (v * 255 ...
7 years, 6 months ago (2013-06-04 06:42:56 UTC) #21
Noel Gordon
I just ran that test with your change, and the test passes for me.
7 years, 6 months ago (2013-06-04 07:05:30 UTC) #22
Noel Gordon
So I think we should use the rounding method. https://codereview.appspot.com/3466042 had an example of it, ...
7 years, 6 months ago (2013-06-04 07:13:06 UTC) #23
Noel Gordon
https://codereview.chromium.org/15402003/diff/34002/src/core/SkConfig8888.cpp File src/core/SkConfig8888.cpp (right): https://codereview.chromium.org/15402003/diff/34002/src/core/SkConfig8888.cpp#newcode73 src/core/SkConfig8888.cpp:73: r = SkDiv255Round(r * a); Could you test using ...
7 years, 6 months ago (2013-06-04 07:16:05 UTC) #24
Jun Jiang
On 2013/06/04 07:05:30, Noel Gordon (Google) wrote: > I just ran that test with your ...
7 years, 6 months ago (2013-06-04 07:21:19 UTC) #25
Noel Gordon
Good, now do #24 :"Could you test using the following here and tell me if ...
7 years, 6 months ago (2013-06-04 07:24:17 UTC) #26
Jun Jiang
On 2013/06/04 07:24:17, Noel Gordon (Google) wrote: > Good, now do #24 :"Could you test ...
7 years, 6 months ago (2013-06-04 07:31:06 UTC) #27
Noel Gordon
Good. Can you measure the performance again when this r = SkDiv255Round(SkMulS16(r, a)) etc method?
7 years, 6 months ago (2013-06-04 07:33:18 UTC) #28
Jun Jiang
On 2013/06/04 07:33:18, Noel Gordon (Google) wrote: > Good. Can you measure the performance again ...
7 years, 6 months ago (2013-06-04 07:55:16 UTC) #29
Noel Gordon
Ok good. Since you want speed, there's a faster way to compute the SkDiv255Round's ...
7 years, 6 months ago (2013-06-04 08:01:16 UTC) #30
Jun Jiang
On 2013/06/04 08:01:16, Noel Gordon (Google) wrote: > Ok good. Since you want speed, there's ...
7 years, 6 months ago (2013-06-04 08:17:07 UTC) #31
Noel Gordon
My apologies, it should be static const unsigned int kRounding = 257 * 128; unsigned ...
7 years, 6 months ago (2013-06-04 08:21:41 UTC) #32
Jun Jiang
On 2013/06/04 08:21:41, Noel Gordon (Google) wrote: > My apologies, it should be > > ...
7 years, 6 months ago (2013-06-04 08:52:19 UTC) #33
Noel Gordon
On crbug.com/234071 using image-like data, this form is about 10-15% faster compared to SkDiv255Round() on ...
7 years, 6 months ago (2013-06-04 15:37:26 UTC) #34
Jun Jiang
On 2013/06/04 15:37:26, Noel Gordon (Google) wrote: > On crbug.com/234071 using image-like data, this form ...
7 years, 6 months ago (2013-06-05 15:30:21 UTC) #35
Jun Jiang
The patch to refine the LayoutTest was in review at https://codereview.chromium.org/16691002/ and another patch to ...
7 years, 6 months ago (2013-06-08 09:54:57 UTC) #36
Tom Hudson
Just a couple of nits from me, and then if we can get performance numbers ...
7 years, 6 months ago (2013-06-10 09:35:18 UTC) #37
bsalomon
As mentioned in the GPU conversion CL comments, I think we should land the bench ...
7 years, 6 months ago (2013-06-10 13:48:22 UTC) #38
Jun Jiang
Hi, Brian. Thanks for your comments. I will move the benchmark into a separate CL. ...
7 years, 6 months ago (2013-06-11 14:46:20 UTC) #39
Jun Jiang
On 2013/06/10 09:35:18, Tom Hudson wrote: > Just a couple of nits from me, and ...
7 years, 6 months ago (2013-06-11 16:09:24 UTC) #40
Jun Jiang
On 2013/06/10 13:48:22, bsalomon wrote: > As mentioned in the GPU conversion CL comments, I ...
7 years, 6 months ago (2013-06-11 16:10:43 UTC) #41
bsalomon
On 2013/06/11 16:10:43, Jun Jiang wrote: > On 2013/06/10 13:48:22, bsalomon wrote: > > As ...
7 years, 6 months ago (2013-06-11 17:16:15 UTC) #42
Noel Gordon
On 2013/06/05 15:30:21, Jun Jiang wrote: > On 2013/06/04 15:37:26, Noel Gordon (Google) wrote: > ...
7 years, 6 months ago (2013-06-12 07:36:53 UTC) #43
Jun Jiang
On 2013/06/12 07:36:53, Noel Gordon (Google) wrote: > On 2013/06/05 15:30:21, Jun Jiang wrote: > ...
7 years, 6 months ago (2013-06-12 17:08:13 UTC) #44
Noel Gordon
Good re the layout test. One more thing. Should we use the SkMulS16 form r ...
7 years, 6 months ago (2013-06-14 06:40:36 UTC) #45
Jun Jiang
On 2013/06/14 06:40:36, Noel Gordon (Google) wrote: > Good re the layout test. One more ...
7 years, 6 months ago (2013-06-14 07:16:01 UTC) #46
Noel Gordon
LGTM SkMulDiv255Round
7 years, 6 months ago (2013-06-14 08:00:26 UTC) #47
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/jun.a.jiang@intel.com/15402003/67001
7 years, 6 months ago (2013-06-14 08:08:34 UTC) #48
commit-bot: I haz the power
7 years, 6 months ago (2013-06-14 13:38:59 UTC) #49
Message was sent while issue was closed.
Change committed as 9605

Powered by Google App Engine
This is Rietveld 408576698