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

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: Address skyostil comments 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
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 937 matching lines...) Expand 10 before | Expand all | Expand 10 after
948 void LayerTreeTest::RequestNewOutputSurface() { 948 void LayerTreeTest::RequestNewOutputSurface() {
949 SetOutputSurfaceOnLayerTreeHost(CreateOutputSurface()); 949 SetOutputSurfaceOnLayerTreeHost(CreateOutputSurface());
950 } 950 }
951 951
952 scoped_ptr<OutputSurface> LayerTreeTest::CreateOutputSurface() { 952 scoped_ptr<OutputSurface> LayerTreeTest::CreateOutputSurface() {
953 scoped_ptr<FakeOutputSurface> output_surface = CreateFakeOutputSurface(); 953 scoped_ptr<FakeOutputSurface> output_surface = CreateFakeOutputSurface();
954 DCHECK_EQ(delegating_renderer_, 954 DCHECK_EQ(delegating_renderer_,
955 output_surface->capabilities().delegated_rendering); 955 output_surface->capabilities().delegated_rendering);
956 output_surface_ = output_surface.get(); 956 output_surface_ = output_surface.get();
957 957
958 if (settings_.use_external_begin_frame_source) { 958 if (settings_.use_external_begin_frame_source &&
959 settings_.wait_for_beginframe_interval) {
959 DCHECK(external_begin_frame_source_); 960 DCHECK(external_begin_frame_source_);
960 DCHECK(external_begin_frame_source_->is_ready()); 961 DCHECK(external_begin_frame_source_->is_ready());
961 } 962 }
962 return std::move(output_surface); 963 return std::move(output_surface);
963 } 964 }
964 965
965 scoped_ptr<FakeOutputSurface> LayerTreeTest::CreateFakeOutputSurface() { 966 scoped_ptr<FakeOutputSurface> LayerTreeTest::CreateFakeOutputSurface() {
966 if (delegating_renderer_) 967 if (delegating_renderer_)
967 return FakeOutputSurface::CreateDelegating3d(); 968 return FakeOutputSurface::CreateDelegating3d();
968 else 969 else
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
1072 1073
1073 RemoteChannelImplForTest* LayerTreeTest::GetRemoteChannelImplForTest() const { 1074 RemoteChannelImplForTest* LayerTreeTest::GetRemoteChannelImplForTest() const {
1074 DCHECK(IsRemoteTest()); 1075 DCHECK(IsRemoteTest());
1075 DCHECK(remote_client_layer_tree_host_); 1076 DCHECK(remote_client_layer_tree_host_);
1076 1077
1077 return static_cast<RemoteChannelImplForTest*>( 1078 return static_cast<RemoteChannelImplForTest*>(
1078 remote_client_layer_tree_host_->proxy()); 1079 remote_client_layer_tree_host_->proxy());
1079 } 1080 }
1080 1081
1081 } // namespace cc 1082 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698