diff options
author | shawnsingh@chromium.org <shawnsingh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-19 13:01:35 +0000 |
---|---|---|
committer | shawnsingh@chromium.org <shawnsingh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-19 13:01:35 +0000 |
commit | df2ae488ea8334510af95eb679b50b1327475799 (patch) | |
tree | a808132da37ff9016330ce3893dc7add277384e8 /skia | |
parent | d5573e666f8c2c6667ae429825327da21a24065b (diff) | |
download | chromium_src-df2ae488ea8334510af95eb679b50b1327475799.zip chromium_src-df2ae488ea8334510af95eb679b50b1327475799.tar.gz chromium_src-df2ae488ea8334510af95eb679b50b1327475799.tar.bz2 |
Avoid costly transform math in UpdateTilePriorities
Approximation functions thanks to Tom Hudson,
tomhudson@chromium.org.
UpdateTilePriorities needs to compare every tile with the
viewport bounds to estimate current and future visibility. Before
this patch, the existing fast path was not being hit as often as
we want. In the slow path, every tile's bounds were being
transformed into screen space so that we can compare it to the
viewport. Worse, this was done twice, to estimate velocity of the
tile w.r.t. the viewport, too.
This patch does two things: (1) Loosens the precision for
checking if we can take the very fast path. Now it gets
triggered more often. (2) Adds a secondary almost-fast path which
is approximately 15% slower than the very fast path, but it is
still vastly faster than the slow path, and can be applied to any
transform that doesn't have perspective.
Profiles indicate that after this patch, UpdateTilePriorities is
2 times faster on the HeavyPage cc_perftest benchmark.
mapClippedRect() overhead from the slow path was
previously accounting for about 49% of the execution time
in this function.
BUG=239684
Review URL: https://chromiumcodereview.appspot.com/16975005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212574 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'skia')
0 files changed, 0 insertions, 0 deletions