mirror of
https://gitee.com/openharmony/graphic_graphic_2d
synced 2024-11-27 09:10:54 +00:00
!16130 SendUIMessage增加cmdIndex标识
Merge pull request !16130 from chenq/1018-cmdindex
This commit is contained in:
commit
9b395ba359
@ -3154,12 +3154,12 @@ void RSMainThread::SendCommands()
|
||||
auto& app = appIter->second;
|
||||
auto transactionPtr = transactionIter.second;
|
||||
if (transactionPtr != nullptr) {
|
||||
dfxString += "[pid:" + std::to_string(pid) + ",cmdIndex:" + std::to_string(transactionPtr->GetIndex())
|
||||
+ ",cmdCount:" + std::to_string(transactionPtr->GetCommandCount()) + "]";
|
||||
dfxString += "[pid:" + std::to_string(pid) + ",index:" + std::to_string(transactionPtr->GetIndex())
|
||||
+ ",cnt:" + std::to_string(transactionPtr->GetCommandCount()) + "]";
|
||||
}
|
||||
app->OnTransaction(transactionPtr);
|
||||
}
|
||||
RS_LOGI("RSMainThread::SendCommand to %{public}s", dfxString.c_str());
|
||||
RS_LOGI("RS send to %{public}s", dfxString.c_str());
|
||||
RS_TRACE_NAME_FMT("RSMainThread::SendCommand to %s", dfxString.c_str());
|
||||
});
|
||||
}
|
||||
|
@ -48,6 +48,7 @@ private:
|
||||
private:
|
||||
mutable std::mutex transactionMapMutex_;
|
||||
std::unordered_map<uint32_t, std::shared_ptr<RSTransactionData>> transactionMap_;
|
||||
uint32_t transactionDataIndex_ = 0;
|
||||
};
|
||||
} // namespace Rosen
|
||||
} // namespace OHOS
|
||||
|
@ -38,6 +38,8 @@ void RSMessageProcessor::AddUIMessage(uint32_t pid, std::unique_ptr<RSCommand>&
|
||||
std::unique_lock<std::mutex> lock(transactionMapMutex_);
|
||||
if (!transactionMap_.count(pid)) {
|
||||
std::shared_ptr<RSTransactionData> transactionData = std::make_shared<RSTransactionData>();
|
||||
transactionDataIndex_++;
|
||||
transactionData->SetIndex(transactionDataIndex_);
|
||||
transactionMap_[pid] = transactionData;
|
||||
}
|
||||
transactionMap_[pid]->AddCommand(std::move(command), 0, FollowType::NONE);
|
||||
@ -48,6 +50,8 @@ void RSMessageProcessor::AddUIMessage(uint32_t pid, std::unique_ptr<RSCommand>&&
|
||||
std::unique_lock<std::mutex> lock(transactionMapMutex_);
|
||||
if (!transactionMap_.count(pid)) {
|
||||
std::shared_ptr<RSTransactionData> transactionData = std::make_shared<RSTransactionData>();
|
||||
transactionDataIndex_++;
|
||||
transactionData->SetIndex(transactionDataIndex_);
|
||||
transactionMap_[pid] = transactionData;
|
||||
}
|
||||
transactionMap_[pid]->AddCommand(std::move(command), 0, FollowType::NONE);
|
||||
|
Loading…
Reference in New Issue
Block a user