Граф коммитов

27 Коммитов

Автор SHA1 Сообщение Дата
Jamie Nicol a9dd0d2943 Bug 1741156 - Initial GPU process implementation on Android. r=aosmond,agi
Declare a GPU process and corresponding Service in the
AndroidManifest. This is of a new class GeckoServiceGpuProcess which
inherits from GeckoServiceChildProcess, and provides a binder
interface ICompositorSurfaceManager which allows the parent process to
set the compositor Surface for a given widget ID, and the compositor
in the GPU process to look up the Surface for a widget ID. The
ICompositorSurfaceManager interface is exposed to the parent process
through a new method getCompositorSurfaceManager() in the
IChildProcess interface.

Add a new connection type for GPU processes to GeckoProcessManager,
along with a function to look up the GPU process connection and fetch
the ICompositorSurfaceManager binder. When the GPU process is launched
we store the returned binder in the GPUProcessHost, and when each
widget's compositor is created we store a reference to the binder in
the UiCompositorControllerChild.

Each nsWindow is given a unique ID, and whenever the Surface changes
due to an Android resume event, it sends the new surface for that ID
to the GPU process (if enabled) by calling
ICompositorSurfaceManager.onSurfaceChanged().

Stop inheriting AndroidCompositorWidget from InProcessCompositorWidget
and instead inherit from CompositorWidget directly. This class holds a
reference to the Surface that will be rendered in to. The
CompositorBridgeParent notifies the CompositorWidget whenever it has
been resumed, allowing it to fetch the new Surface. For the
cross-process CompositorWidgetParent implementation it fetches that
Surface from the CompositorSurfaceManagerService, whereas the
InProcessAndroidCompositorWidget can read it directly from the real
widget.

AndroidCompositorWidget::GetClientSize() can now calculate its size
from the Surface, rather than racily reading the value from the
nsWindow. This means RenderCompositorEGL and RenderCompositorOGLSWGL
can now use GetClientSize() again rather than querying their own size
from the Surface.

With this patch, setting layers.gpu-process.enabled to true will cause
us to launch a GPU process and render from it. We do not yet
gracefully recover from a GPU process crash, nor can we render
anything using SurfaceTextures (eg video or webgl). Those will come in
future patches.

Differential Revision: https://phabricator.services.mozilla.com/D131231
2021-11-29 20:52:31 +00:00
Andrew Osmond 195b6f4fbd Bug 1707610 - Make GPU process restart criteria depend on rendering frames and uptime. r=jrmuizel
Originally, we would restart the GPU process a fixed number of attempts
based on the layers.gpu-process.max_restarts pref. With this patch, we
now use this pref to control how many "unstable" restarts we allow. A
restart is "stable" if and only if the process uptime exceeds the pref
layers.gpu-process.stable.min-uptime-ts and if the process renders a
total number of frames exceeding the pref
layers.gpu-process.stable.frame-threshold. This allows users to keep the
GPU process for a lot longer if they are encountering infrequent
crashes. Should the user experience the GPU process crashing quickly
and/or without rendering many frames, we will disable it as before after
a few attempts and move into the parent process.

Differential Revision: https://phabricator.services.mozilla.com/D114531
2021-05-06 19:47:38 +00:00
Jean-Yves Avenard 935f64f3bb Bug 1550422 - P2. add shared pref serializer/deserializer to GPU process. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D30587

--HG--
extra : moz-landing-system : lando
2019-05-26 02:33:12 +00:00
Gurzau Raul 967bc2a754 Backed out 31 changesets (bug 1552643, bug 1550422) for xpcshell crash on a CLOSED TREE.
Backed out changeset e30c1aa75529 (bug 1552643)
Backed out changeset caadcd7e02d3 (bug 1552643)
Backed out changeset aa7086ab09be (bug 1552643)
Backed out changeset 0b4029671710 (bug 1550422)
Backed out changeset a16295296035 (bug 1550422)
Backed out changeset 3b70307c0db5 (bug 1550422)
Backed out changeset 69df7818d4a3 (bug 1550422)
Backed out changeset d98dfc565927 (bug 1550422)
Backed out changeset 6f0997976944 (bug 1550422)
Backed out changeset 0edd264464c2 (bug 1550422)
Backed out changeset 9ea6da7a74ec (bug 1550422)
Backed out changeset f855f9309c8b (bug 1550422)
Backed out changeset 1033546224a7 (bug 1550422)
Backed out changeset ade7384c6186 (bug 1550422)
Backed out changeset 75b04de7e99c (bug 1550422)
Backed out changeset 91c3acdb2454 (bug 1550422)
Backed out changeset 77d2f80257d1 (bug 1550422)
Backed out changeset e0cd10d35327 (bug 1550422)
Backed out changeset 097091082423 (bug 1550422)
Backed out changeset 2f328853c1ab (bug 1550422)
Backed out changeset f92f2cc29cb1 (bug 1550422)
Backed out changeset 6dc82f88333d (bug 1550422)
Backed out changeset c20f66494d69 (bug 1550422)
Backed out changeset 2ba22cddeb6f (bug 1550422)
Backed out changeset 3aa72f89e295 (bug 1550422)
Backed out changeset ab4c4e806977 (bug 1550422)
Backed out changeset 72e5de040dda (bug 1550422)
Backed out changeset 7d3c2d486706 (bug 1550422)
Backed out changeset 132e0b8d8468 (bug 1550422)
Backed out changeset 54c85ac75dd0 (bug 1550422)
Backed out changeset d7ba4a18dd54 (bug 1550422)
2019-05-25 09:07:49 +03:00
Jean-Yves Avenard 8f7ae177ac Bug 1550422 - P2. add shared pref serializer/deserializer to GPU process. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D30587

