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

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

Issue 2061273002: cc: Make BackToBackBeginFrameSource a SyntheticBeginFrameSource. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: syntheticbeginframesource: no-more-bfs-base Created 4 years, 6 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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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/layer_tree_test.h" 5 #include "cc/test/layer_tree_test.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after
692 SetVisibleOnLayerTreeHost(true); 692 SetVisibleOnLayerTreeHost(true);
693 } 693 }
694 694
695 void LayerTreeTest::DoBeginTest() { 695 void LayerTreeTest::DoBeginTest() {
696 client_ = LayerTreeHostClientForTesting::Create(this); 696 client_ = LayerTreeHostClientForTesting::Create(this);
697 697
698 std::unique_ptr<FakeExternalBeginFrameSource> external_begin_frame_source; 698 std::unique_ptr<FakeExternalBeginFrameSource> external_begin_frame_source;
699 if (settings_.use_external_begin_frame_source) { 699 if (settings_.use_external_begin_frame_source) {
700 DCHECK(!IsRemoteTest()); 700 DCHECK(!IsRemoteTest());
701 external_begin_frame_source.reset(new FakeExternalBeginFrameSource( 701 external_begin_frame_source.reset(new FakeExternalBeginFrameSource(
702 settings_.renderer_settings.refresh_rate)); 702 settings_.renderer_settings.refresh_rate, true));
703 external_begin_frame_source_ = external_begin_frame_source.get(); 703 external_begin_frame_source_ = external_begin_frame_source.get();
704 } 704 }
705 705
706 DCHECK(!impl_thread_ || impl_thread_->task_runner().get()); 706 DCHECK(!impl_thread_ || impl_thread_->task_runner().get());
707 707
708 if (IsRemoteTest()) { 708 if (IsRemoteTest()) {
709 DCHECK(impl_thread_); 709 DCHECK(impl_thread_);
710 layer_tree_host_ = LayerTreeHostForTesting::Create( 710 layer_tree_host_ = LayerTreeHostForTesting::Create(
711 this, mode_, client_.get(), &remote_proto_channel_bridge_.channel_main, 711 this, mode_, client_.get(), &remote_proto_channel_bridge_.channel_main,
712 nullptr, nullptr, task_graph_runner_.get(), settings_, 712 nullptr, nullptr, task_graph_runner_.get(), settings_,
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
1037 1037
1038 RemoteChannelImplForTest* LayerTreeTest::GetRemoteChannelImplForTest() const { 1038 RemoteChannelImplForTest* LayerTreeTest::GetRemoteChannelImplForTest() const {
1039 DCHECK(IsRemoteTest()); 1039 DCHECK(IsRemoteTest());
1040 DCHECK(remote_client_layer_tree_host_); 1040 DCHECK(remote_client_layer_tree_host_);
1041 1041
1042 return static_cast<RemoteChannelImplForTest*>( 1042 return static_cast<RemoteChannelImplForTest*>(
1043 remote_client_layer_tree_host_->proxy()); 1043 remote_client_layer_tree_host_->proxy());
1044 } 1044 }
1045 1045
1046 } // namespace cc 1046 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698