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

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

Issue 60353002: cc: add DevTools instrumentation for impl-side frames (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « cc/scheduler/scheduler_unittest.cc ('k') | cc/test/layer_tree_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
11 : LayerTreeHostImpl(LayerTreeSettings(), 11 : LayerTreeHostImpl(LayerTreeSettings(),
12 &client_, 12 &client_,
13 proxy, 13 proxy,
14 &stats_instrumentation_, 14 &stats_instrumentation_,
15 NULL) { 15 NULL,
16 0) {
16 // Explicitly clear all debug settings. 17 // Explicitly clear all debug settings.
17 SetDebugState(LayerTreeDebugState()); 18 SetDebugState(LayerTreeDebugState());
18 } 19 }
19 20
20 FakeLayerTreeHostImpl::FakeLayerTreeHostImpl(const LayerTreeSettings& settings, 21 FakeLayerTreeHostImpl::FakeLayerTreeHostImpl(const LayerTreeSettings& settings,
21 Proxy* proxy) 22 Proxy* proxy)
22 : LayerTreeHostImpl(settings, 23 : LayerTreeHostImpl(settings,
23 &client_, 24 &client_,
24 proxy, 25 proxy,
25 &stats_instrumentation_, 26 &stats_instrumentation_,
26 NULL) { 27 NULL,
28 0) {
27 // Explicitly clear all debug settings. 29 // Explicitly clear all debug settings.
28 SetDebugState(LayerTreeDebugState()); 30 SetDebugState(LayerTreeDebugState());
29 } 31 }
30 32
31 FakeLayerTreeHostImpl::~FakeLayerTreeHostImpl() {} 33 FakeLayerTreeHostImpl::~FakeLayerTreeHostImpl() {}
32 34
33 void FakeLayerTreeHostImpl::CreatePendingTree() { 35 void FakeLayerTreeHostImpl::CreatePendingTree() {
34 LayerTreeHostImpl::CreatePendingTree(); 36 LayerTreeHostImpl::CreatePendingTree();
35 float arbitrary_large_page_scale = 100000.f; 37 float arbitrary_large_page_scale = 100000.f;
36 pending_tree()->SetPageScaleFactorAndLimits( 38 pending_tree()->SetPageScaleFactorAndLimits(
37 1.f, 1.f / arbitrary_large_page_scale, arbitrary_large_page_scale); 39 1.f, 1.f / arbitrary_large_page_scale, arbitrary_large_page_scale);
38 } 40 }
39 41
40 base::TimeTicks FakeLayerTreeHostImpl::CurrentFrameTimeTicks() { 42 base::TimeTicks FakeLayerTreeHostImpl::CurrentFrameTimeTicks() {
41 if (current_frame_time_ticks_.is_null()) 43 if (current_frame_time_ticks_.is_null())
42 return LayerTreeHostImpl::CurrentFrameTimeTicks(); 44 return LayerTreeHostImpl::CurrentFrameTimeTicks();
43 return current_frame_time_ticks_; 45 return current_frame_time_ticks_;
44 } 46 }
45 47
46 void FakeLayerTreeHostImpl::SetCurrentFrameTimeTicks( 48 void FakeLayerTreeHostImpl::SetCurrentFrameTimeTicks(
47 base::TimeTicks current_frame_time_ticks) { 49 base::TimeTicks current_frame_time_ticks) {
48 current_frame_time_ticks_ = current_frame_time_ticks; 50 current_frame_time_ticks_ = current_frame_time_ticks;
49 } 51 }
50 52
51 } // namespace cc 53 } // namespace cc
OLDNEW
« no previous file with comments | « cc/scheduler/scheduler_unittest.cc ('k') | cc/test/layer_tree_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698