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

Unified Diff: ui/compositor/compositor_vsync_manager.cc

Issue 775143003: cc: Implement unified BeginFrame on aura (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add unittest Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: ui/compositor/compositor_vsync_manager.cc
diff --git a/ui/compositor/compositor_vsync_manager.cc b/ui/compositor/compositor_vsync_manager.cc
deleted file mode 100644
index f51847ca7bf2cf508c5d7a456bb55ee0e0dd22ba..0000000000000000000000000000000000000000
--- a/ui/compositor/compositor_vsync_manager.cc
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ui/compositor/compositor_vsync_manager.h"
-
-namespace ui {
-
-CompositorVSyncManager::CompositorVSyncManager()
- : authoritative_vsync_interval_(base::TimeDelta::FromSeconds(0)) {
-}
-
-CompositorVSyncManager::~CompositorVSyncManager() {}
-
-void CompositorVSyncManager::SetAuthoritativeVSyncInterval(
- base::TimeDelta interval) {
- authoritative_vsync_interval_ = interval;
- last_interval_ = interval;
- NotifyObservers(last_timebase_, last_interval_);
-}
-
-void CompositorVSyncManager::UpdateVSyncParameters(base::TimeTicks timebase,
- base::TimeDelta interval) {
- if (authoritative_vsync_interval_ != base::TimeDelta::FromSeconds(0))
- interval = authoritative_vsync_interval_;
- last_timebase_ = timebase;
- last_interval_ = interval;
- NotifyObservers(timebase, interval);
-}
-
-void CompositorVSyncManager::AddObserver(Observer* observer) {
- observer_list_.AddObserver(observer);
- observer->OnUpdateVSyncParameters(last_timebase_, last_interval_);
-}
-
-void CompositorVSyncManager::RemoveObserver(Observer* observer) {
- observer_list_.RemoveObserver(observer);
-}
-
-void CompositorVSyncManager::NotifyObservers(base::TimeTicks timebase,
- base::TimeDelta interval) {
- FOR_EACH_OBSERVER(CompositorVSyncManager::Observer, observer_list_,
- OnUpdateVSyncParameters(timebase, interval));
-}
-
-} // namespace ui

Powered by Google App Engine
This is Rietveld 408576698