Closed
Bug 1274149
Opened 9 years ago
Closed 9 years ago
Restrict main-thread access to CompositorBridgeParent
Categories
(Core :: Graphics, defect)
Core
Graphics
Tracking
()
RESOLVED
FIXED
mozilla49
Tracking | Status | |
---|---|---|
firefox49 | --- | fixed |
People
(Reporter: dvander, Assigned: dvander)
References
(Blocks 1 open bug)
Details
Attachments
(5 files)
11.84 KB,
patch
|
mattwoodrow
:
review+
|
Details | Diff | Splinter Review |
10.97 KB,
patch
|
kats
:
review+
|
Details | Diff | Splinter Review |
2.60 KB,
patch
|
mattwoodrow
:
review+
|
Details | Diff | Splinter Review |
8.03 KB,
patch
|
mattwoodrow
:
review+
|
Details | Diff | Splinter Review |
10.66 KB,
patch
|
mattwoodrow
:
review+
|
Details | Diff | Splinter Review |
With out-of-process compositing, callers on the main thread won't be able to access CompositorBridgeParent directly, since it might live in the GPU process. I'm proposing a new GPUProcessManager class to provide these functions instead. Initially, it'll just wrap CompositorBridgeParent, but we'll try to ensure that no new direct callers appear.
GPUProcessManager will later be responsible for launching the GPU process and maintaining state that has to migrate from out-of-process to in-process, or vice versa, in the event of a device reset or crash.
![]() |
Assignee | |
Comment 1•9 years ago
|
||
Skeleton class, with CompositorSession instantiation moved over.
Attachment #8754215 -
Flags: review?(matt.woodrow)
![]() |
Assignee | |
Comment 2•9 years ago
|
||
Make GetAPZCTreeManager private, move calls to GPUProcessManager.
I changed the CBP version to return already_AddRefed since it wasn't clear how threadsafe it is to return the bare pointer.
Attachment #8754223 -
Flags: review?(bugmail.mozilla)
Comment 3•9 years ago
|
||
Comment on attachment 8754215 [details] [diff] [review]
part 1, GPUProcessManager
Review of attachment 8754215 [details] [diff] [review]:
-----------------------------------------------------------------
::: gfx/ipc/GPUProcessManager.h
@@ +20,5 @@
> +namespace gfx {
> +
> +// The GPUProcessManager is a singleton responsible for creating GPU-bound
> +// objects that may live in another process. Currently, it provides access
> +// to the compositor via CompositorBridgeParent.
CompositorSession?
Attachment #8754215 -
Flags: review?(matt.woodrow) → review+
![]() |
Assignee | |
Comment 4•9 years ago
|
||
Attachment #8754242 -
Flags: review?(matt.woodrow)
![]() |
Assignee | |
Comment 5•9 years ago
|
||
Attachment #8754243 -
Flags: review?(matt.woodrow)
![]() |
Assignee | |
Comment 6•9 years ago
|
||
Attachment #8754245 -
Flags: review?(matt.woodrow)
![]() |
Assignee | |
Comment 7•9 years ago
|
||
(In reply to David Anderson [:dvander] from comment #0)
> With out-of-process compositing, callers on the main thread won't be able to
> access CompositorBridgeParent directly, since it might live in the GPU
> process. I'm proposing a new GPUProcessManager class to provide these
> functions instead. Initially, it'll just wrap CompositorBridgeParent, but
> we'll try to ensure that no new direct callers appear.
>
> GPUProcessManager will later be responsible for launching the GPU process
> and maintaining state that has to migrate from out-of-process to in-process,
> or vice versa, in the event of a device reset or crash.
Follow-up note: this state includes layers ID allocation (which will have to move to the GPUProcessManager) as well as observers, content controllers, and possibly the APZ input queue. When compositing has to migrate from out-of-process to in-process, GPUProcessManager will have to ensure the new compositor begins with this state.
Comment 8•9 years ago
|
||
Comment on attachment 8754215 [details] [diff] [review]
part 1, GPUProcessManager
Review of attachment 8754215 [details] [diff] [review]:
-----------------------------------------------------------------
::: gfx/ipc/GPUProcessManager.h
@@ +29,5 @@
> + static void Shutdown();
> + static GPUProcessManager* Get();
> +
> + GPUProcessManager();
> + ~GPUProcessManager();
The constructor should probably be protected or private, if this is a singleton
Updated•9 years ago
|
Attachment #8754223 -
Flags: review?(bugmail.mozilla) → review+
Updated•9 years ago
|
Attachment #8754242 -
Flags: review?(matt.woodrow) → review+
Updated•9 years ago
|
Attachment #8754243 -
Flags: review?(matt.woodrow) → review+
Updated•9 years ago
|
Attachment #8754245 -
Flags: review?(matt.woodrow) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/a22a53c503a6
https://hg.mozilla.org/integration/mozilla-inbound/rev/9932689ab717
https://hg.mozilla.org/integration/mozilla-inbound/rev/057223823e5d
https://hg.mozilla.org/integration/mozilla-inbound/rev/540cb6d10745
https://hg.mozilla.org/integration/mozilla-inbound/rev/1117598ac875
I backed this out because it seems like the most likely cause of frequent intermittent failures like https://treeherder.mozilla.org/logviewer.html#?job_id=28431370&repo=mozilla-inbound
https://hg.mozilla.org/integration/mozilla-inbound/rev/3b45aeb5288a
Flags: needinfo?(dvander)
Looking further back, this failure seems to have started prior to this landing. I think you should be good to reland this once the tree reopens.
Comment 12•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/e667524c874d
https://hg.mozilla.org/integration/mozilla-inbound/rev/b3ff484f408a
https://hg.mozilla.org/integration/mozilla-inbound/rev/082be8ab538c
https://hg.mozilla.org/integration/mozilla-inbound/rev/bca90b6efa44
https://hg.mozilla.org/integration/mozilla-inbound/rev/49fbf8516de9
Comment 13•9 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/e667524c874d
https://hg.mozilla.org/mozilla-central/rev/b3ff484f408a
https://hg.mozilla.org/mozilla-central/rev/082be8ab538c
https://hg.mozilla.org/mozilla-central/rev/bca90b6efa44
https://hg.mozilla.org/mozilla-central/rev/49fbf8516de9
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox49:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
![]() |
Assignee | |
Updated•9 years ago
|
Flags: needinfo?(dvander)
You need to log in
before you can comment on or make changes to this bug.
Description
•