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

Commit 9e019976 authored by Peiyong Lin's avatar Peiyong Lin Committed by Android (Google) Code Review
Browse files

Merge "Add setThreads to APerformanceHint."

parents 7a4d1267 f9c984f6
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
@@ -159,6 +159,23 @@ int APerformanceHint_reportActualWorkDuration(
void APerformanceHint_closeSession(
        APerformanceHintSession* session) __INTRODUCED_IN(__ANDROID_API_T__);

/**
 * Set a list of threads to the performance hint session. This operation will replace
 * the current list of threads with the given list of threads.
 *
 * @param session The performance hint session instance for the threads.
 * @param threadIds The list of threads to be associated with this session. They must be part of
 *     this app's thread group.
 * @param size the size of the list of threadIds.
 * @return 0 on success.
 *         EINVAL if the list of thread ids is empty or if  any of the thread ids is not part of the thread group.
 *         EPIPE if communication with the system service has failed.
 */
int APerformanceHint_setThreads(
        APerformanceHintSession* session,
        const int32_t* threadIds,
        size_t size) __INTRODUCED_IN(__ANDROID_API_U__);

__END_DECLS

#endif // ANDROID_NATIVE_PERFORMANCE_HINT_H
+6 −0
Original line number Diff line number Diff line
@@ -63,6 +63,12 @@ enum SessionHint {
 */
int APerformanceHint_sendHint(void* session, int hint);

/**
 * Return the list of thread ids, this API should only be used for testing only.
 */
int APerformanceHint_getThreadIds(void* aPerformanceHintSession,
                                  int32_t* const threadIds, size_t* const size);

__END_DECLS

#endif // ANDROID_PRIVATE_NATIVE_PERFORMANCE_HINT_PRIVATE_H