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

Unified Diff: cc/scheduler/vsync_time_source.h

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/scheduler_unittest.cc ('k') | cc/scheduler/vsync_time_source.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/scheduler/vsync_time_source.h
diff --git a/cc/scheduler/vsync_time_source.h b/cc/scheduler/vsync_time_source.h
deleted file mode 100644
index 4cd044192c1181ba8bec188b7c5dc72d8b2d011a..0000000000000000000000000000000000000000
--- a/cc/scheduler/vsync_time_source.h
+++ /dev/null
@@ -1,78 +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.
-
-#ifndef CC_SCHEDULER_VSYNC_TIME_SOURCE_H_
-#define CC_SCHEDULER_VSYNC_TIME_SOURCE_H_
-
-#include "cc/base/cc_export.h"
-#include "cc/scheduler/time_source.h"
-
-namespace cc {
-
-class CC_EXPORT VSyncClient {
- public:
- virtual void DidVSync(base::TimeTicks frame_time) = 0;
-
- protected:
- virtual ~VSyncClient() {}
-};
-
-class VSyncProvider {
- public:
- // Request to be notified of future vsync events. The notifications will be
- // delivered until they are disabled by calling this function with a null
- // client.
- virtual void RequestVSyncNotification(VSyncClient* client) = 0;
-
- protected:
- virtual ~VSyncProvider() {}
-};
-
-// This timer implements a time source that is explicitly triggered by an
-// external vsync signal.
-class CC_EXPORT VSyncTimeSource : public TimeSource, public VSyncClient {
- public:
- enum NotificationDisableOption {
- // The notification will be lazily disabled in the callback to ensure
- // we get notified of the frame immediately following a quick on-off-on
- // transition.
- DISABLE_ON_NEXT_TICK,
- DISABLE_SYNCHRONOUSLY
- };
-
- static scoped_refptr<VSyncTimeSource> Create(
- VSyncProvider* vsync_provider, NotificationDisableOption option);
-
- // TimeSource implementation
- virtual void SetClient(TimeSourceClient* client) OVERRIDE;
- virtual void SetTimebaseAndInterval(base::TimeTicks timebase,
- base::TimeDelta interval) OVERRIDE;
- virtual void SetActive(bool active) OVERRIDE;
- virtual bool Active() const OVERRIDE;
- virtual base::TimeTicks LastTickTime() OVERRIDE;
- virtual base::TimeTicks NextTickTime() OVERRIDE;
-
- // VSyncClient implementation
- virtual void DidVSync(base::TimeTicks frame_time) OVERRIDE;
-
- protected:
- explicit VSyncTimeSource(VSyncProvider* vsync_provider,
- NotificationDisableOption option);
- virtual ~VSyncTimeSource();
-
- base::TimeTicks last_tick_time_;
- base::TimeDelta interval_;
- bool active_;
- bool notification_requested_;
-
- VSyncProvider* vsync_provider_;
- TimeSourceClient* client_;
- NotificationDisableOption disable_option_;
-
- DISALLOW_COPY_AND_ASSIGN(VSyncTimeSource);
-};
-
-} // namespace cc
-
-#endif // CC_SCHEDULER_VSYNC_TIME_SOURCE_H_
« no previous file with comments | « cc/scheduler/scheduler_unittest.cc ('k') | cc/scheduler/vsync_time_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698