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

Issue 11534006: Reduce more matrix math in calculateDrawProperties (Closed)

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

Description

Reduce more matrix math in calculateDrawProperties This patch avoids even more math. cc_perftests on linux desktop improved by about 3-4%. (0) Skip applying the layer's anchorPoint + transform + inverseAnchorPoint if the layer's transform was identity. (1) The surface clipRect, projected from ancestor space to current surface space, is now cached in calcDrawTransforms so it only needs to be computed once, instead of onces for every layer that contributes to the surface. (2) The layer's bounds, transformed into target surface space, are passed into calculateVisibleContentRect, so that this function does not need to redo the mapClippedRect computation unnecessarily. (3) The early exit logic was made more aggressive, to early-out as soon as we realize that none of the layer's drawProperties need to be computed. BUG=163769 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=172475

Patch Set 1 : #

Total comments: 4

Patch Set 2 : Updated #

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

Messages

Total messages: 4 (0 generated)
shawnsingh
PTAL, thanks! I still want to test it a bit more but so far it ...
8 years ago (2012-12-11 10:54:13 UTC) #1
jamesr
https://codereview.chromium.org/11534006/diff/3001/cc/layer_tree_host_common.cc File cc/layer_tree_host_common.cc (right): https://codereview.chromium.org/11534006/diff/3001/cc/layer_tree_host_common.cc#newcode43 cc/layer_tree_host_common.cc:43: static inline gfx::Rect calculateVisibleRectWithCachedLayerRect(const gfx::Rect& targetSurfaceRect, const gfx::Rect& layerBoundRect, ...
8 years ago (2012-12-11 19:13:21 UTC) #2
shawnsingh
Thanks for catching those, here's an updated version https://codereview.chromium.org/11534006/diff/3001/cc/layer_tree_host_common.cc File cc/layer_tree_host_common.cc (right): https://codereview.chromium.org/11534006/diff/3001/cc/layer_tree_host_common.cc#newcode43 cc/layer_tree_host_common.cc:43: static ...
8 years ago (2012-12-11 22:33:18 UTC) #3
jamesr
8 years ago (2012-12-11 22:41:04 UTC) #4
lgtm

Powered by Google App Engine
This is Rietveld 408576698