mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
Bug 1647133 - P4. Use nsISerialEventTarget where it's actually that. r=mattwoodrow
We are here, always actually dealing with the compositor thread, with the exception of VRDisplayPresentation which is passing the main thread. Depends on D80422 Differential Revision: https://phabricator.services.mozilla.com/D80423
This commit is contained in:
parent
4f53bc5dc3
commit
8d2ff29220
@ -1059,7 +1059,7 @@ bool TextureClient::InitIPDLActor(CompositableForwarder* aForwarder) {
|
||||
}
|
||||
if (ShadowLayerForwarder* forwarder = aForwarder->AsLayerForwarder()) {
|
||||
// Do the DOM labeling.
|
||||
if (nsIEventTarget* target = forwarder->GetEventTarget()) {
|
||||
if (nsISerialEventTarget* target = forwarder->GetEventTarget()) {
|
||||
forwarder->GetCompositorBridgeChild()->ReplaceEventTargetForActor(
|
||||
mActor, target);
|
||||
}
|
||||
@ -1082,7 +1082,7 @@ bool TextureClient::InitIPDLActor(CompositableForwarder* aForwarder) {
|
||||
mExternalImageId =
|
||||
aForwarder->GetTextureForwarder()->GetNextExternalImageId();
|
||||
|
||||
nsIEventTarget* target = nullptr;
|
||||
nsISerialEventTarget* target = nullptr;
|
||||
// Get the layers id if the forwarder is a ShadowLayerForwarder.
|
||||
if (ShadowLayerForwarder* forwarder = aForwarder->AsLayerForwarder()) {
|
||||
target = forwarder->GetEventTarget();
|
||||
|
@ -932,7 +932,7 @@ CompositorBridgeChild::GetTileLockAllocator() {
|
||||
PTextureChild* CompositorBridgeChild::CreateTexture(
|
||||
const SurfaceDescriptor& aSharedData, const ReadLockDescriptor& aReadLock,
|
||||
LayersBackend aLayersBackend, TextureFlags aFlags, uint64_t aSerial,
|
||||
wr::MaybeExternalImageId& aExternalImageId, nsIEventTarget* aTarget) {
|
||||
wr::MaybeExternalImageId& aExternalImageId, nsISerialEventTarget* aTarget) {
|
||||
PTextureChild* textureChild =
|
||||
AllocPTextureChild(aSharedData, aReadLock, aLayersBackend, aFlags,
|
||||
LayersId{0} /* FIXME */, aSerial, aExternalImageId);
|
||||
|
@ -126,7 +126,7 @@ class CompositorBridgeChild final : public PCompositorBridgeChild,
|
||||
LayersBackend aLayersBackend,
|
||||
TextureFlags aFlags, uint64_t aSerial,
|
||||
wr::MaybeExternalImageId& aExternalImageId,
|
||||
nsIEventTarget* aTarget) override;
|
||||
nsISerialEventTarget* aTarget) override;
|
||||
|
||||
already_AddRefed<CanvasChild> GetCanvasChild() final;
|
||||
|
||||
|
@ -848,7 +848,7 @@ mozilla::ipc::IPCResult ImageBridgeChild::RecvReportFramesDropped(
|
||||
PTextureChild* ImageBridgeChild::CreateTexture(
|
||||
const SurfaceDescriptor& aSharedData, const ReadLockDescriptor& aReadLock,
|
||||
LayersBackend aLayersBackend, TextureFlags aFlags, uint64_t aSerial,
|
||||
wr::MaybeExternalImageId& aExternalImageId, nsIEventTarget* aTarget) {
|
||||
wr::MaybeExternalImageId& aExternalImageId, nsISerialEventTarget* aTarget) {
|
||||
MOZ_ASSERT(CanSend());
|
||||
return SendPTextureConstructor(aSharedData, aReadLock, aLayersBackend, aFlags,
|
||||
aSerial, aExternalImageId);
|
||||
|
@ -303,12 +303,11 @@ class ImageBridgeChild final : public PImageBridgeChild,
|
||||
*/
|
||||
bool DeallocShmem(mozilla::ipc::Shmem& aShmem) override;
|
||||
|
||||
PTextureChild* CreateTexture(const SurfaceDescriptor& aSharedData,
|
||||
const ReadLockDescriptor& aReadLock,
|
||||
LayersBackend aLayersBackend,
|
||||
TextureFlags aFlags, uint64_t aSerial,
|
||||
wr::MaybeExternalImageId& aExternalImageId,
|
||||
nsIEventTarget* aTarget = nullptr) override;
|
||||
PTextureChild* CreateTexture(
|
||||
const SurfaceDescriptor& aSharedData, const ReadLockDescriptor& aReadLock,
|
||||
LayersBackend aLayersBackend, TextureFlags aFlags, uint64_t aSerial,
|
||||
wr::MaybeExternalImageId& aExternalImageId,
|
||||
nsISerialEventTarget* aTarget = nullptr) override;
|
||||
|
||||
bool IsSameProcess() const override;
|
||||
|
||||
|
@ -388,7 +388,7 @@ class ShadowLayerForwarder final : public LayersIPCActor,
|
||||
|
||||
CompositorBridgeChild* GetCompositorBridgeChild();
|
||||
|
||||
nsIEventTarget* GetEventTarget() { return mEventTarget; };
|
||||
nsISerialEventTarget* GetEventTarget() { return mEventTarget; };
|
||||
|
||||
bool IsThreadSafe() const override { return false; }
|
||||
|
||||
@ -430,7 +430,7 @@ class ShadowLayerForwarder final : public LayersIPCActor,
|
||||
* browserChild don't exist anymore; therefore we hold the event target since
|
||||
* its lifecycle is independent of these objects.
|
||||
*/
|
||||
nsCOMPtr<nsIEventTarget> mEventTarget;
|
||||
nsCOMPtr<nsISerialEventTarget> mEventTarget;
|
||||
};
|
||||
|
||||
class CompositableClient;
|
||||
|
@ -79,7 +79,7 @@ class TextureForwarder : public LayersIPCChannel {
|
||||
const SurfaceDescriptor& aSharedData, const ReadLockDescriptor& aReadLock,
|
||||
LayersBackend aLayersBackend, TextureFlags aFlags, uint64_t aSerial,
|
||||
wr::MaybeExternalImageId& aExternalImageId,
|
||||
nsIEventTarget* aTarget = nullptr) = 0;
|
||||
nsISerialEventTarget* aTarget = nullptr) = 0;
|
||||
|
||||
/**
|
||||
* Returns the CanvasChild for this TextureForwarder.
|
||||
|
@ -163,7 +163,7 @@ void VideoBridgeChild::ActorDealloc() { mIPDLSelfRef = nullptr; }
|
||||
PTextureChild* VideoBridgeChild::CreateTexture(
|
||||
const SurfaceDescriptor& aSharedData, const ReadLockDescriptor& aReadLock,
|
||||
LayersBackend aLayersBackend, TextureFlags aFlags, uint64_t aSerial,
|
||||
wr::MaybeExternalImageId& aExternalImageId, nsIEventTarget* aTarget) {
|
||||
wr::MaybeExternalImageId& aExternalImageId, nsISerialEventTarget* aTarget) {
|
||||
MOZ_ASSERT(CanSend());
|
||||
return SendPTextureConstructor(aSharedData, aReadLock, aLayersBackend, aFlags,
|
||||
aSerial);
|
||||
|
@ -48,12 +48,11 @@ class VideoBridgeChild final : public PVideoBridgeChild,
|
||||
bool DeallocShmem(mozilla::ipc::Shmem& aShmem) override;
|
||||
|
||||
// TextureForwarder
|
||||
PTextureChild* CreateTexture(const SurfaceDescriptor& aSharedData,
|
||||
const ReadLockDescriptor& aReadLock,
|
||||
LayersBackend aLayersBackend,
|
||||
TextureFlags aFlags, uint64_t aSerial,
|
||||
wr::MaybeExternalImageId& aExternalImageId,
|
||||
nsIEventTarget* aTarget = nullptr) override;
|
||||
PTextureChild* CreateTexture(
|
||||
const SurfaceDescriptor& aSharedData, const ReadLockDescriptor& aReadLock,
|
||||
LayersBackend aLayersBackend, TextureFlags aFlags, uint64_t aSerial,
|
||||
wr::MaybeExternalImageId& aExternalImageId,
|
||||
nsISerialEventTarget* aTarget = nullptr) override;
|
||||
|
||||
// ClientIPCAllocator
|
||||
base::ProcessId GetParentPid() const override { return OtherPid(); }
|
||||
|
@ -39,7 +39,7 @@ void VRDisplayPresentation::UpdateXRWebGLLayer(dom::XRWebGLLayer* aLayer) {
|
||||
}
|
||||
|
||||
dom::HTMLCanvasElement* canvasElement = aLayer->GetCanvas();
|
||||
nsCOMPtr<nsIEventTarget> target =
|
||||
nsCOMPtr<nsISerialEventTarget> target =
|
||||
canvasElement->OwnerDoc()->EventTargetFor(TaskCategory::Other);
|
||||
|
||||
if (mLayers.Length() == 0) {
|
||||
@ -103,7 +103,7 @@ void VRDisplayPresentation::CreateLayers() {
|
||||
continue;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIEventTarget> target =
|
||||
nsCOMPtr<nsISerialEventTarget> target =
|
||||
canvasElement->OwnerDoc()->EventTargetFor(TaskCategory::Other);
|
||||
|
||||
if (mLayers.Length() <= iLayer) {
|
||||
|
@ -369,7 +369,7 @@ bool VRManagerChild::EnumerateVRDisplays() {
|
||||
void VRManagerChild::DetectRuntimes() { Unused << SendDetectRuntimes(); }
|
||||
|
||||
PVRLayerChild* VRManagerChild::CreateVRLayer(uint32_t aDisplayID,
|
||||
nsIEventTarget* aTarget,
|
||||
nsISerialEventTarget* aTarget,
|
||||
uint32_t aGroup) {
|
||||
PVRLayerChild* vrLayerChild = AllocPVRLayerChild(aDisplayID, aGroup);
|
||||
// Do the DOM labeling.
|
||||
|
@ -83,8 +83,8 @@ class VRManagerChild : public PVRManagerChild {
|
||||
static bool IsPresenting();
|
||||
static TimeStamp GetIdleDeadlineHint(TimeStamp aDefault);
|
||||
|
||||
PVRLayerChild* CreateVRLayer(uint32_t aDisplayID, nsIEventTarget* aTarget,
|
||||
uint32_t aGroup);
|
||||
PVRLayerChild* CreateVRLayer(uint32_t aDisplayID,
|
||||
nsISerialEventTarget* aTarget, uint32_t aGroup);
|
||||
|
||||
static void IdentifyTextureHost(
|
||||
const layers::TextureFactoryIdentifier& aIdentifier);
|
||||
|
Loading…
Reference in New Issue
Block a user