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

Side by Side Diff: ui/compositor/compositor.cc

Issue 2511273002: Decouple BrowserCompositorOutputSurface from BeginFrameSource. (Closed)
Patch Set: Bring back GpuBrowserCompositorOutputSurface destructor 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 | « content/browser/compositor/vulkan_browser_compositor_output_surface.cc ('k') | no next file » | 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 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 } 364 }
365 365
366 void Compositor::SetAuthoritativeVSyncInterval( 366 void Compositor::SetAuthoritativeVSyncInterval(
367 const base::TimeDelta& interval) { 367 const base::TimeDelta& interval) {
368 context_factory_->SetAuthoritativeVSyncInterval(this, interval); 368 context_factory_->SetAuthoritativeVSyncInterval(this, interval);
369 vsync_manager_->SetAuthoritativeVSyncInterval(interval); 369 vsync_manager_->SetAuthoritativeVSyncInterval(interval);
370 } 370 }
371 371
372 void Compositor::SetDisplayVSyncParameters(base::TimeTicks timebase, 372 void Compositor::SetDisplayVSyncParameters(base::TimeTicks timebase,
373 base::TimeDelta interval) { 373 base::TimeDelta interval) {
374 if (interval.is_zero()) {
375 // TODO(brianderson): We should not be receiving 0 intervals.
376 interval = cc::BeginFrameArgs::DefaultInterval();
377 }
378
374 context_factory_->SetDisplayVSyncParameters(this, timebase, interval); 379 context_factory_->SetDisplayVSyncParameters(this, timebase, interval);
375 vsync_manager_->UpdateVSyncParameters(timebase, interval); 380 vsync_manager_->UpdateVSyncParameters(timebase, interval);
376 } 381 }
377 382
378 void Compositor::SetAcceleratedWidget(gfx::AcceleratedWidget widget) { 383 void Compositor::SetAcceleratedWidget(gfx::AcceleratedWidget widget) {
379 // This function should only get called once. 384 // This function should only get called once.
380 DCHECK(!widget_valid_); 385 DCHECK(!widget_valid_);
381 widget_ = widget; 386 widget_ = widget;
382 widget_valid_ = true; 387 widget_valid_ = true;
383 if (compositor_frame_sink_requested_) 388 if (compositor_frame_sink_requested_)
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 for (auto& observer : observer_list_) 532 for (auto& observer : observer_list_)
528 observer.OnCompositingLockStateChanged(this); 533 observer.OnCompositingLockStateChanged(this);
529 } 534 }
530 535
531 void Compositor::CancelCompositorLock() { 536 void Compositor::CancelCompositorLock() {
532 if (compositor_lock_) 537 if (compositor_lock_)
533 compositor_lock_->CancelLock(); 538 compositor_lock_->CancelLock();
534 } 539 }
535 540
536 } // namespace ui 541 } // namespace ui
OLDNEW
« no previous file with comments | « content/browser/compositor/vulkan_browser_compositor_output_surface.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698