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

Issue 1060493002: Exclusion and Difference modes using Sk4f (Closed)

Created:
5 years, 8 months ago by reed2
Modified:
5 years, 8 months ago
Reviewers:
mtklein, reed1
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Exclusion and Difference modes using Sk4f Before: 7M 1 15.3ms 15.5ms 15.8ms 17.2ms 4% ▁█▄▁▇▂▁▁▂▁ 8888 Xfermode_Exclusion 7M 1 16.5ms 17.1ms 17.3ms 18.8ms 5% ▁█▃█▃▂▂▃▂▂ 8888 Xfermode_Difference After: 7M 1 9.06ms 9.34ms 9.42ms 10.4ms 4% ▁▁▅▄█▁▂▁▂▃ 8888 Xfermode_Exclusion 7M 1 10.5ms 10.9ms 11ms 12ms 5% ▃▁▆█▂▁▅▂▁▃ 8888 Xfermode_Difference TBR=mtklein@google.com Committed: https://skia.googlesource.com/skia/+/92dabe7421aa6ba4149901108d8ab72956f67eeb

Patch Set 1 #

Patch Set 2 : #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+41 lines, -0 lines) Patch
M src/core/SkXfermode.cpp View 1 3 chunks +41 lines, -0 lines 2 comments Download

Messages

Total messages: 9 (3 generated)
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1060493002/20001
5 years, 8 months ago (2015-04-03 02:12:32 UTC) #2
commit-bot: I haz the power
Committed patchset #2 (id:20001) as https://skia.googlesource.com/skia/+/92dabe7421aa6ba4149901108d8ab72956f67eeb
5 years, 8 months ago (2015-04-03 02:19:19 UTC) #3
mtklein
https://codereview.chromium.org/1060493002/diff/20001/src/core/SkXfermode.cpp File src/core/SkXfermode.cpp (right): https://codereview.chromium.org/1060493002/diff/20001/src/core/SkXfermode.cpp#newcode1208 src/core/SkXfermode.cpp:1208: return SkPMFloat(pma.a(), pmc.r(), pmc.g(), pmc.b()); Boy, this is annoying. ...
5 years, 8 months ago (2015-04-03 13:23:59 UTC) #5
mtklein
https://codereview.chromium.org/1060493002/diff/20001/src/core/SkXfermode.cpp File src/core/SkXfermode.cpp (right): https://codereview.chromium.org/1060493002/diff/20001/src/core/SkXfermode.cpp#newcode1208 src/core/SkXfermode.cpp:1208: return SkPMFloat(pma.a(), pmc.r(), pmc.g(), pmc.b()); On 2015/04/03 13:23:58, mtklein ...
5 years, 8 months ago (2015-04-03 13:35:47 UTC) #6
reed1
I wonder, would we do better with some math? In a loop, those two literals ...
5 years, 8 months ago (2015-04-03 15:21:22 UTC) #8
mtklein
5 years, 8 months ago (2015-04-03 15:28:22 UTC) #9
Message was sent while issue was closed.
On 2015/04/03 15:21:22, reed1 wrote:
> I wonder, would we do better with some math? In a loop, those two literals
could
> be in reused registers. That is 3 ops. Is that worse than what we get today?
> 
> result = alpha4 * (1, 0, 0, 0) + color4 * (0, 1, 1, 1)
> 
> Either way, likely we'll want to provide a std helper to do this sort of
thing.

Yeah, I actually tried that offline, and it is worse, both in op counts and
time.  So is an _mm_xor_ps() based approach.

Powered by Google App Engine
This is Rietveld 408576698