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

Side by Side Diff: ui/compositor/compositor.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
« no previous file with comments | « ui/compositor/compositor.h ('k') | ui/compositor/test/in_process_context_factory.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ui/compositor/compositor.h" 5 #include "ui/compositor/compositor.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <deque> 10 #include <deque>
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 context_factory_->SetAuthoritativeVSyncInterval(this, interval); 367 context_factory_->SetAuthoritativeVSyncInterval(this, interval);
368 vsync_manager_->SetAuthoritativeVSyncInterval(interval); 368 vsync_manager_->SetAuthoritativeVSyncInterval(interval);
369 } 369 }
370 370
371 void Compositor::SetDisplayVSyncParameters(base::TimeTicks timebase, 371 void Compositor::SetDisplayVSyncParameters(base::TimeTicks timebase,
372 base::TimeDelta interval) { 372 base::TimeDelta interval) {
373 context_factory_->SetDisplayVSyncParameters(this, timebase, interval); 373 context_factory_->SetDisplayVSyncParameters(this, timebase, interval);
374 vsync_manager_->UpdateVSyncParameters(timebase, interval); 374 vsync_manager_->UpdateVSyncParameters(timebase, interval);
375 } 375 }
376 376
377 void Compositor::SwapBeginFrameSource(
378 std::unique_ptr<cc::BeginFrameSource>* begin_frame_source) {
379 context_factory_->SwapBeginFrameSource(this, begin_frame_source);
380 }
381
377 void Compositor::SetAcceleratedWidget(gfx::AcceleratedWidget widget) { 382 void Compositor::SetAcceleratedWidget(gfx::AcceleratedWidget widget) {
378 // This function should only get called once. 383 // This function should only get called once.
379 DCHECK(!widget_valid_); 384 DCHECK(!widget_valid_);
380 widget_ = widget; 385 widget_ = widget;
381 widget_valid_ = true; 386 widget_valid_ = true;
382 if (compositor_frame_sink_requested_) 387 if (compositor_frame_sink_requested_)
383 context_factory_->CreateCompositorFrameSink(weak_ptr_factory_.GetWeakPtr()); 388 context_factory_->CreateCompositorFrameSink(weak_ptr_factory_.GetWeakPtr());
384 } 389 }
385 390
386 gfx::AcceleratedWidget Compositor::ReleaseAcceleratedWidget() { 391 gfx::AcceleratedWidget Compositor::ReleaseAcceleratedWidget() {
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 for (auto& observer : observer_list_) 531 for (auto& observer : observer_list_)
527 observer.OnCompositingLockStateChanged(this); 532 observer.OnCompositingLockStateChanged(this);
528 } 533 }
529 534
530 void Compositor::CancelCompositorLock() { 535 void Compositor::CancelCompositorLock() {
531 if (compositor_lock_) 536 if (compositor_lock_)
532 compositor_lock_->CancelLock(); 537 compositor_lock_->CancelLock();
533 } 538 }
534 539
535 } // namespace ui 540 } // namespace ui
OLDNEW
« no previous file with comments | « ui/compositor/compositor.h ('k') | ui/compositor/test/in_process_context_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698