1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 package org.chromium.content.browser;
7 public abstract class VSyncManager {
9 * Interface for requesting notification of the display vsync signal. The provider will call
10 * Listener.onVSync() to notify about vsync. The number of registrations and unregistrations of
11 * a given listener must be balanced.
13 public static interface Provider {
14 void registerVSyncListener(Listener listener);
15 void unregisterVSyncListener(Listener listener);
19 * Interface for receiving vsync notifications and information about the display refresh
22 public static interface Listener {
24 * Notification of a vsync event.
25 * @param frameTimeMicros The latest vsync frame time in microseconds.
27 void onVSync(long frameTimeMicros);
30 * Update with the latest vsync parameters.
31 * @param tickTimeMicros The latest vsync tick time in microseconds.
32 * @param intervalMicros The vsync interval in microseconds.
34 void updateVSync(long tickTimeMicros, long intervalMicros);