--HG--
extra : moz-landing-system : lando
2019-05-23 04:13:05 +00:00
Gurzau Raul 74c555539e Backed out 28 changesets (bug 1550422) for marionette AssertionError and failing browser_policy_hardware_acceleration.js on a CLOSED TREE.
Backed out changeset 5dd10a365ba9 (bug 1550422)
Backed out changeset 529f5be01ab9 (bug 1550422)
Backed out changeset b6861d3badf8 (bug 1550422)
Backed out changeset 059cff1a3dde (bug 1550422)
Backed out changeset 6ada1116b241 (bug 1550422)
Backed out changeset ca67e8e45262 (bug 1550422)
Backed out changeset a1961a51ae44 (bug 1550422)
Backed out changeset 1c90b9cb3ad4 (bug 1550422)
Backed out changeset 285fa46e4f26 (bug 1550422)
Backed out changeset e2938a444234 (bug 1550422)
Backed out changeset 7a930fc51125 (bug 1550422)
Backed out changeset 898ed02804fe (bug 1550422)
Backed out changeset e1b7abc99ae9 (bug 1550422)
Backed out changeset f781d415cef6 (bug 1550422)
Backed out changeset 2fef10a7cce5 (bug 1550422)
Backed out changeset ea64b4d8d4ff (bug 1550422)
Backed out changeset 86a8ba1b755c (bug 1550422)
Backed out changeset 9c0c9e80f309 (bug 1550422)
Backed out changeset 10c153ddbaea (bug 1550422)
Backed out changeset 60fe635ec2c9 (bug 1550422)
Backed out changeset a38796266b28 (bug 1550422)
Backed out changeset 2db647dcdf1c (bug 1550422)
Backed out changeset 952ddac02972 (bug 1550422)
Backed out changeset ba46b53643ec (bug 1550422)
Backed out changeset ca47ef6c59f7 (bug 1550422)
Backed out changeset f45f471a1a40 (bug 1550422)
Backed out changeset 371b4da5b771 (bug 1550422)
Backed out changeset 02fc78890032 (bug 1550422)
2019-05-23 05:59:44 +03:00
Jean-Yves Avenard f21aa87190 Bug 1550422 - P2. add shared pref serializer/deserializer to GPU process. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D30587

--HG--
extra : moz-landing-system : lando
2019-05-22 13:05:09 +00:00
Jed Davis bcff2dd108 Bug 1487287 - Synchronize GeckoChildProcessHost destruction with launching. r=mccr8
In order to enable asynchronous launch, destruction of
GeckoChildProcessHost (and its subclasses) has to be delayed until after
launching (or anything else that might be made asynchronous in the
future) has completed, to prevent use-after-free.  However, there are
other dependencies on process hosts always being destroyed on the I/O
thread, so refcounting would be difficult to use.

Instead, GeckoChildProcessHost now may not be destroyed directly, but
must go through a method that handles the scheduling.

There are also some minor cleanups to the affected headers (removed
duplicate access modifiers, and made PluginProcessParent final).

Depends on D18010

Differential Revision: https://phabricator.services.mozilla.com/D18011

--HG--
extra : moz-landing-system : lando
2019-02-05 00:15:20 +00:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Stephen A Pohl 8d4b0ba4b7 Bug 1366808: Start passing parentBuildID to GPU process to detect buildID mismatches. r=jimm 2018-05-08 10:31:52 -04:00
Alex Gaynor 59aea7c021 Bug 1445958 - fixed a method name name in a comment; r=jrmuizel
MozReview-Commit-ID: DHvy0cufcXt

--HG--
extra : rebase_source : 025125a18f561f6fa4359eb49af29147d1d5900f
2018-03-15 10:31:28 -04:00
Daniel Holbert 126bd9e1a4 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

