Commit Graph
38 Commits
Author SHA1 Message Date
Jamie Nicol 8e99051731 Bug 2028516 - Ensure WebRenderLayerManager's mWrChild cannot be null. r=gfx-reviewers,lsalzman
Future patches to make WebRenderLayerManager able to be initialised
asynchronously will be made simpler if we can rely on mWrChild always
being non-null. This patch achieves this by moving the first part of
Initialize(), which creates the WebRenderBridgeChild, to a static
Create() function, which then passes the non-null WebRenderBridgeChild
to the constructor. Some existing but now redundant null checks are
removed.

Unfortunately there is a chicken or egg problem, as
WebRenderLayerManager::Create() requires a pointer to the
CompositorBridgeChild, but the CompositorBridgeChild is created by the
CompositorSession which requires the WebRenderLayerManager in order to
call CompositorBridgeChild::InitForWidget().

To solve this we remove the WebRenderLayerManager argument from
CompositorBridgeChild::InitForWidget(), and instead have the widget
call the function CompositorBridgeChild::CreateLayerManager() to
obtain the layer manager.

Differential Revision: https://phabricator.services.mozilla.com/D291522
2026-04-02 11:49:01 +00:00
Sylvestre Ledru e1fe74e9e3 Bug 2023419 - Remove Emacs/Vim modelines from gfx/ r=emilio
replaced by .editorconfig
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D287846
2026-03-16 12:52:50 +00:00
Andrew Osmond efd1b5b9f2 Bug 2006934 - Revert bug 2001152 due to instability when failing start the GPU process. r=ipc-reviewers,gfx-reviewers,mccr8,jnicol
This was causing infinite loops during fallback, eventually resulting
in an OOM crash.

Differential Revision: https://phabricator.services.mozilla.com/D277221
2025-12-19 21:06:20 +00:00
Jamie Nicol be434283b5 Bug 2001152 - Initialize UiCompositorController along with rest of CompositorSession. r=aosmond
Instead of doing it just afterwards. The motivation for this is to
provide access to the CompositorBridgeChild when initializing the
UiCompositorController, which will be required by the next patch in
the series.

This should have no effect in the successful case. In case of failure,
however, it will now take the OnProcessUnexpectedShutdown() path and
perhaps retry creating the GPU process, rather than just immediately
disabling it. This brings it in line with how we handle failure to
create the session's other actors.

Differential Revision: https://phabricator.services.mozilla.com/D273238
2025-11-24 16:00:07 +00:00
Cristina Horotan f37ec715c2 Revert "Bug 2001152 - Make PCompositorBridge::Initialize async. r=aosmond,ipc-reviewers,mccr8" for causing build bustage at RefPtr.h
This reverts commit c19fcf010e.

Revert "Bug 2001152 - Initialize UiCompositorController along with rest of CompositorSession. r=aosmond"

This reverts commit cbe021867d.
2025-11-24 11:55:12 +00:00
Jamie Nicol cbe021867d Bug 2001152 - Initialize UiCompositorController along with rest of CompositorSession. r=aosmond
Instead of doing it just afterwards. The motivation for this is to
provide access to the CompositorBridgeChild when initializing the
UiCompositorController, which will be required by the next patch in
the series.

This should have no effect in the successful case. In case of failure,
however, it will now take the OnProcessUnexpectedShutdown() path and
perhaps retry creating the GPU process, rather than just immediately
disabling it. This brings it in line with how we handle failure to
create the session's other actors.

Differential Revision: https://phabricator.services.mozilla.com/D273238
2025-11-24 10:13:00 +00:00
Emilio Cobos Álvarez cc2759f7e5 Bug 1994157 - Remove nsBaseWidget. r=stransky,win-reviewers,gstoll
The distinction between nsBaseWidget and nsIWidget is useless as all our
implementations use the former.

So just merge both.

