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

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

Issue 2100203002: Revert of Turn on enable begin frame scheduling by default (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 host_->SetVisible(visible); 325 host_->SetVisible(visible);
326 } 326 }
327 327
328 bool Compositor::IsVisible() { 328 bool Compositor::IsVisible() {
329 return host_->visible(); 329 return host_->visible();
330 } 330 }
331 331
332 void Compositor::SetAuthoritativeVSyncInterval( 332 void Compositor::SetAuthoritativeVSyncInterval(
333 const base::TimeDelta& interval) { 333 const base::TimeDelta& interval) {
334 context_factory_->SetAuthoritativeVSyncInterval(this, interval); 334 context_factory_->SetAuthoritativeVSyncInterval(this, interval);
335 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 335 if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
336 cc::switches::kDisableBeginFrameScheduling)) { 336 cc::switches::kEnableBeginFrameScheduling)) {
337 vsync_manager_->SetAuthoritativeVSyncInterval(interval); 337 vsync_manager_->SetAuthoritativeVSyncInterval(interval);
338 } 338 }
339 } 339 }
340 340
341 void Compositor::SetAcceleratedWidget(gfx::AcceleratedWidget widget) { 341 void Compositor::SetAcceleratedWidget(gfx::AcceleratedWidget widget) {
342 // This function should only get called once. 342 // This function should only get called once.
343 DCHECK(!widget_valid_); 343 DCHECK(!widget_valid_);
344 widget_ = widget; 344 widget_ = widget;
345 widget_valid_ = true; 345 widget_valid_ = true;
346 if (output_surface_requested_) 346 if (output_surface_requested_)
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 observer_list_, 496 observer_list_,
497 OnCompositingLockStateChanged(this)); 497 OnCompositingLockStateChanged(this));
498 } 498 }
499 499
500 void Compositor::CancelCompositorLock() { 500 void Compositor::CancelCompositorLock() {
501 if (compositor_lock_) 501 if (compositor_lock_)
502 compositor_lock_->CancelLock(); 502 compositor_lock_->CancelLock();
503 } 503 }
504 504
505 } // namespace ui 505 } // 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