diff options
author | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-28 23:36:10 +0000 |
---|---|---|
committer | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-28 23:36:10 +0000 |
commit | 829ad97989a7aac3c80e0a0562e97271cd1e8ea1 (patch) | |
tree | 2ac7a544c304e514fd870c5a813ed82b4bdabd2f /cc/picture_layer_impl.cc | |
parent | b4c830ae8bcbe9eba8362465db7bd1a64b39716a (diff) | |
download | chromium_src-829ad97989a7aac3c80e0a0562e97271cd1e8ea1.zip chromium_src-829ad97989a7aac3c80e0a0562e97271cd1e8ea1.tar.gz chromium_src-829ad97989a7aac3c80e0a0562e97271cd1e8ea1.tar.bz2 |
cc: Don't call base::TimeTicks::Now() for every layer.
Use the time for the beginning of the current frame instead.
This does not use the frame rate counter, which is problematic since it doesn't
increment when not visible, but we continue animating and priorities should be
updated accordingly.
Using the frame rate controller is tricky - it only exists in thread mode, and
it also doesn't tick when not visible. I think we should leave hooking this into
the vsync as a TODO and just save Now() when we move from one frame to the next
so we don't need to keep calling it everywhere.
BUG=172182
Review URL: https://chromiumcodereview.appspot.com/12039082
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@179213 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/picture_layer_impl.cc')
-rw-r--r-- | cc/picture_layer_impl.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cc/picture_layer_impl.cc b/cc/picture_layer_impl.cc index 22d0653..c11708b 100644 --- a/cc/picture_layer_impl.cc +++ b/cc/picture_layer_impl.cc @@ -208,7 +208,7 @@ void PictureLayerImpl::updateTilePriorities() { current_source_frame_number != last_source_frame_number_; double current_frame_time = - (base::TimeTicks::Now() - base::TimeTicks()).InSecondsF(); + (layerTreeImpl()->CurrentFrameTime() - base::TimeTicks()).InSecondsF(); bool first_update_in_new_impl_frame = current_frame_time != last_impl_frame_time_; |