Differential Revision: https://phabricator.services.mozilla.com/D268518
2025-10-14 15:19:51 +00:00
Brad Werth a6bd37ab75 Bug 1874740: Make callers to NotifyCompositorSessionLost hold a reference to widget. r=gfx-reviewers,jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D199035
2024-01-23 19:27:26 +00:00
Florian Quèze 00a5ee33d8 Bug 1757202 - Make the inner window id of the browser window available in the compositor bridge, r=mstange.
Differential Revision: https://phabricator.services.mozilla.com/D139730
2022-03-11 07:49:04 +00:00
sotaro 2e0687fa7d Bug 1751425 - Add more pointer check around CompositorSession shutdown r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D136621
2022-01-23 23:42:42 +00:00
Matt Woodrow 0f8591792b Bug 1727682 - Make WebRenderLayerManager not inherit LayerManager. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D124433
2021-09-05 22:36:45 +00:00
Botond Ballo 97449edf59 Bug 1627482 - Fix non-unified build errors in gfx/ipc. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D69732
2020-04-05 03:50:33 +00:00
sotaro 5bd32fa610 Bug 1533296 - Make WebRender error as to Fallback to Compositor rendering during disabling WebRender on android r=nical
On android, android's nsWindow creates LayerManaer only in nsWindow::Create(). When WebRender error happened, gecko just stopped rendering by disabling Webrender.
The nsWindow needs to re-create LayerManager during disabling Webrender. Further, during disabling WebRender, All GeckoSurfaceTextures should not be attached to GLContext. It is for preventing a conflict with AttachToGLContext() call in SurfaceTextureHost::EnsureAttached().

Differential Revision: https://phabricator.services.mozilla.com/D26687
2019-06-19 16:14:56 +00:00
Ryan Hunt f8c3615a4c Bug 1523969 part 8 - Move method definition inline comments to new line in 'gfx/'. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D21108
2019-02-25 16:07:19 -06:00
Sylvestre Ledru e5a134f73a Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset
2018-11-30 11:46:48 +01:00
Kartikaya Gupta 5df2dfffc9 Bug 1448490 - Make the layers id a struct instead of a uint64_t. r=mattwoodrow
The new struct is in LayersTypes.h, all the rest of the changes are just
replacing existing uint64_t instances with the new LayersId struct.

Note that there is one functional change, in
CompositorBridgeParent::DeallocPWebRenderBridgeParent, where we now
correctly convert the PipelineId to a LayersId before using it to index
into sIndirectLayerTrees, whereas before we were incorrectly just using
the mHandle part of the PipelineId.

MozReview-Commit-ID: GFHZSZiwMrP
2018-03-24 19:06:01 -04:00
Kartikaya Gupta 4c45bb80fa Bug 1441916 - Modify the static GetAPZCTreeManager to return an IAPZCTreeManager. r=botond
This static function has only two call sites. One (in GPUProcessManager)
is unused, so it can be removed. The other (in
InProcessCompositorSession) takes the returned APZCTreeManager and
exposes it as an IAPZCTreeManager. Instead of doing this, we can simply
expose it as an IAPZCTreeManager from CompositorBridgeParent itself, to
reduce the number of places that can potentially grab a handle to the
APZCTreeManager.

MozReview-Commit-ID: BjLf6GSsnKz
2018-03-01 23:00:41 -05:00
Daniel Holbert bb0a8b6602 Bug 1412427 part 8: (automated patch) Switch a bunch of C++ files in gfx to use our standard mode lines. r=jrmuizel
This patch was generated automatically by the "modeline.py" script, available
here: https://github.com/amccreight/moz-source-tools/blob/master/modeline.py

For every file that is modified in this patch, the changes are as follows:
 (1) The patch changes the file to use the exact C++ mode lines from the
     Mozilla coding style guide, available here:
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style#Mode_Line

 (2) The patch deletes any blank lines between the mode line & the MPL
     boilerplate comment.

 (3) If the file previously had the mode lines and MPL boilerplate in a
     single contiguous C++ comment, then the patch splits them into
     separate C++ comments, to match the boilerplate in the coding style.

MozReview-Commit-ID: 77D61xpSmIl
2017-10-27 16:10:06 -07:00
Randall Barker 9aa1bb3583 Bug 1392705 - part 1: Make UiCompositorControllerChild::Destroy synchronous r=dvander
Ensure the UiCompositorControllerChild is shutdown in the UI thread
before the compositor thread is shutdown by the main thread.

