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

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

Issue 1765723002: Hoist begin frame sources out of scheduler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scheduler_remove_throttle_flag
Patch Set: Rebase Created 4 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
« no previous file with comments | « cc/scheduler/scheduler_unittest.cc ('k') | cc/test/scheduler_test_common.h » ('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 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/single_thread_task_runner.h" 9 #include "base/single_thread_task_runner.h"
10 #include "base/thread_task_runner_handle.h" 10 #include "base/thread_task_runner_handle.h"
(...skipping 885 matching lines...) Expand 10 before | Expand all | Expand 10 after
896 void LayerTreeTest::RequestNewOutputSurface() { 896 void LayerTreeTest::RequestNewOutputSurface() {
897 SetOutputSurfaceOnLayerTreeHost(CreateOutputSurface()); 897 SetOutputSurfaceOnLayerTreeHost(CreateOutputSurface());
898 } 898 }
899 899
900 scoped_ptr<OutputSurface> LayerTreeTest::CreateOutputSurface() { 900 scoped_ptr<OutputSurface> LayerTreeTest::CreateOutputSurface() {
901 scoped_ptr<FakeOutputSurface> output_surface = CreateFakeOutputSurface(); 901 scoped_ptr<FakeOutputSurface> output_surface = CreateFakeOutputSurface();
902 DCHECK_EQ(delegating_renderer_, 902 DCHECK_EQ(delegating_renderer_,
903 output_surface->capabilities().delegated_rendering); 903 output_surface->capabilities().delegated_rendering);
904 output_surface_ = output_surface.get(); 904 output_surface_ = output_surface.get();
905 905
906 if (settings_.use_external_begin_frame_source) { 906 if (settings_.use_external_begin_frame_source &&
907 settings_.wait_for_beginframe_interval) {
907 DCHECK(external_begin_frame_source_); 908 DCHECK(external_begin_frame_source_);
908 DCHECK(external_begin_frame_source_->is_ready()); 909 DCHECK(external_begin_frame_source_->is_ready());
909 } 910 }
910 return std::move(output_surface); 911 return std::move(output_surface);
911 } 912 }
912 913
913 scoped_ptr<FakeOutputSurface> LayerTreeTest::CreateFakeOutputSurface() { 914 scoped_ptr<FakeOutputSurface> LayerTreeTest::CreateFakeOutputSurface() {
914 if (delegating_renderer_) 915 if (delegating_renderer_)
915 return FakeOutputSurface::CreateDelegating3d(); 916 return FakeOutputSurface::CreateDelegating3d();
916 else 917 else
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
1021 1022
1022 RemoteChannelImplForTest* LayerTreeTest::GetRemoteChannelImplForTest() const { 1023 RemoteChannelImplForTest* LayerTreeTest::GetRemoteChannelImplForTest() const {
1023 DCHECK(IsRemoteTest()); 1024 DCHECK(IsRemoteTest());
1024 DCHECK(remote_client_layer_tree_host_); 1025 DCHECK(remote_client_layer_tree_host_);
1025 1026
1026 return static_cast<RemoteChannelImplForTest*>( 1027 return static_cast<RemoteChannelImplForTest*>(
1027 remote_client_layer_tree_host_->proxy()); 1028 remote_client_layer_tree_host_->proxy());
1028 } 1029 }
1029 1030
1030 } // namespace cc 1031 } // namespace cc
OLDNEW
« no previous file with comments | « cc/scheduler/scheduler_unittest.cc ('k') | cc/test/scheduler_test_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698