Closed Bug 825002 Opened 7 years ago Closed 7 years ago

We should not start compositor thread if it is already started.

Categories

(Core :: Graphics, defect)

x86_64
Linux
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla20

People

(Reporter: romaxa, Assigned: romaxa)

References

Details

Attachments

(1 file, 1 obsolete file)

In OMTC embedding I do created compositor loop using StartUpWithExistingThread
And later one more compositor thread is created 
https://mxr.mozilla.org/mozilla-central/source/gfx/thebes/gfxPlatform.cpp#294
And there is no check for existing compositor thread.
I use pref or MOZ_USE_OMTC in order to trigger useOffMainThreadCompositing = true and run ImageBridgeChild::StartUp.. but together with that it is starting CompositorThread which I don't need.
so I guess it make sense to check for existing thread using CompositorParent::CompositorLoop() API.
Assignee: nobody → romaxa
Attachment #696064 - Flags: review?(nsilva)
Comment on attachment 696064 [details] [diff] [review]
Check for compositor loop before calling StartUp

Review of attachment 696064 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good. Just one remark, not critically important but I'd rather have this checked in CompositorParent::Startup and CompositorParent::StartupWithExistingThread like ImageBridge does. Because when looking at this code the first reflex is to think that this case is handled for CompositorParent and not for ImageBridge. Or check for ImageBridgeChild::IsCreated in gfxPlatform.cpp instead of StartupWithExistingThread if you prefer.
Attachment #696064 - Attachment is obsolete: true
Attachment #696064 - Flags: review?(nsilva)
Attachment #696525 - Flags: review?(nical.bugzilla)
Comment on attachment 696525 [details] [diff] [review]
Check if compositor thread already started

Review of attachment 696525 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks
Attachment #696525 - Flags: review?(nical.bugzilla) → review+
https://hg.mozilla.org/mozilla-central/rev/a2113a30dfcc
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
You need to log in before you can comment on or make changes to this bug.