OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 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. |
| 4 |
| 5 package org.chromium.content.browser; |
| 6 |
| 7 public abstract class VSyncManager { |
| 8 /** |
| 9 * Interface for requesting notification of the display vsync signal. |
| 10 * The provider will call Listener.onVSync() to notify about vsync. |
| 11 */ |
| 12 public static interface Provider { |
| 13 void setVSyncNotificationEnabled(Listener listener, boolean enable); |
| 14 } |
| 15 |
| 16 /** |
| 17 * Interface for receiving vsync notifications and information about the dis
play refresh |
| 18 * interval. |
| 19 */ |
| 20 public static interface Listener { |
| 21 /** |
| 22 * Notification of a vsync event. |
| 23 * @param frameTimeMicros The latest vsync frame time in microseconds. |
| 24 */ |
| 25 void onVSync(long frameTimeMicros); |
| 26 |
| 27 /** |
| 28 * Update with the latest vsync parameters. |
| 29 * @param tickTimeMicros The latest vsync tick time in microseconds. |
| 30 * @param intervalMicros The vsync interval in microseconds. |
| 31 */ |
| 32 void updateVSync(long tickTimeMicros, long intervalMicros); |
| 33 } |
| 34 } |
OLD | NEW |