зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1650996 - P1. Remove RemodeDecoderManagerChild::CanSend method. r=mattwoodrow
The base IProtocol class already provides this. Differential Revision: https://phabricator.services.mozilla.com/D82501
This commit is contained in:
Родитель
f5267597e4
Коммит
f1cd4ddc78
|
@ -156,10 +156,10 @@ void RemoteDecoderManagerChild::OpenForRDDProcess(
|
|||
// ipdl if:
|
||||
// 1) haven't init'd sRemoteDecoderManagerChild
|
||||
// or
|
||||
// 2) if ActorDestroy was called (mCanSend is false) meaning the other
|
||||
// end of the ipc channel was torn down
|
||||
// 2) if ActorDestroy was called meaning the other end of the ipc channel was
|
||||
// torn down
|
||||
if (sRemoteDecoderManagerChildForRDDProcess &&
|
||||
sRemoteDecoderManagerChildForRDDProcess->mCanSend) {
|
||||
sRemoteDecoderManagerChildForRDDProcess->CanSend()) {
|
||||
return;
|
||||
}
|
||||
sRemoteDecoderManagerChildForRDDProcess = nullptr;
|
||||
|
@ -193,21 +193,11 @@ void RemoteDecoderManagerChild::OpenForGPUProcess(
|
|||
}
|
||||
|
||||
void RemoteDecoderManagerChild::InitIPDL() {
|
||||
mCanSend = true;
|
||||
mIPDLSelfRef = this;
|
||||
}
|
||||
|
||||
void RemoteDecoderManagerChild::ActorDestroy(ActorDestroyReason aWhy) {
|
||||
mCanSend = false;
|
||||
}
|
||||
|
||||
void RemoteDecoderManagerChild::ActorDealloc() { mIPDLSelfRef = nullptr; }
|
||||
|
||||
bool RemoteDecoderManagerChild::CanSend() {
|
||||
MOZ_ASSERT(NS_GetCurrentThread() == GetManagerThread());
|
||||
return mCanSend;
|
||||
}
|
||||
|
||||
bool RemoteDecoderManagerChild::DeallocShmem(mozilla::ipc::Shmem& aShmem) {
|
||||
if (NS_GetCurrentThread() != sRemoteDecoderManagerChildThread) {
|
||||
RefPtr<RemoteDecoderManagerChild> self = this;
|
||||
|
|
|
@ -63,13 +63,11 @@ class RemoteDecoderManagerChild final
|
|||
// called from the manager thread.
|
||||
void RunWhenGPUProcessRecreated(already_AddRefed<Runnable> aTask);
|
||||
|
||||
bool CanSend();
|
||||
layers::VideoBridgeSource GetSource() const { return mSource; }
|
||||
|
||||
protected:
|
||||
void InitIPDL();
|
||||
|
||||
void ActorDestroy(ActorDestroyReason aWhy) override;
|
||||
void ActorDealloc() override;
|
||||
|
||||
void HandleFatalError(const char* aMsg) const override;
|
||||
|
@ -97,9 +95,6 @@ class RemoteDecoderManagerChild final
|
|||
|
||||
// The associated source of this decoder manager
|
||||
layers::VideoBridgeSource mSource;
|
||||
|
||||
// Should only ever be accessed on the manager thread.
|
||||
bool mCanSend = false;
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
|
Загрузка…
Ссылка в новой задаче