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

Issue 114173002: Preventing division by 0 (Closed)

Created:
7 years ago by sugoi1
Modified:
7 years ago
CC:
skia-review_googlegroups.com
Visibility:
Public.

Description

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= Committed: http://code.google.com/p/skia/source/detail?r=12649

Patch Set 1 #

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

Messages

Total messages: 5 (0 generated)
sugoi
7 years ago (2013-12-12 16:31:09 UTC) #1
Stephen White
LGTM, but will defer to Mike
7 years ago (2013-12-12 17:17:26 UTC) #2
reed1
lgtm
7 years ago (2013-12-12 19:24:59 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/sugoi@chromium.org/114173002/1
7 years ago (2013-12-12 19:31:51 UTC) #4
commit-bot: I haz the power
7 years ago (2013-12-12 19:47:12 UTC) #5
Message was sent while issue was closed.
Change committed as 12649

Powered by Google App Engine
This is Rietveld 408576698