aboutsummaryrefslogtreecommitdiff
path: root/tests/UnicodeTest.cpp
diff options
context:
space:
mode:
authorcommit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-12-12 19:47:09 +0000
committercommit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-12-12 19:47:09 +0000
commitb85ebea5267ec0b9630d828840fa2d7df29b9f43 (patch)
tree3ff634e21e4ecf5c705362117526bec5d88c9232 /tests/UnicodeTest.cpp
parentbaf5a3ba7b20ea88afa3fe01deb5fa691ae0d9c9 (diff)
Preventing 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= R=senorblanco@chromium.org, senorblanco@google.com, reed@google.com, sugoi@google.com Author: sugoi@chromium.org Review URL: https://codereview.chromium.org/114173002 git-svn-id: http://skia.googlecode.com/svn/trunk@12649 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tests/UnicodeTest.cpp')
0 files changed, 0 insertions, 0 deletions