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

Side by Side Diff: cc/trees/single_thread_proxy.cc

Issue 2299003002: Remove uses of external begin frame sources (Closed)
Patch Set: Remove Blimp conditional Created 4 years, 3 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/trees/single_thread_proxy.h" 5 #include "cc/trees/single_thread_proxy.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/profiler/scoped_tracker.h" 9 #include "base/profiler/scoped_tracker.h"
10 #include "base/trace_event/trace_event.h" 10 #include "base/trace_event/trace_event.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 if (settings.single_thread_proxy_scheduler && !scheduler_on_impl_thread_) { 67 if (settings.single_thread_proxy_scheduler && !scheduler_on_impl_thread_) {
68 SchedulerSettings scheduler_settings(settings.ToSchedulerSettings()); 68 SchedulerSettings scheduler_settings(settings.ToSchedulerSettings());
69 scheduler_settings.commit_to_active_tree = CommitToActiveTree(); 69 scheduler_settings.commit_to_active_tree = CommitToActiveTree();
70 70
71 std::unique_ptr<CompositorTimingHistory> compositor_timing_history( 71 std::unique_ptr<CompositorTimingHistory> compositor_timing_history(
72 new CompositorTimingHistory( 72 new CompositorTimingHistory(
73 scheduler_settings.using_synchronous_renderer_compositor, 73 scheduler_settings.using_synchronous_renderer_compositor,
74 CompositorTimingHistory::BROWSER_UMA, 74 CompositorTimingHistory::BROWSER_UMA,
75 layer_tree_host_->rendering_stats_instrumentation())); 75 layer_tree_host_->rendering_stats_instrumentation()));
76 76
77 // BFS must either be external or come from the output surface. If 77 // TODO(enne): remove these settings.
78 // external, it must be provided. If from the output surface, it must 78 DCHECK(!settings.use_external_begin_frame_source);
79 // not be provided. 79 DCHECK(settings.use_output_surface_begin_frame_source);
80 // TODO(enne): Make all BFS come from the output surface.
81 DCHECK(settings.use_external_begin_frame_source ^
82 settings.use_output_surface_begin_frame_source);
83 DCHECK(!settings.use_external_begin_frame_source ||
84 external_begin_frame_source_);
85 DCHECK(!settings.use_output_surface_begin_frame_source ||
86 !external_begin_frame_source_);
87 scheduler_on_impl_thread_ = 80 scheduler_on_impl_thread_ =
88 Scheduler::Create(this, scheduler_settings, layer_tree_host_->GetId(), 81 Scheduler::Create(this, scheduler_settings, layer_tree_host_->GetId(),
89 task_runner_provider_->MainThreadTaskRunner(), 82 task_runner_provider_->MainThreadTaskRunner(),
90 external_begin_frame_source_.get(), 83 external_begin_frame_source_.get(),
91 std::move(compositor_timing_history)); 84 std::move(compositor_timing_history));
92 } 85 }
93 86
94 layer_tree_host_impl_ = layer_tree_host_->CreateLayerTreeHostImpl(this); 87 layer_tree_host_impl_ = layer_tree_host_->CreateLayerTreeHostImpl(this);
95 } 88 }
96 89
(...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after
764 void SingleThreadProxy::DidFinishImplFrame() { 757 void SingleThreadProxy::DidFinishImplFrame() {
765 layer_tree_host_impl_->DidFinishImplFrame(); 758 layer_tree_host_impl_->DidFinishImplFrame();
766 #if DCHECK_IS_ON() 759 #if DCHECK_IS_ON()
767 DCHECK(inside_impl_frame_) 760 DCHECK(inside_impl_frame_)
768 << "DidFinishImplFrame called while not inside an impl frame!"; 761 << "DidFinishImplFrame called while not inside an impl frame!";
769 inside_impl_frame_ = false; 762 inside_impl_frame_ = false;
770 #endif 763 #endif
771 } 764 }
772 765
773 } // namespace cc 766 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/proxy_impl.cc ('k') | content/renderer/android/synchronous_compositor_output_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698