MozReview-Commit-ID: 4hXYxSi9tzz
2017-08-31 14:26:46 -07:00
[email protected] a74b51da54 Bug 1274663 - Expose API to trigger device reset. r=dvander 2017-06-15 14:34:00 -04:00
Andrew Osmond 66e7a78a27 Bug 1365927 - Part 4. Replace PCompositorBridge integration hooks with PCompositorManager. r=dvander 2017-06-14 11:39:59 -04:00
Wes Kocher 7d69f7ff18 Backed out 6 changesets (bug 1365927) for build failures in ipc_message_utils.h a=backout CLOSED TREE
Backed out changeset 11fc0da380a2 (bug 1365927)
Backed out changeset 9f1dee5a6c42 (bug 1365927)
Backed out changeset f4954c824f5c (bug 1365927)
Backed out changeset 144ac6cc76f8 (bug 1365927)
Backed out changeset 961e782cf7c7 (bug 1365927)
Backed out changeset 12a093fb86a4 (bug 1365927)

MozReview-Commit-ID: 6CDxqOJzMjE
2017-06-13 12:45:03 -07:00
Andrew Osmond f6a5543ec0 Bug 1365927 - Part 4. Replace PCompositorBridge integration hooks with PCompositorManager. r=dvander 2017-06-13 15:19:36 -04:00
David Anderson 0e9068641f Remove old device reset and compositor swapping code. (bug 1363126 part 3, r=rhunt) 2017-05-11 22:44:28 -07:00
Randall Barker c955f482b1 Bug 1335895 - Android GeckoView Dynamic Toolbar Version 3 r=botond,dvander,jchen,kats
This version of the Dynamic Toolbar moves the animation of the toolbar
from the Android UI thread to the compositor thread. All animation for
showing and hiding the toolbar are done with the compositor and a static
snapshot of the real toolbar.

MozReview-Commit-ID: BCe8zpbkWQt
2017-04-20 15:15:14 -07:00
sotaro 111d213410 Bug 1356190 - Fix GetNextExternalImageId() r=jrmuizel 2017-04-14 17:06:09 +09:00
Kartikaya Gupta 6813d1843d Bug 1330037 - Propagate the CompositorOptions to all CompositorWidget instances. r=dvander
MozReview-Commit-ID: DFeeo2WNmhZ
2017-01-12 17:29:42 -05:00
Kartikaya Gupta e3df5ca2fe Bug 1330037 - Introduce a CompositorOptions struct that holds options on a per-compositor basis. r=dvander
MozReview-Commit-ID: Kja7zpCDmp3
2017-01-12 17:29:41 -05:00
David Anderson 0757ad84ef Don't reset devices for each tab when the compositor resets. (bug 1316788, r=rhunt) 2016-11-14 11:47:01 -08:00
Carsten "Tomcat" Book a3d6de70fa merge mozilla-inbound to mozilla-central a=merge 2016-11-09 16:38:04 +01:00
Kartikaya Gupta 281dba6afe Bug 1315974 - Have the CompositorBridgeChild take a LayerManager instead of a ClientLayerManager. r=dvander
MozReview-Commit-ID: CPTCQgIl5ad
2016-11-08 10:42:19 -05:00
Ryan Hunt b0f2285ebd Bug 1313199 - Allow sending reset compositor messages over IPDl. r=dvander 2016-11-06 12:56:53 -06:00
Ryan Hunt 025a9afbc9 Bug 1298245 - Hook up creation of OOP APZ for main process. r=dvander
MozReview-Commit-ID: 2Ujw28K2COJ
2016-08-29 09:18:00 -04:00
Ryan Hunt c9a4056474 Bug 1281575 - Extract interface of APZCTreeManager for moving to GPUProcess. r=kats
MozReview-Commit-ID: 7tO2kkTNFk2
2016-07-20 13:37:00 +02:00
Carsten "Tomcat" Book a8c9d4892a Backed out changeset 3119db384fcc (bug 1281575) for bustage 2016-07-21 06:26:58 +02:00
Ryan Hunt c3d4a9136d Bug 1281575 - Extract interface of APZCTreeManager for moving to GPUProcess. r=kats 2016-07-20 13:37:00 +02:00
David Anderson 377c102448 Move layers ID allocation to GPUProcessManager. (bug 1282348 part 3, r=mattwoodrow) 2016-07-17 21:24:27 -07:00
David Anderson 9780db7bca Split InProcessCompositorBridge to its own file. (bug 1282348 part 2, r=mattwoodrow) 2016-07-17 21:24:27 -07:00