summaryrefslogtreecommitdiff
path: root/libs/nativewindow/ANativeWindow.cpp
diff options
context:
space:
mode:
author Alec Mouri <alecmouri@google.com> 2019-07-15 17:36:26 -0700
committer Alec Mouri <alecmouri@google.com> 2019-08-20 10:47:19 -0700
commit9fa2cb6c5af15e5386c4632aed4847057c08340b (patch)
tree05ae8c53a20696bdfa523066e4c12c745de054e0 /libs/nativewindow/ANativeWindow.cpp
parent82c7531ebcdf6afca4ef08b4e7227b2cebb38cd1 (diff)
[ANativeWindow] Add test infrastructure for apex apis
* Add ANativeWindow_getLastDequeueDuration as proof of concept * Add ANativeWindowTest harness * apex/ include directory for code living in apex modules, so that vndk or system apis aren't pulled in * TEST_MAPPING configuration for presubmit Note that we're not piggybacking off of the existing Surface_test harness, as those tests assume that the libgui Surface is The ANativeWindow surface implementation, which means that those tests may test implementation details that the harness defined in this change should not attempt to test. Further, if an alternative implementation is provided (e.g. an ANativeWindow -> BLAST adapter), we should be able to parameterize the tests here. For now, however, we'll keep the assumption that Surface is the only relevant surface implementation so that nonzero tests may be written. Bug: 137012161 Bug: 137012798 Test: libnativewindow_test Change-Id: I0dddc348563ba95530fb1bd04bde66080755a91d
Diffstat (limited to 'libs/nativewindow/ANativeWindow.cpp')
-rw-r--r--libs/nativewindow/ANativeWindow.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/libs/nativewindow/ANativeWindow.cpp b/libs/nativewindow/ANativeWindow.cpp
index 1751443419..4c59e6ce98 100644
--- a/libs/nativewindow/ANativeWindow.cpp
+++ b/libs/nativewindow/ANativeWindow.cpp
@@ -266,3 +266,11 @@ int ANativeWindow_setAutoRefresh(ANativeWindow* window, bool autoRefresh) {
int ANativeWindow_setAutoPrerotation(ANativeWindow* window, bool autoPrerotation) {
return native_window_set_auto_prerotation(window, autoPrerotation);
}
+
+/**************************************************************************************************
+ * apex-stable
+ **************************************************************************************************/
+
+int ANativeWindow_getLastDequeueDuration(ANativeWindow* window) {
+ return query(window, NATIVE_WINDOW_LAST_DEQUEUE_DURATION);
+}