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

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

Issue 2277883002: Use vsync manager regardless of begin frame settings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments Created 4 years, 3 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
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 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 } 391 }
392 392
393 bool Compositor::GetScrollOffsetForLayer(int layer_id, 393 bool Compositor::GetScrollOffsetForLayer(int layer_id,
394 gfx::ScrollOffset* offset) const { 394 gfx::ScrollOffset* offset) const {
395 return host_->GetInputHandler()->GetScrollOffsetForLayer(layer_id, offset); 395 return host_->GetInputHandler()->GetScrollOffsetForLayer(layer_id, offset);
396 } 396 }
397 397
398 void Compositor::SetAuthoritativeVSyncInterval( 398 void Compositor::SetAuthoritativeVSyncInterval(
399 const base::TimeDelta& interval) { 399 const base::TimeDelta& interval) {
400 context_factory_->SetAuthoritativeVSyncInterval(this, interval); 400 context_factory_->SetAuthoritativeVSyncInterval(this, interval);
401 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 401 vsync_manager_->SetAuthoritativeVSyncInterval(interval);
402 cc::switches::kDisableBeginFrameScheduling)) { 402 }
403 vsync_manager_->SetAuthoritativeVSyncInterval(interval); 403
404 } 404 void Compositor::SetDisplayVSyncParameters(base::TimeTicks timebase,
405 base::TimeDelta interval) {
406 context_factory_->SetDisplayVSyncParameters(this, timebase, interval);
407 vsync_manager_->UpdateVSyncParameters(timebase, interval);
405 } 408 }
406 409
407 void Compositor::SetAcceleratedWidget(gfx::AcceleratedWidget widget) { 410 void Compositor::SetAcceleratedWidget(gfx::AcceleratedWidget widget) {
408 // This function should only get called once. 411 // This function should only get called once.
409 DCHECK(!widget_valid_); 412 DCHECK(!widget_valid_);
410 widget_ = widget; 413 widget_ = widget;
411 widget_valid_ = true; 414 widget_valid_ = true;
412 if (output_surface_requested_) 415 if (output_surface_requested_)
413 context_factory_->CreateOutputSurface(weak_ptr_factory_.GetWeakPtr()); 416 context_factory_->CreateOutputSurface(weak_ptr_factory_.GetWeakPtr());
414 } 417 }
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
580 observer_list_, 583 observer_list_,
581 OnCompositingLockStateChanged(this)); 584 OnCompositingLockStateChanged(this));
582 } 585 }
583 586
584 void Compositor::CancelCompositorLock() { 587 void Compositor::CancelCompositorLock() {
585 if (compositor_lock_) 588 if (compositor_lock_)
586 compositor_lock_->CancelLock(); 589 compositor_lock_->CancelLock();
587 } 590 }
588 591
589 } // namespace ui 592 } // namespace ui
OLDNEW
« content/browser/renderer_host/render_widget_host_view_aura.cc ('K') | « ui/compositor/compositor.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698