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

Issue 399053002: ui/gfx: optimize UnPreMultiply operation by checking alpha value (Closed)

Created:
6 years, 5 months ago by hyunki
Modified:
5 years, 7 months ago
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

ui/gfx: optimize UnPreMultiply operation by checking alpha value Don't need to do Un-premultiplying operation, if alpha value equals to 0 or 255. BUG=none Test(DONE)=gfx_unittests --gtest_filter="ColorAnalysisTest*" Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=284166

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+30 lines, -7 lines) Patch
M ui/gfx/color_analysis.cc View 5 chunks +30 lines, -7 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
hyunki
Many cases alpha value would be 0 or 255. It needs to be optimized. Please ...
6 years, 5 months ago (2014-07-17 10:05:41 UTC) #1
hyunki
hello sky@: gentle ping. PTAL. thank you!
6 years, 5 months ago (2014-07-17 16:51:03 UTC) #2
Alexei Svitkine (slow)
If this is truly a performance win, shouldn't this be done internally by SkUnPreMultiply::PMColorToColor(). +reed ...
6 years, 5 months ago (2014-07-17 18:32:43 UTC) #3
hyunki
Thanks for the comment. > > By the way, is there a benchmark or something ...
6 years, 5 months ago (2014-07-17 18:59:50 UTC) #4
reed1
This sort of change highlights a slightly fragile assumption, that the swizzle order of SkPMColor ...
6 years, 5 months ago (2014-07-17 20:33:25 UTC) #5
hyunki
For 10000 times unittest for UnPreMultiply() on my desktop Intel(R) Core(TM) i5-4670 CPU @ 3.40GHz ...
6 years, 5 months ago (2014-07-18 12:32:53 UTC) #6
hyunki
Alexei Svitkine@: Gentle ping, PTAL. Thanks.
6 years, 5 months ago (2014-07-18 16:00:48 UTC) #7
Alexei Svitkine (slow)
lgtm
6 years, 5 months ago (2014-07-18 16:25:12 UTC) #8
hyunki
thanks for the review.
6 years, 5 months ago (2014-07-18 16:30:40 UTC) #9
hyunki
The CQ bit was checked by hyunki.baik@samsung.com
6 years, 5 months ago (2014-07-18 16:30:46 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hyunki.baik@samsung.com/399053002/1
6 years, 5 months ago (2014-07-18 16:31:38 UTC) #11
commit-bot: I haz the power
Change committed as 284166
6 years, 5 months ago (2014-07-18 18:44:36 UTC) #12
reed1
5 years, 7 months ago (2015-05-12 13:25:46 UTC) #13
Message was sent while issue was closed.
fwiw -- the new version is potentially fragile, as the swizzle format for
SkPMColor (which is what is stored in the bitmap) is not required to match the
swizzle format of SkColor (the output of PMUnPremultiply).

Powered by Google App Engine
This is Rietveld 408576698