Closed Bug 1212288 Opened 9 years ago Closed 9 years ago

Make ImageContainer::AllocateProducerID callable on all threads

Categories

(Core :: Audio/Video: Playback, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla44
Tracking Status
firefox44 --- fixed

People

(Reporter: kikuo, Unassigned)

References

Details

Attachments

(1 file)

According to Bug 1194918 Comment 39, 40, 43, to make AllocateProducerID() callable on all threads can make it used more widely.
Not clear which component the bug should belong to ...
Bug 1212288 - Make ImageContainer::AllocateProducerID callable on all threads; r?roc
Attachment #8671155 - Flags: review?(roc)
Comment on attachment 8671155 [details] MozReview Request: Bug 1212288 - Make ImageContainer::AllocateProducerID callable on all threads; r=roc. https://reviewboard.mozilla.org/r/21547/#review19369
Attachment #8671155 - Flags: review?(roc) → review+
(In reply to Robert O'Callahan (:roc) (Mozilla Corporation) from comment #3) > Comment on attachment 8671155 [details] > MozReview Request: Bug 1212288 - Make ImageContainer::AllocateProducerID > callable on all threads; r?roc > > https://reviewboard.mozilla.org/r/21547/#review19369 Thanks for review.
https://reviewboard.mozilla.org/r/21547/#review19371 ::: gfx/layers/ImageContainer.cpp:676 (Diff revision 1) > -static ImageContainer::ProducerID sProducerID = 0; > +static Atomic<ImageContainer::ProducerID> sProducerID(0u); Is the constructor of Atomic trivial enough for the compiler not to emit a static initializer? Not sure if this guideline is still relevant? https://developer.mozilla.org/en-US/docs/Mozilla/C%2B%2B_Portability_Guide#Don't_use_static_constructors
I'm not sure if the compiler bug mentioned in guideline still happens nowadays. I can apply Construct on first use idiom here.
Comment on attachment 8671155 [details] MozReview Request: Bug 1212288 - Make ImageContainer::AllocateProducerID callable on all threads; r=roc. Bug 1212288 - Make ImageContainer::AllocateProducerID callable on all threads; r=roc. Construct the static variable on first use to avoid this potential issue mentioned here https://developer.mozilla.org/en-US/docs/Mozilla/C%2B%2B_Portability_Guide#Don%27t_use_static_constructors
Attachment #8671155 - Attachment description: MozReview Request: Bug 1212288 - Make ImageContainer::AllocateProducerID callable on all threads; r?roc → MozReview Request: Bug 1212288 - Make ImageContainer::AllocateProducerID callable on all threads; r=roc.
Attachment #8671155 - Flags: review+ → review?(roc)
Comment on attachment 8671155 [details] MozReview Request: Bug 1212288 - Make ImageContainer::AllocateProducerID callable on all threads; r=roc. https://reviewboard.mozilla.org/r/21547/#review19373
https://treeherder.mozilla.org/#/jobs?repo=try&revision=895689c4e5ea Don't know why the task queue for windows platform is getting so long ... but the results on all other platforms look just fine. https://treeherder.mozilla.org/#/jobs?repo=try&revision=db193b0893a1
Keywords: checkin-needed
Blocks: 1194918
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: