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

Side by Side Diff: cc/test/fake_layer_tree_host_impl.cc

Issue 184023002: Change LayerHostImpl to use frame time from BeginFrameArgs rather than ::Now() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing background ticking, trying to fix tests, lots of other small updates. Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/test/fake_layer_tree_host_impl.h" 5 #include "cc/test/fake_layer_tree_host_impl.h"
6 #include "cc/trees/layer_tree_impl.h" 6 #include "cc/trees/layer_tree_impl.h"
7 7
8 namespace cc { 8 namespace cc {
9 9
10 FakeLayerTreeHostImpl::FakeLayerTreeHostImpl(Proxy* proxy) 10 FakeLayerTreeHostImpl::FakeLayerTreeHostImpl(Proxy* proxy)
(...skipping 22 matching lines...) Expand all
33 33
34 FakeLayerTreeHostImpl::~FakeLayerTreeHostImpl() {} 34 FakeLayerTreeHostImpl::~FakeLayerTreeHostImpl() {}
35 35
36 void FakeLayerTreeHostImpl::CreatePendingTree() { 36 void FakeLayerTreeHostImpl::CreatePendingTree() {
37 LayerTreeHostImpl::CreatePendingTree(); 37 LayerTreeHostImpl::CreatePendingTree();
38 float arbitrary_large_page_scale = 100000.f; 38 float arbitrary_large_page_scale = 100000.f;
39 pending_tree()->SetPageScaleFactorAndLimits( 39 pending_tree()->SetPageScaleFactorAndLimits(
40 1.f, 1.f / arbitrary_large_page_scale, arbitrary_large_page_scale); 40 1.f, 1.f / arbitrary_large_page_scale, arbitrary_large_page_scale);
41 } 41 }
42 42
43 base::TimeTicks FakeLayerTreeHostImpl::CurrentFrameTimeTicks() { 43 base::TimeTicks FakeLayerTreeHostImpl::CurrentFrameTimeTicks() const {
44 if (current_frame_time_ticks_.is_null()) 44 if (current_frame_time_ticks_.is_null())
45 return LayerTreeHostImpl::CurrentFrameTimeTicks(); 45 return LayerTreeHostImpl::CurrentFrameTimeTicks();
46 return current_frame_time_ticks_; 46 return current_frame_time_ticks_;
47 } 47 }
48 48
49 void FakeLayerTreeHostImpl::SetCurrentFrameTimeTicks( 49 void FakeLayerTreeHostImpl::SetCurrentFrameTimeTicks(
50 base::TimeTicks current_frame_time_ticks) { 50 base::TimeTicks current_frame_time_ticks) {
51 current_frame_time_ticks_ = current_frame_time_ticks; 51 current_frame_time_ticks_ = current_frame_time_ticks;
52 } 52 }
53 53
54 } // namespace cc 54 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698