--HG--
extra : rebase_source : c6162fa3cf539a07177a19838324bf368faa162b
2017-10-27 16:10:06 -07:00
Masayuki Nakano d6e921676c Bug 1377672 - part3: IMEStateManager::NotifyIME() should ignore notifications and requests which comes from unexpected process r=m_kato,smaug
IME should receive notifications and requests only from proper process.  E.g., IME shouldn't commit composition by a request which came from previous focused process.

This patch makes that IMEStateManager::NotifyIME() takes pointer to TabParent optionally.  If the request or notification came from remote process, it should be non-nullptr.  Then, this makes it ignore notifications and requests from unexpected process.

Note that this patch also touches some gfx headers because they use |ipc::| but compiler is confused at the ambiguousness between |mozilla::ipc::| and |mozilla::dom::ipc::|.

Finally, this patch changes the NS_ASSERTION in IMEHandler::OnDestroyWindow() to MOZ_ASSERT because the orange caused by the NS_ASSERTION was not realized since there was already an intermittent orange bug caused by different NS_ASSERTION.

MozReview-Commit-ID: 9CgKXQRJWmN

--HG--
extra : source : f3b5711908870c5e0e852a399a07e0ae721a12f1
2017-07-06 00:47:40 +09:00
domfarolino@gmail.com d4253766db Bug 1274663 - Expose API to trigger device reset. r=dvander
--HG--
extra : rebase_source : 5a9d2757f8e7378083ce42131d5a250027569814
2017-06-15 14:34:00 -04:00
Nathan Froyd 2ebbd09068 Bug 1320752 - remove mozilla/Function.h; r=gerald
We have std::function available now, which is likely to be somewhat more
efficient.
2016-11-28 11:03:53 -05:00
Ryan Hunt 8ee59ed7da Bug 1313199 - Sync a device reset from GPU process to main process. r=dvander
--HG--
extra : rebase_source : 4daf0427fee802cd986d7439c0e27eddbf671311
2016-11-06 13:01:52 -06:00
George Wright 51a59d1d02 Bug 1314426 - Add a method to nsIDOMWindowUtils to terminate the GPU process and get the GPU process pid r=smaug,dvander 2016-11-07 14:22:48 -05:00
George Wright 119e15b6b3 Bug 1297790 - Add telemetry probes for GPU process launch/launch-time/abort r=dvander
MozReview-Commit-ID: LgrdMOSZn8J
2016-10-20 11:33:40 -04:00
Wes Kocher 78f5a63960 Backed out changeset 0a1486cf11b2 (bug 1297790) for browser_UsageTelemetry_content_aboutHome.js failures a=backout CLOSED TREE
--HG--
extra : rebase_source : 8d082316cd6603b1c5f1e8408249b77afe271a7d
2016-10-28 15:44:51 -07:00
George Wright 809a0bbfbb Bug 1297790 - Add telemetry probes for GPU process launch/launch-time/abort r=dvander 2016-10-28 16:21:08 -04:00
David Anderson 1fc0d80f24 Don't call Close twice when the GPU process unexpectedly terminates. (bug 1282348 part 6, r=billm) 2016-07-17 21:24:28 -07:00
David Anderson adf653992b Allow top-level protocols the ability to notify GPUProcessManager when their actors are unexpectedly destroyed. (bug 1282348 part 4, r=billm) 2016-07-17 21:24:28 -07:00
David Anderson ebb01e928a Implement GPU process shutdown. (bug 1271180 part 5, r=billm)
--HG--
extra : rebase_source : 13e7c4274e3948e13096baf3bf4e48000d3f8864
2016-06-10 22:37:03 -04:00
David Anderson d3bb5cb316 Add skeletal code for launching a GPU process. (bug 1271180 part 4, r=billm,jrmuizel)
--HG--
extra : rebase_source : 456e4b94a93191f85d90209459c5189ea165670d
2016-06-10 22:27:24 -04:00
Phil Ringnalda 5e0adb7d56 Back out 5 changesets (bug 1271180) for static analysis bustage
CLOSED TREE

Backed out changeset cfb53b780b18 (bug 1271180)
Backed out changeset 204b084385f8 (bug 1271180)
Backed out changeset 353da876be33 (bug 1271180)
Backed out changeset 4472dfbc1dc6 (bug 1271180)
Backed out changeset 81079e787b8a (bug 1271180)

--HG--
rename : ipc/glue/TaskFactory.h => dom/plugins/ipc/TaskFactory.h
2016-06-11 00:46:09 -07:00
David Anderson a6676c7cfb Implement GPU process shutdown. (bug 1271180 part 5, r=billm)
--HG--
extra : rebase_source : c00e110f584ac056cc4e7918b833d6c6dbd79007
2016-06-10 22:37:03 -04:00
David Anderson d2678d4141 Add skeletal code for launching a GPU process. (bug 1271180 part 4, r=billm,jrmuizel)
--HG--
extra : rebase_source : 332f5cf6ca5e1f78fb2283a7e79b6b21654e9e59
2016-06-10 22:27:24 -04:00