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

Issue 11280271: Tighten the matrix usage in cc/layer_tree_host_common.cpp (Closed)

Created:
8 years ago by shawnsingh
Modified:
8 years ago
Reviewers:
danakj, jamesr
CC:
chromium-reviews, cc-bugs_chromium.org
Visibility:
Public.

Description

Tighten the matrix usage in cc/layer_tree_host_common.cpp As calculateDrawTransforms has evolved, the math has become substantially more overhead. This patch refactors the matrix math to reduce the number of matrix copies and matrix multiplications. Changes that would drastically affect readability or robustness are avoided. With this patch, cc_perftests improves by approximately 6-8%. SevenTabSwitcher: 2030 runs/s --> 2220 runs/s (9.3%) tenTabSwitcher: 757 runs/s --> 807 runs/s (6.6%) BUG=163769 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=171051

Patch Set 1 #

Total comments: 3

Patch Set 2 : Fixed bad math substitution, performance improvements still roughly the same #

Total comments: 6

Patch Set 3 : patch for landing #

Unified diffs Side-by-side diffs Delta from patch set Stats (+27 lines, -25 lines) Patch
M cc/layer_tree_host_common.cc View 1 2 4 chunks +27 lines, -25 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
shawnsingh
PTAL thanks!
8 years ago (2012-12-02 06:43:16 UTC) #1
danakj
https://codereview.chromium.org/11280271/diff/1/cc/layer_tree_host_common.cc File cc/layer_tree_host_common.cc (left): https://codereview.chromium.org/11280271/diff/1/cc/layer_tree_host_common.cc#oldcode526 cc/layer_tree_host_common.cc:526: // start of the combinedTransform, but we don't want ...
8 years ago (2012-12-03 18:24:40 UTC) #2
shawnsingh
Thanks for review, we need to discuss this point before new patch comes =) https://codereview.chromium.org/11280271/diff/1/cc/layer_tree_host_common.cc ...
8 years ago (2012-12-03 19:37:06 UTC) #3
danakj
https://codereview.chromium.org/11280271/diff/1/cc/layer_tree_host_common.cc File cc/layer_tree_host_common.cc (left): https://codereview.chromium.org/11280271/diff/1/cc/layer_tree_host_common.cc#oldcode526 cc/layer_tree_host_common.cc:526: // start of the combinedTransform, but we don't want ...
8 years ago (2012-12-03 19:56:28 UTC) #4
shawnsingh
Got it =) will fix.
8 years ago (2012-12-03 20:30:46 UTC) #5
shawnsingh
On 2012/12/03 20:30:46, shawnsingh wrote: > Got it =) will fix. New patch uploaded. PTAL, ...
8 years ago (2012-12-04 03:28:42 UTC) #6
danakj
LGTM with nits https://codereview.chromium.org/11280271/diff/7001/cc/layer_tree_host_common.cc File cc/layer_tree_host_common.cc (right): https://codereview.chromium.org/11280271/diff/7001/cc/layer_tree_host_common.cc#newcode525 cc/layer_tree_host_common.cc:525: // Note Carefully: this is Concat, ...
8 years ago (2012-12-04 18:27:42 UTC) #7
shawnsingh
Thanks for review =) https://codereview.chromium.org/11280271/diff/7001/cc/layer_tree_host_common.cc File cc/layer_tree_host_common.cc (right): https://codereview.chromium.org/11280271/diff/7001/cc/layer_tree_host_common.cc#newcode573 cc/layer_tree_host_common.cc:573: combinedTransform.Scale(1 / renderSurfaceSublayerScale.x(), 1 / ...
8 years ago (2012-12-04 18:31:39 UTC) #8
danakj
https://codereview.chromium.org/11280271/diff/7001/cc/layer_tree_host_common.cc File cc/layer_tree_host_common.cc (right): https://codereview.chromium.org/11280271/diff/7001/cc/layer_tree_host_common.cc#newcode573 cc/layer_tree_host_common.cc:573: combinedTransform.Scale(1 / renderSurfaceSublayerScale.x(), 1 / renderSurfaceSublayerScale.y()); On 2012/12/04 18:31:39, ...
8 years ago (2012-12-04 18:32:48 UTC) #9
shawnsingh
So it turns out I was wrong, looking at the wrong thing. The drawProperties patch ...
8 years ago (2012-12-05 00:52:09 UTC) #10
danakj
On 2012/12/05 00:52:09, shawnsingh wrote: > So it turns out I was wrong, looking at ...
8 years ago (2012-12-05 18:27:28 UTC) #11
shawnsingh
8 years ago (2012-12-05 19:00:10 UTC) #12
Message was sent while issue was closed.
On 2012/12/05 18:27:28, danakj wrote:
> Or maybe set the transform to identity after consuming it?


We would like to avoid such unneeded computations, that's the point of this
tightening...

Last night, I analyzed the sequence of operations inside of draw transforms and
screen space transforms for layers and surfaces, and it looks like there is an
elegant way to rewrite all this math that will further reduce the number of
multiplications and copies.  Let's continue discussing this after seeing whether
that patch helps or not =)

Powered by Google App Engine
This is Rietveld 408576698