Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(754)

Issue 88084: Optimize some alpha blending modes. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
15 years, 5 months ago by deanm
Modified:
15 years, 4 months ago
Reviewers:
reed
Visibility:
Public.

Description

Optimize some alpha blending modes. - Inline the component calculation helpers. - Reorder the computation in plus_modeproc. This doubles the performance of plus_modeproc.

Patch Set 1 #

Patch Set 2 : Mege. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -7 lines) Patch
M src/core/SkXfermode.cpp View 5 chunks +7 lines, -7 lines 0 comments Download

Messages

Total messages: 3
deanm
Seems like for the ARGB vs BGRA etc ordering, it would be nice to generate ...
15 years, 5 months ago (2009-07-03 10:40:53 UTC) #1
reed
I am quite surprised that adding 'inline' to the static functions helped, but hooray. I'm ...
15 years, 5 months ago (2009-07-03 12:47:31 UTC) #2
deanm
15 years, 5 months ago (2009-07-03 12:53:25 UTC) #3
The inline keyword definitely makes a difference.

In a perfect world it wouldn't.  The compiler would realize this is a small
function and that performance is important.  However, it can't really know that
without things like profile guided optimization.

If it doesn't know it's important, it's actually a better decision to not-inline
it, as it decreases the generated code size.

On 2009/07/03 12:47:31, reed wrote:
> I am quite surprised that adding 'inline' to the static functions helped, but
> hooray.
> 
> I'm also surprised that reordering the calls to saturated_add helped, but
hooray
> for that too. In this case, on machines with a different order for colorpriv
> 32bit, the code order won't match, but I think that's ok.
> 
> LGTM
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b