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

Side by Side Diff: services/ui/ws/gpu_compositor_frame_sink.cc

Issue 2411793008: Adds BeginFrameControl via DevTools.
Patch Set: BFC prototype v2 with allow_latency_opts and waiting for BFOs. Created 4 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "services/ui/ws/gpu_compositor_frame_sink.h" 5 #include "services/ui/ws/gpu_compositor_frame_sink.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/single_thread_task_runner.h" 9 #include "base/single_thread_task_runner.h"
10 #include "base/threading/thread_task_runner_handle.h" 10 #include "base/threading/thread_task_runner_handle.h"
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 } else { 137 } else {
138 display_output_surface = base::MakeUnique<DirectOutputSurface>( 138 display_output_surface = base::MakeUnique<DirectOutputSurface>(
139 context_provider, synthetic_begin_frame_source.get()); 139 context_provider, synthetic_begin_frame_source.get());
140 } 140 }
141 141
142 int max_frames_pending = 142 int max_frames_pending =
143 display_output_surface->capabilities().max_frames_pending; 143 display_output_surface->capabilities().max_frames_pending;
144 DCHECK_GT(max_frames_pending, 0); 144 DCHECK_GT(max_frames_pending, 0);
145 145
146 std::unique_ptr<cc::DisplayScheduler> scheduler( 146 std::unique_ptr<cc::DisplayScheduler> scheduler(
147 new cc::DisplayScheduler(synthetic_begin_frame_source.get(), 147 new cc::DisplayScheduler(task_runner_.get(), max_frames_pending));
148 task_runner_.get(), max_frames_pending));
149 148
150 display_.reset(new cc::Display( 149 display_.reset(new cc::Display(
151 nullptr /* bitmap_manager */, gpu_memory_buffer_manager, 150 nullptr /* bitmap_manager */, gpu_memory_buffer_manager,
152 cc::RendererSettings(), frame_sink_id_, 151 cc::RendererSettings(), frame_sink_id_,
153 std::move(synthetic_begin_frame_source), 152 std::move(synthetic_begin_frame_source),
154 std::move(display_output_surface), std::move(scheduler), 153 std::move(display_output_surface), std::move(scheduler),
155 base::MakeUnique<cc::TextureMailboxDeleter>(task_runner_.get()))); 154 base::MakeUnique<cc::TextureMailboxDeleter>(task_runner_.get())));
156 display_->Initialize(this, display_compositor_->manager()); 155 display_->Initialize(this, display_compositor_->manager());
157 display_->SetVisible(true); 156 display_->SetVisible(true);
158 } 157 }
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 212
214 added_frame_observer_ = needs_begin_frame_; 213 added_frame_observer_ = needs_begin_frame_;
215 if (needs_begin_frame_) 214 if (needs_begin_frame_)
216 begin_frame_source_->AddObserver(this); 215 begin_frame_source_->AddObserver(this);
217 else 216 else
218 begin_frame_source_->RemoveObserver(this); 217 begin_frame_source_->RemoveObserver(this);
219 } 218 }
220 219
221 } // namespace ws 220 } // namespace ws
222 } // namespace ui 221 } // namespace ui
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_view_mus.cc ('k') | third_party/WebKit/Source/core/inspector/browser_protocol.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698