Remove the use of mMutex from VideoFrameContainer::InvalidateWithFlags()

RESOLVED FIXED in Firefox 56

Status

()

enhancement
P3
normal
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: jwwang, Assigned: jwwang)

Tracking

unspecified
mozilla56
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox56 fixed)

Details

Attachments

(2 attachments)

Assignee

Description

2 years ago
See bug 1361622 comment 3. It is possible for SetCurrentFrames() to hold the lock for more than 1 sec. In order to prevent the main thread from being blocked by another thread in acquiring the lock, I will remove the use of mMutex from InvalidateWithFlags().

There are 3 members which will be accessed by multiple threads:
1. mImageSizeChanged
2. mIntrinsicSizeChanged
3. mIntrinsicSize

We need a way to synchronize the access without using mMutex.
Assignee

Updated

2 years ago
Assignee: nobody → jwwang
Blocks: 1361622
Priority: -- → P3
Comment hidden (mozreview-request)
Assignee

Updated

2 years ago
Attachment #8882118 - Flags: review?(cpearce)
Attachment #8882119 - Flags: review?(cpearce)

Comment 3

2 years ago
mozreview-review
Comment on attachment 8882118 [details]
Bug 1377025. P1 - dispatch image size changes to the main thread so mImageSizeChanged is for main thread only.

https://reviewboard.mozilla.org/r/153232/#review158494
Attachment #8882118 - Flags: review?(cpearce) → review+

Comment 4

2 years ago
mozreview-review
Comment on attachment 8882119 [details]
Bug 1377025. P2 - dispatch intrinsic size changes to the main thread.

https://reviewboard.mozilla.org/r/153234/#review158496
Attachment #8882119 - Flags: review?(cpearce) → review+
Assignee

Comment 5

2 years ago
Thanks!

Comment 6

2 years ago
Pushed by jwwang@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c1b4b68e161a
P1 - dispatch image size changes to the main thread so mImageSizeChanged is for main thread only. r=cpearce
https://hg.mozilla.org/integration/autoland/rev/1d14a426b9af
P2 - dispatch intrinsic size changes to the main thread. r=cpearce

Comment 7

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/c1b4b68e161a
https://hg.mozilla.org/mozilla-central/rev/1d14a426b9af
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in before you can comment on or make changes to this bug.