| Alec Mouri | 9fa2cb6 | 2019-07-15 17:36:26 -0700 | [diff] [blame] | 1 | /* | 
|  | 2 | * Copyright 2019 The Android Open Source Project | 
|  | 3 | * | 
|  | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); | 
|  | 5 | * you may not use this file except in compliance with the License. | 
|  | 6 | * You may obtain a copy of the License at | 
|  | 7 | * | 
|  | 8 | *      http://www.apache.org/licenses/LICENSE-2.0 | 
|  | 9 | * | 
|  | 10 | * Unless required by applicable law or agreed to in writing, software | 
|  | 11 | * distributed under the License is distributed on an "AS IS" BASIS, | 
|  | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 
|  | 13 | * See the License for the specific language governing permissions and | 
|  | 14 | * limitations under the License. | 
|  | 15 | */ | 
|  | 16 |  | 
|  | 17 | #pragma once | 
|  | 18 |  | 
|  | 19 | #include <nativebase/nativebase.h> | 
|  | 20 |  | 
|  | 21 | // apex is a superset of the NDK | 
|  | 22 | #include <android/native_window.h> | 
|  | 23 |  | 
|  | 24 | __BEGIN_DECLS | 
|  | 25 |  | 
|  | 26 | /** | 
|  | 27 | * Retrieves how long it took for the last time a buffer was dequeued. | 
|  | 28 | * | 
|  | 29 | * \return a negative value on error, otherwise returns the duration in | 
|  | 30 | * microseconds. | 
|  | 31 | */ | 
|  | 32 | int ANativeWindow_getLastDequeueDuration(ANativeWindow* window); | 
|  | 33 |  | 
| Alec Mouri | 0d1398b | 2019-08-14 10:53:50 -0700 | [diff] [blame] | 34 | /** | 
|  | 35 | * Retrieves how long it took for the last time a buffer was queued. | 
|  | 36 | * | 
|  | 37 | * \return a negative value on error, otherwise returns the duration in | 
|  | 38 | * microseconds | 
|  | 39 | */ | 
|  | 40 | int ANativeWindow_getLastQueueDuration(ANativeWindow* window); | 
|  | 41 |  | 
| Alec Mouri | a161966 | 2019-08-21 19:30:48 -0700 | [diff] [blame] | 42 | /** | 
|  | 43 | * Retrieves the system time in nanoseconds when the last time a buffer | 
|  | 44 | * was dequeued. | 
|  | 45 | * | 
|  | 46 | * \return a negative value on error, otherwise returns the duration in | 
|  | 47 | * nanoseconds. | 
|  | 48 | */ | 
|  | 49 | int64_t ANativeWindow_getLastDequeueStartTime(ANativeWindow* window); | 
|  | 50 |  | 
| Alec Mouri | 9fa2cb6 | 2019-07-15 17:36:26 -0700 | [diff] [blame] | 51 | __END_DECLS |