diff options
author | 2022-12-16 19:00:12 +0000 | |
---|---|---|
committer | 2022-12-16 19:00:12 +0000 | |
commit | c5b20b44dadc4ceaa20f5e58ab1828f907ab7905 (patch) | |
tree | 3b70c358b3e320121434aa815c120372cc5dcfde /native | |
parent | 21f7512b85a523fd65026784f5e55799b7673993 (diff) | |
parent | 61726a38043baea5627019d947cd83029c11e616 (diff) |
Merge "Make sendHint private in platform"
Diffstat (limited to 'native')
-rw-r--r-- | native/android/libandroid.map.txt | 2 | ||||
-rw-r--r-- | native/android/performance_hint.cpp | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/native/android/libandroid.map.txt b/native/android/libandroid.map.txt index 9b0f0203f42b..4e6a0c540f49 100644 --- a/native/android/libandroid.map.txt +++ b/native/android/libandroid.map.txt @@ -330,7 +330,6 @@ LIBANDROID { APerformanceHint_updateTargetWorkDuration; # introduced=Tiramisu APerformanceHint_reportActualWorkDuration; # introduced=Tiramisu APerformanceHint_closeSession; # introduced=Tiramisu - APerformanceHint_sendHint; # introduced=UpsideDownCake local: *; }; @@ -338,6 +337,7 @@ LIBANDROID { LIBANDROID_PLATFORM { global: APerformanceHint_setIHintManagerForTesting; + APerformanceHint_sendHint; extern "C++" { ASurfaceControl_registerSurfaceStatsListener*; ASurfaceControl_unregisterSurfaceStatsListener*; diff --git a/native/android/performance_hint.cpp b/native/android/performance_hint.cpp index 9e97bd33ce9c..43b3d2e94aac 100644 --- a/native/android/performance_hint.cpp +++ b/native/android/performance_hint.cpp @@ -285,14 +285,14 @@ int APerformanceHint_reportActualWorkDuration(APerformanceHintSession* session, return session->reportActualWorkDuration(actualDurationNanos); } -int APerformanceHint_sendHint(APerformanceHintSession* session, int32_t hint) { - return session->sendHint(hint); -} - void APerformanceHint_closeSession(APerformanceHintSession* session) { delete session; } +int APerformanceHint_sendHint(void* session, int32_t hint) { + return reinterpret_cast<APerformanceHintSession*>(session)->sendHint(hint); +} + void APerformanceHint_setIHintManagerForTesting(void* iManager) { delete gHintManagerForTesting; gHintManagerForTesting = nullptr; |