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

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

Issue 1939253002: Turn on enable begin frame scheduling by default (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 4 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
« no previous file with comments | « content/renderer/gpu/render_widget_compositor.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 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 host_->SetVisible(visible); 381 host_->SetVisible(visible);
382 } 382 }
383 383
384 bool Compositor::IsVisible() { 384 bool Compositor::IsVisible() {
385 return host_->visible(); 385 return host_->visible();
386 } 386 }
387 387
388 void Compositor::SetAuthoritativeVSyncInterval( 388 void Compositor::SetAuthoritativeVSyncInterval(
389 const base::TimeDelta& interval) { 389 const base::TimeDelta& interval) {
390 context_factory_->SetAuthoritativeVSyncInterval(this, interval); 390 context_factory_->SetAuthoritativeVSyncInterval(this, interval);
391 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( 391 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
392 cc::switches::kEnableBeginFrameScheduling)) { 392 cc::switches::kDisableBeginFrameScheduling)) {
393 vsync_manager_->SetAuthoritativeVSyncInterval(interval); 393 vsync_manager_->SetAuthoritativeVSyncInterval(interval);
394 } 394 }
395 } 395 }
396 396
397 void Compositor::SetAcceleratedWidget(gfx::AcceleratedWidget widget) { 397 void Compositor::SetAcceleratedWidget(gfx::AcceleratedWidget widget) {
398 // This function should only get called once. 398 // This function should only get called once.
399 DCHECK(!widget_valid_); 399 DCHECK(!widget_valid_);
400 widget_ = widget; 400 widget_ = widget;
401 widget_valid_ = true; 401 widget_valid_ = true;
402 if (output_surface_requested_) 402 if (output_surface_requested_)
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 observer_list_, 558 observer_list_,
559 OnCompositingLockStateChanged(this)); 559 OnCompositingLockStateChanged(this));
560 } 560 }
561 561
562 void Compositor::CancelCompositorLock() { 562 void Compositor::CancelCompositorLock() {
563 if (compositor_lock_) 563 if (compositor_lock_)
564 compositor_lock_->CancelLock(); 564 compositor_lock_->CancelLock();
565 } 565 }
566 566
567 } // namespace ui 567 } // namespace ui
OLDNEW
« no previous file with comments | « content/renderer/gpu/render_widget_compositor.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698