DescriptionPreventing division by 0
I did bench tests and I can't compute the denom before the if condition without taking a hit. After a few quick tests on my linux desktop, computing the 1st denom costs 6ms, the 2nd one 5ms and both together cost 9ms. The reason for this is that both if conditions here are exceptions and are expected to be false, so the denom computation should be skipped, if possible. The bench test I ran was :
out/Release/bench --match Xfermode_Hue --config 8888 --minMs 1000
BUG=
Committed: http://code.google.com/p/skia/source/detail?r=12649
Patch Set 1 #
Messages
Total messages: 5 (0 generated)
|