-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ADPF] PerformanceHintAPI - include core threads + use NDK API #16610
Conversation
Interface Check ReportThis pull request does not change any public interfaces ! |
Please refer the compiling error on Android
|
Could you please fix the clang tidy error? |
} | ||
void ADPFManager::AddThreadIdToHintSession(int32_t tid) { | ||
thread_ids_.push_back(tid); | ||
auto data = thread_ids_.data(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems data is not used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cleaned up in 1d6c8b9
|
||
void ADPFManager::RemoveThreadIdFromHintSession(int32_t tid) { | ||
thread_ids_.erase(std::remove(thread_ids_.begin(), thread_ids_.end(), tid), thread_ids_.end()); | ||
auto data = thread_ids_.data(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same as above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cleaned up data in 1d6c8b9
#elif __ANDROID_API__ >= 33 | ||
auto data = thread_ids_.data(); | ||
std::size_t size = thread_ids_.size(); | ||
int result = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems result is only used in CC_LOG_INFO
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cleaned up variables in 1d6c8b9
@@ -140,17 +155,29 @@ class ADPFManager { | |||
jobject obj_power_service_; | |||
jmethodID get_thermal_headroom_; | |||
|
|||
std::map<std::string, jobject> map_hint_sessions; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is better to use std::unordered_map<>
if the order is not important.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, order isn't important, only the key value mapping is, changed in 1d6c8b9
@HakimHauston thanks, i will merge it after @HakimNB approve it. |
Thanks.. but I am not authorized to approve it..? |
@HakimNB i am not sure, i thought everyone had the permission. But no matter, you can reply in comment if you approve it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@minggo approved
Re: #
adapt PerformanceHintAPI to include main thread & render thread and optionally use the NDK API when available
Changelog
Continuous Integration
This pull request:
Compatibility Check
This pull request: