Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 548308f8 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "[ANativeWindow] Add test infrastructure for apex apis"

parents 275fb46d 9fa2cb6c
Loading
Loading
Loading
Loading

libs/gui/TEST_MAPPING

0 → 100644
+7 −0
Original line number Diff line number Diff line
{
  "imports": [
    {
      "path": "frameworks/native/libs/nativewindow"
    }
  ]
}
+8 −0
Original line number Diff line number Diff line
@@ -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);
}
+7 −0
Original line number Diff line number Diff line
{
  "presubmit": [
    {
      "name": "libnativewindow_test"
    }
  ]
}
+34 −0
Original line number Diff line number Diff line
/*
 * Copyright 2019 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#pragma once

#include <nativebase/nativebase.h>

// apex is a superset of the NDK
#include <android/native_window.h>

__BEGIN_DECLS

/**
 * Retrieves how long it took for the last time a buffer was dequeued.
 *
 * \return a negative value on error, otherwise returns the duration in
 * microseconds.
 */
int ANativeWindow_getLastDequeueDuration(ANativeWindow* window);

__END_DECLS
+2 −1
Original line number Diff line number Diff line
@@ -41,7 +41,8 @@
#include <unistd.h>
#include <stdbool.h>

// system/window.h is a superset of the vndk
// system/window.h is a superset of the vndk and apex apis
#include <apex/window.h>
#include <vndk/window.h>


Loading