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

Issue 11312154: cc: Add some early outs to avoid expensive operations (Closed)

Created:
8 years, 1 month ago by danakj
Modified:
8 years, 1 month ago
Reviewers:
enne (OOO)
CC:
chromium-reviews, cc-bugs_chromium.org, piman, backer
Visibility:
Public.

Description

cc: Add some early outs to avoid expensive operations mapHomgenousPoint is not cheap. We can do faster in projectClippedRect similar to mapClippedRect. rectSubtractRegion constructs a Region to do subtraction from. If the subtraction's rvalue is empty, then there is nothing to do and we can avoid creating a Region structure at all. I measured time spent in calculateRenderPasses with a draw-heavy unit test. Baseline: 0.001148 seconds With these changes: 0.001116 seconds So, about 3% reduction in time spent in calculateRenderPasses. R=enne BUG=159718 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=166841

Patch Set 1 #

Patch Set 2 : Extra casts #

Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -2 lines) Patch
M cc/math_util.cc View 1 2 chunks +8 lines, -2 lines 0 comments Download
M cc/occlusion_tracker.cc View 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
danakj
8 years, 1 month ago (2012-11-08 23:06:47 UTC) #1
enne (OOO)
3% is kind of in the noise, but these checks don't add much complexity. lgtm.
8 years, 1 month ago (2012-11-09 00:16:29 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/danakj@chromium.org/11312154/4
8 years, 1 month ago (2012-11-09 00:16:58 UTC) #3
commit-bot: I haz the power
8 years, 1 month ago (2012-11-09 02:02:20 UTC) #4
Change committed as 166841

Powered by Google App Engine
This is Rietveld 408576698