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

Unified Diff: cc/scheduler/vsync_time_source.cc

Issue 16833003: cc: Emulate BeginFrame in OutputSurfaces that don't support it natively (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 6 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
« no previous file with comments | « cc/scheduler/vsync_time_source.h ('k') | cc/scheduler/vsync_time_source_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/scheduler/vsync_time_source.cc
diff --git a/cc/scheduler/vsync_time_source.cc b/cc/scheduler/vsync_time_source.cc
deleted file mode 100644
index 206e2376675156e36cd20ee0d284a7dc40b5f7ab..0000000000000000000000000000000000000000
--- a/cc/scheduler/vsync_time_source.cc
+++ /dev/null
@@ -1,76 +0,0 @@
-// Copyright 2013 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 "cc/scheduler/vsync_time_source.h"
-
-#include "base/logging.h"
-
-namespace cc {
-
-scoped_refptr<VSyncTimeSource> VSyncTimeSource::Create(
- VSyncProvider* vsync_provider, NotificationDisableOption option) {
- return make_scoped_refptr(new VSyncTimeSource(vsync_provider, option));
-}
-
-VSyncTimeSource::VSyncTimeSource(
- VSyncProvider* vsync_provider, NotificationDisableOption option)
- : active_(false),
- notification_requested_(false),
- vsync_provider_(vsync_provider),
- client_(NULL),
- disable_option_(option) {}
-
-VSyncTimeSource::~VSyncTimeSource() {}
-
-void VSyncTimeSource::SetClient(TimeSourceClient* client) {
- client_ = client;
-}
-
-void VSyncTimeSource::SetActive(bool active) {
- if (active_ == active)
- return;
- active_ = active;
- if (active_ && !notification_requested_) {
- notification_requested_ = true;
- vsync_provider_->RequestVSyncNotification(this);
- }
- if (!active_ && disable_option_ == DISABLE_SYNCHRONOUSLY) {
- notification_requested_ = false;
- vsync_provider_->RequestVSyncNotification(NULL);
- }
-}
-
-bool VSyncTimeSource::Active() const {
- return active_;
-}
-
-base::TimeTicks VSyncTimeSource::LastTickTime() {
- return last_tick_time_;
-}
-
-base::TimeTicks VSyncTimeSource::NextTickTime() {
- return Active() ? last_tick_time_ + interval_ : base::TimeTicks();
-}
-
-void VSyncTimeSource::SetTimebaseAndInterval(base::TimeTicks,
- base::TimeDelta interval) {
- interval_ = interval;
-}
-
-void VSyncTimeSource::DidVSync(base::TimeTicks frame_time) {
- last_tick_time_ = frame_time;
- if (disable_option_ == DISABLE_SYNCHRONOUSLY) {
- DCHECK(active_);
- } else if (!active_) {
- if (notification_requested_) {
- notification_requested_ = false;
- vsync_provider_->RequestVSyncNotification(NULL);
- }
- return;
- }
- if (client_)
- client_->OnTimerTick();
-}
-
-} // namespace cc
« no previous file with comments | « cc/scheduler/vsync_time_source.h ('k') | cc/scheduler/vsync_time_source_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698