Revert "drm_hwcomposer: Initialize stats asynchronously"
This reverts commit e5f755f842.
IStats initialization will be revisited in a follow-up commit. Threaded
initialization will no longer be necessary.
This commit is contained in:
parent
7f7fb03cc1
commit
7e66322389
2 changed files with 7 additions and 13 deletions
|
|
@ -494,19 +494,17 @@ ComposerClient::ComposerClient() {
|
|||
void ComposerClient::Init() {
|
||||
DEBUG_FUNC();
|
||||
hwc_ = std::make_unique<DrmHwcThree>();
|
||||
initialize_stats_thread_ = std::thread([this] {
|
||||
auto reporter = CompositionStatsAtomReporter::Create();
|
||||
if (reporter) {
|
||||
stats_poller_ = std::make_unique<CompositionStatsPoller>(std::move(
|
||||
reporter),
|
||||
hwc_.get());
|
||||
}
|
||||
});
|
||||
|
||||
auto reporter = CompositionStatsAtomReporter::Create();
|
||||
if (reporter) {
|
||||
stats_poller_ = std::make_unique<CompositionStatsPoller>(std::move(
|
||||
reporter),
|
||||
hwc_.get());
|
||||
}
|
||||
}
|
||||
|
||||
ComposerClient::~ComposerClient() {
|
||||
DEBUG_FUNC();
|
||||
initialize_stats_thread_.join();
|
||||
stats_poller_.reset();
|
||||
if (hwc_) {
|
||||
const std::unique_lock lock(hwc_->GetResMan().GetMainLock());
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@
|
|||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <thread>
|
||||
|
||||
#include "aidl/android/hardware/graphics/composer3/BnComposerClient.h"
|
||||
#include "aidl/android/hardware/graphics/composer3/LayerCommand.h"
|
||||
|
|
@ -191,9 +190,6 @@ class ComposerClient : public BnComposerClient {
|
|||
|
||||
std::unique_ptr<DrmHwcThree> hwc_;
|
||||
|
||||
// The CompositionStatsPoller is initialized on the helper thread. The thread
|
||||
// must be joined before the object is accessed or destroyed.
|
||||
std::thread initialize_stats_thread_;
|
||||
std::unique_ptr<::android::CompositionStatsPoller> stats_poller_;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue