Closed
Bug 1302918
Opened 8 years ago
Closed 8 years ago
Switch to using PTexture for sharing textures between OOP video and the compositor.
Categories
(Core :: Audio/Video: Playback, defect)
Core
Audio/Video: Playback
Tracking
()
RESOLVED
FIXED
mozilla52
Tracking | Status | |
---|---|---|
firefox51 | --- | fix-optional |
firefox52 | --- | fixed |
People
(Reporter: mattwoodrow, Assigned: mattwoodrow)
References
Details
Attachments
(2 files)
(deleted),
patch
|
dvander
:
review+
nical
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
nical
:
review+
|
Details | Diff | Splinter Review |
As discussed in bug 1288618, we don't want to share layers::Image directly with the compositor. We should instead create a new protocol for sharing PTexture (VideoBridge?) and share the textures that way.
Assignee | ||
Comment 1•8 years ago
|
||
Assignee: nobody → matt.woodrow
Attachment #8792703 -
Flags: review?(dvander)
Assignee | ||
Updated•8 years ago
|
Attachment #8792703 -
Flags: review?(nical.bugzilla)
Comment on attachment 8792703 [details] [diff] [review] Add PVideoBridge to share textures with the compositor Review of attachment 8792703 [details] [diff] [review]: ----------------------------------------------------------------- r=me w/ comments addressed ::: dom/media/ipc/VideoDecoderParent.cpp @@ +177,5 @@ > data->mDuration, > data->mFrames, > data->mKeyframe), > video->mDisplay, > + texture ? self->mParent->StoreImage(texture) : SurfaceDescriptorGPUVideo(0), |texture| is used unconditionally above, so can it really be null here? ::: gfx/layers/ipc/VideoBridgeChild.cpp @@ +14,5 @@ > + > +/* static */ void > +VideoBridgeChild::Startup() > +{ > + sVideoBridgeChildSingleton = new VideoBridgeChild(); Is there any way to assert that this happens on a specific thread? @@ +38,5 @@ > +} > + > +VideoBridgeChild::~VideoBridgeChild() > +{ > + sVideoBridgeChildSingleton = nullptr; sVideoBridgeChildSingleton holds a ref to this. Is this line supposed to be in Shutdown? ::: gfx/layers/ipc/VideoBridgeParent.cpp @@ +45,5 @@ > +VideoBridgeParent::ActorDestroy(ActorDestroyReason aWhy) > +{ > + // Can't alloc/dealloc shmems from now on. > + mClosed = true; > + mSelfRef = nullptr; Better to do this mSelfRef = nullptr in DeallocPVideoBridgeParent. Just for consistency with other protocols where it's necessary. @@ +113,5 @@ > + > +void > +VideoBridgeParent::NotifyNotUsed(PTextureParent* aTexture, uint64_t aTransactionId) > +{ > + RefPtr<TextureHost> texture = TextureHost::AsTextureHost(aTexture); Can you assert this happens on the IPDL thread? Usually these "Actor to C++ Owner" casts are inherently racy, so we want to make sure they're being used correctly. @@ +123,5 @@ > + !texture->NeedsFenceHandle()) { > + return; > + } > + > + MOZ_ASSERT(false, "Async messages not supported"); Should this be MOZ_ASSERT_UNREACHABLE?
Attachment #8792703 -
Flags: review?(dvander) → review+
Updated•8 years ago
|
Attachment #8792703 -
Flags: review?(nical.bugzilla) → review+
Updated•8 years ago
|
Attachment #8792704 -
Flags: review?(nical.bugzilla) → review+
Pushed by mwoodrow@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/2b4457a0428b Add PVideoBridge to share textures with the compositor. r=dvander,nical https://hg.mozilla.org/integration/mozilla-inbound/rev/aeb3209d58fe Remove old Compositor sharing code. r=nical
Comment 6•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/2b4457a0428b https://hg.mozilla.org/mozilla-central/rev/aeb3209d58fe
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox52:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
Comment 7•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/2b4457a0428b https://hg.mozilla.org/mozilla-central/rev/aeb3209d58fe
Comment 9•8 years ago
|
||
Mark 51 as fix-optional. If it's worth uplift to 51, feel free to nominate it.
Updated•8 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•