Commit graph

357 commits

Author SHA1 Message Date
Cosmin Sabou
51d88504d1 Backed out changeset 6dc11fc546e1 (bug 1716579) for causing bug 1900193. a=backout 2024-06-02 00:37:28 +03:00
Nicolas Silva
c9937f3764 Bug 1716579 - Minimize memory usage of windows that haven't been rendered for a long time. r=gfx-reviewers,bradwerth
Differential Revision: https://phabricator.services.mozilla.com/D117918
2024-05-31 07:09:27 +00:00
sotaro
2be68ff00a Bug 1879425 - Log GPU device reset to gfx Failure Log of about:support r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D209926
2024-05-14 10:50:23 +00:00
Stanca Serban
dcd1e2c3f0 Backed out changeset 1c48635919fb (bug 1879425) for causing build bustages. CLOSED TREE 2024-05-14 04:55:08 +03:00
sotaro
e18a85127f Bug 1879425 - Log GPU device reset to gfx Failure Log of about:support r=gfx-reviewers,lsalzman
Unify how to log device reset. It helps for debugging.

Differential Revision: https://phabricator.services.mozilla.com/D209926
2024-05-14 00:46:12 +00:00
Timothy Nikkel
14802dd199 Bug 1838350. Add test for animated images in minimized window leaking. r=layout-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D207111
2024-04-22 09:33:04 +00:00
Mike Hommey
c70ca80cfd Bug 1884836 - Base graphics support for iOS. r=gfx-reviewers,bradwerth
Original work by Nika Layzell and Ted Mielczarek.

Of note:
- GLdouble and GLclampd are not defined in the iPhoneOS SDK opengl
  headers.
- GL_CONTEXT_PROVIDER_DEFAULT was defined too early for
  GLContextProviderEAGL to be used as intended.
- GLContextProviderEAGL::CreateForCompositorWidget was aligned with
  GLContextProviderCGL::CreateForCompositorWidget. There is a ton of
  overlap between both, but sharing more code was left out of scope.
- MacIOSurface::BindTexImage and
  SurfacePoolCA::LockedPool::GetFramebufferForSurface were left
  unimplemented.
- RootSnapshotter is disabled.

Differential Revision: https://phabricator.services.mozilla.com/D204323
2024-03-15 01:28:27 +00:00
Stanca Serban
25baf2ac1a Backed out 2 changesets (bug 1884836) for causing mochitests failures in test_2_conformance__textures__misc__texture-corner-case-videos.html. CLOSED TREE
Backed out changeset 56bbc2a419e8 (bug 1884836)
Backed out changeset cc464f6e2cfb (bug 1884836)
2024-03-15 01:59:29 +02:00
Mike Hommey
a58d54f79b Bug 1884836 - Base graphics support for iOS. r=gfx-reviewers,bradwerth
Original work by Nika Layzell and Ted Mielczarek.

Of note:
- GLdouble and GLclampd are not defined in the iPhoneOS SDK opengl
  headers.
- GL_CONTEXT_PROVIDER_DEFAULT was defined too early for
  GLContextProviderEAGL to be used as intended.
- GLContextProviderEAGL::CreateForCompositorWidget was aligned with
  GLContextProviderCGL::CreateForCompositorWidget. There is a ton of
  overlap between both, but sharing more code was left out of scope.
- MacIOSurface::BindTexImage and
  SurfacePoolCA::LockedPool::GetFramebufferForSurface were left
  unimplemented.
- RootSnapshotter is disabled.

Differential Revision: https://phabricator.services.mozilla.com/D204323
2024-03-14 20:56:50 +00:00
Gabriele Svelto
aa43fa218e Bug 1831092 - Use the new pull-based API for all crash annotations and remove the global annotations table r=jgilbert,necko-reviewers,media-playback-reviewers,profiler-reviewers,win-reviewers,padenot,handyman,afranchuk,valentin,alwu,sotaro
This changes comes with several different refactorings all rolled into one,
unfotunately I couldn't find a way to pull them apart:
- First of all annotations now can either recorded (that is, we copy the value
  and have the crash reporting code own the copy) or registered. Several
  annotations are changed to use this functionality so that we don't need to
  update them as their value change.
- The code in the exception handler is modified to read the annotations from
  the mozannotation_client crate. This has the unfortunate side-effect that
  we need three different bits of code to serialize them: one for annotations
  read from a child process, one for reading annotations from the main process
  outside of the exception handler and one for reading annotations from the
  main process within the exception handler. As we move to fully
  out-of-process crash reporting the last two methods will go away.
- The mozannotation_client crate now doesn't record annotation types anymore.
  I realized as I was working on this that storing types at runtime has two
  issues: the first one is that buggy code might change the type of an
  annotation (that is record it under two different types at two different
  moments), the second issue is that types might become corrupt during a
  crash, so better enforce them at annotation-writing time. The end result is
  that the mozannotation_* crates now only store byte buffers, track the
  format the data is stored in (null-terminated string, fixed size buffer,
  etc...) but not the type of data each annotation is supposed to contain.
- Which brings us to the next change: concrete types for annotations are now
  enforced when they're written out. If an annotation doesn't match the
  expected type it's skipped. Storing an annotation with the wrong type will
  also trigger an assertion in debug builds.

Differential Revision: https://phabricator.services.mozilla.com/D195248
2024-03-04 10:24:43 +00:00
sotaro
b41ff7d6db Bug 1851736 - Enable NVIDIA RTX Video Super Resolution for video overlay on Windows only during power charge r=gfx-reviewers,ahale
Super Resolution consumes more power. Then it is better to enable it only during power charging.

Differential Revision: https://phabricator.services.mozilla.com/D202781
2024-03-01 04:00:59 +00:00
Perry McManis
4a0a5a0c84 Bug 1875170 - Migrate metrics in the gfx namespace collected via GeckoView Streaming to pure glean r=chutten,gfx-reviewers,jnicol
GVST is how these probes sent data in Fenix and is now unnecessary (and doesn't send data in Fenix release) since Firefox Desktop has direct access to Glean. We therefore need to clean them up in some capacity.

Following the recommendations from the GeckoView Streaming (GVST) validation effort, this is a pure Glean api implementation of the metrics that fell under gfx and its subcategories in geckoview streaming.

Each metric retains its previous name, and gains a Glean Interface for FireFox Telemetry (GIFFT) version, such that downstream data analyses will not be impacted.

Differential Revision: https://phabricator.services.mozilla.com/D198872
2024-02-02 13:36:35 +00:00
Lee Salzman
d3c07773f4 Bug 1829026 - Don't force sync for async-present if GL not thread-safe. r=aosmond
If GL is not thread-safe, then the check for whether we use the canvas render thread
is not accurate. The thread-safe check takes precedence, and if we are not thread-safe,
we are actually on the render thread. It should be safe to not force sync here since
we aren't actually on the compositor thread at all.

Differential Revision: https://phabricator.services.mozilla.com/D196864
2023-12-19 20:44:27 +00:00
Randell Jesup
1106898e06 Bug 1869666 - webrender thread-safety annotations r=gfx-reviewers,nical
Differential Revision: https://phabricator.services.mozilla.com/D196242
2023-12-13 15:09:01 +00:00
Lee Salzman
07bd8cdfc5 Bug 1764300 - Don't assert when unregistering render textures during shutdown. r=sotaro
The one reason a surface can be in the SharedSurfacesParent table and not registerd is
because it was registered during shutdown. In this case, we shouldn't be asserting anyway
if something just tries to unregister it thereafter.

Differential Revision: https://phabricator.services.mozilla.com/D196139
2023-12-12 07:55:26 +00:00
Perry McManis
ee063b7b37 Bug 1867048 - Remove temporary GVSV data collections r=TravisLong
Differential Revision: https://phabricator.services.mozilla.com/D194882
2023-12-11 15:10:40 +00:00
Perry McManis
d91169cb8a Bug 1858954 - Add some metrics for validating geckoview streaming collection against direct glean collection r=chutten,gfx-reviewers,media-playback-reviewers,jrmuizel,padenot
In an effort to understand if data collected via the Geckoview Streaming
API differs materially from that collected in Glean, we will implement
some temporary data collections that cover the existing use cases of the
former.

Differential Revision: https://phabricator.services.mozilla.com/D191119
2023-10-26 12:35:55 +00:00
stransky
be6d95b423 Bug 1833855 [Linux] Build dmabuf support on Linux/Gtk and don't request Wayland for it r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D178634
2023-06-22 13:42:38 +00:00
Cristian Tuns
ac8a8744d7 Backed out 14 changesets (bug 1833855) for causing build bustages in DMABufSurface.cpp CLOSED TREE
Backed out changeset b8daeb03b670 (bug 1833855)
Backed out changeset cc17af8bae3d (bug 1833855)
Backed out changeset 2d4f6b8ad5d3 (bug 1833855)
Backed out changeset 3b75e59357bb (bug 1833855)
Backed out changeset 86948033f163 (bug 1833855)
Backed out changeset 3e6387b95e39 (bug 1833855)
Backed out changeset 7f22e082786c (bug 1833855)
Backed out changeset 9d5ae056d3c8 (bug 1833855)
Backed out changeset b0a7ca2dfbd6 (bug 1833855)
Backed out changeset ac0947e6e601 (bug 1833855)
Backed out changeset a058367a436a (bug 1833855)
Backed out changeset 7b4da292159c (bug 1833855)
Backed out changeset d50ae530998d (bug 1833855)
Backed out changeset 895b93846598 (bug 1833855)
2023-06-22 08:05:40 -04:00
stransky
8753e5afaf Bug 1833855 [Linux] Build dmabuf support on Linux/Gtk and don't request Wayland for it r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D178634
2023-06-22 11:17:23 +00:00
Cristian Tuns
684fec2fef Backed out 14 changesets (bug 1833855) for causing build bustages in SharedSurface.cpp CLOSED TREE
Backed out changeset c3f7d1963902 (bug 1833855)
Backed out changeset 347c47f5542a (bug 1833855)
Backed out changeset 2c0807d0b39a (bug 1833855)
Backed out changeset 013d1d16194d (bug 1833855)
Backed out changeset 2e49d43a627c (bug 1833855)
Backed out changeset ea21e90a71dd (bug 1833855)
Backed out changeset 8d5d0690668c (bug 1833855)
Backed out changeset 4eb11068275d (bug 1833855)
Backed out changeset 15120d9c5b24 (bug 1833855)
Backed out changeset b75750bb7596 (bug 1833855)
Backed out changeset 6f94e3f002ed (bug 1833855)
Backed out changeset 3235825211f9 (bug 1833855)
Backed out changeset 47a6e9ed8828 (bug 1833855)
Backed out changeset b8013c43aa20 (bug 1833855)
2023-06-22 05:29:12 -04:00
stransky
a5e8bfe6b4 Bug 1833855 [Linux] Build dmabuf support on Linux/Gtk and don't request Wayland for it r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D178634
2023-06-22 08:35:56 +00:00
sotaro
f9510e15d5 Bug 1834948 - Remove PendingFrameInfo::mFrameNeedsRender r=gfx-reviewers,lsalzman
PendingFrameInfo::mFrameNeedsRender is no longer needed. It was originally added for document splitting by Bug 1441308 and modified by Bug 1570869.

Differential Revision: https://phabricator.services.mozilla.com/D179032
2023-05-25 08:57:27 +00:00
sotaro
62a86ac73d Bug 1828088 - Handle wait of async RemoteTexture at WebRenderAPI r=gfx-reviewers,lsalzman
In current m-c, async RemoteTexture wait at RenderThread stops window update when the wait is too long. If async RemoteTexture is handled by WebRenderAPI, window could be updated during long async RemoteTexture wait.

async RemoteTexture wait of root WebRenderBridgeParent are disabled to simplify WebRenderAPI's wait handling.

offscreen canvas case is handled by WebRenderImageHost by Bug 1827578.

Differential Revision: https://phabricator.services.mozilla.com/D175590
2023-04-18 20:38:20 +00:00
sotaro
df6f2ba3e7 Bug 1827578 - Async wait remote texture ready of offscreen canvas at WebRenderImageHost r=gfx-reviewers,lsalzman
It should be OK to wait remote texture ready of offscreen canvas at WebRenderImageHost. Offscreen canvas uses ImageBridge. And ImageBridge works asynchronously.

WebRenderImageHost::UseRemoteTexture() is split to WebRenderImageHost::PushPendingRemoteTexture() and WebRenderImageHost::UseRemoteTexture(). It is for handling RemoteTexture ready callback in WebRenderImageHost.

Differential Revision: https://phabricator.services.mozilla.com/D175226
2023-04-13 21:38:24 +00:00
sotaro
8c971ce95e Bug 1826280 - Add RemoteTexture async waiting capability r=gfx-reviewers,lsalzman
RenderThread::PushPendingRemoteTexture() notifies pending RemoteTextures to RenderThread. And RemoteTextureMap::CheckRemoteTextureReady() is used for checking if a RemoteTexture is ready. If the RemoteTexture is not ready during the function call, callback will be called when the RemoteTexture becomes ready.

RemoteTextureMap::GetExternalImageIdOfRemoteTextureSync() is changed to RemoteTextureMap::GetExternalImageIdOfRemoteTexture() and wait of RemoteTexture ready in the function is removed. The wait of RemoteTexture ready is done by the callback of the CheckRemoteTextureReady().

Differential Revision: https://phabricator.services.mozilla.com/D174732
2023-04-06 05:27:08 +00:00
sotaro
8576364e3e Bug 1826204 - Refactor RenderThread's RenderNotifier event handling r=gfx-reviewers,lsalzman
Refactor RenderThread's RenderNotifier event handling for Bug 1804233.

Bug 1804233 is going to add deferring processing of RenderNotifier events if RemoteTexture is not ready. For handling it, RenderNotifier events are processed by using WrNotifierEvent queue.

Differential Revision: https://phabricator.services.mozilla.com/D174524
2023-04-03 22:57:56 +00:00
Kelsey Gilbert
58bc15010f Bug 1804368 - Add webgl.forbid-software/forbid-hardware on Mac. r=gfx-reviewers,lsalzman
I would prefer to leave "this doesn't work on linux/windows/android as open bugs to be handled later.

Differential Revision: https://phabricator.services.mozilla.com/D164016
2023-04-03 21:25:41 +00:00
sotaro
33159b53db Bug 1824309 - Add FramePublishId to new_frame_ready() to add a way to control the processing of ResultMsg messages r=gfx-reviewers,lsalzman
It is a preparation for Bug 1804233. From bug 1776885 comment 6, we need to defer WebRender rendering on render thread if remote texture is not ready. To do it, ResultMsg messages handling needs to be controlled.

By adding the followings, ResultMsg messages handling could be controlled by RenderThread.
-  FramePublishId to new_frame_ready()
-  Renderer::set_target_frame_publish_id()

new_frame_ready() has frame_publish_id. The publish_id could be set to Renderer::set_target_frame_publish_id(). Then Renderer::update() defers processing of ResultMsg, if frame_publish_id of ResultMsg::PublishDocument exceeds target_frame_publish_id.

Differential Revision: https://phabricator.services.mozilla.com/D173512
2023-04-01 05:14:10 +00:00
sotaro
b0f638846b Bug 1823844 - Add error log to RenderThread::Start() r=gfx-reviewers,aosmond
Differential Revision: https://phabricator.services.mozilla.com/D173246
2023-03-23 00:34:52 +00:00
sotaro
9ca40310af Bug 1823352 - A little code cleanup in RenderThread r=gfx-reviewers,aosmond
Preparation for Bug 1804233

Differential Revision: https://phabricator.services.mozilla.com/D172981
2023-03-21 00:24:27 +00:00
sotaro
b2f1baf7c4 Bug 1812498 - Destroy RenderBufferTextureHosts that use VideoBridgeParent's Shmems in VideoBridgeParent::OnChannelError() r=lsalzman
Destroy RenderBufferTextureHosts that use VideoBridgeParent's Shmems before destroying all VideoBridgeParent's Shmems by PVideoBridgeParent::OnChannelError().

Differential Revision: https://phabricator.services.mozilla.com/D169796
2023-03-17 00:35:03 +00:00
sotaro
5abd63997f Bug 1822459 - Use UniquePtr in mWindowInfos r=gfx-reviewers,ErichDonGubler
With UniquePtr, RenderThread::RemoveRenderer() becomes simpler.

Differential Revision: https://phabricator.services.mozilla.com/D172644
2023-03-16 00:59:19 +00:00
Chris Martin
b42c4425d0 Bug 1816559 - Remote compositor recording from GPU process r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D170514
2023-03-14 13:31:37 +00:00
Lee Salzman
646e8918c1 Bug 1777849 - Disable FEATURE_THREADSAFE_GL on X11 and GLX. r=gfx-reviewers,ahale,aosmond
LibX11 versions prior to 1.7 have a race condition that made it unsafe to use
in multiple threads. Since Firefox 104, we created a CanvasRender thread that
is used to service WebGL commands off the Renderer thread so that WebGL does
not block WebRender. If WebGL uses GLX, this can lead us to using GLX on the
two different threads. In combination with an unsafe version of libX11, this
can lead to severe instability.

Further evidence points to the fact that the fix in 1.7 may have caused further
crashes that were not resolved until 1.7.4. Yet other reports indicate other
drivers than Mesa may still have issues even after 1.7.4. Ultimately, there
may be no safe version of libX11 to use right now.

However, GLX, which uses libX11, is considered legacy at this point, with many
users transitioning to EGL instead. It seems reasonable to not allow GLX to be
used from multiple threads at all, unless overridden by a pref, to work around
this.

We already have a FEATURE_THREADSAFE_GL in place to denote this, which was
currently used mainly for Nouveau which is also unsafe to use on multiple
threads. If this feature fails, the CanvasRender thread is not used, and
all WebGL commands go back to being on the Renderer thread as normal, avoiding
the problem.

A further snag is that recent ANGLE updates required a larger CanvasRenderer
thread stack size to avoid exhausting the stack. This patch uncovers the fact
that the Renderer and Compositor threads did not similarly have their stack
sizes adjusted in case WebGL is running on those threads instead.

Differential Revision: https://phabricator.services.mozilla.com/D170992
2023-02-25 22:49:51 +00:00
Stanca Serban
ebf9b1f7bd Backed out changeset 42afa6604694 (bug 1777849) for causing build bustages in RenderThread.cpp. CLOSED TREE 2023-02-26 00:42:52 +02:00
Lee Salzman
ada52201da Bug 1777849 - Disable FEATURE_THREADSAFE_GL on X11 and GLX. r=gfx-reviewers,ahale,aosmond
LibX11 versions prior to 1.7 have a race condition that made it unsafe to use
in multiple threads. Since Firefox 104, we created a CanvasRender thread that
is used to service WebGL commands off the Renderer thread so that WebGL does
not block WebRender. If WebGL uses GLX, this can lead us to using GLX on the
two different threads. In combination with an unsafe version of libX11, this
can lead to severe instability.

Further evidence points to the fact that the fix in 1.7 may have caused further
crashes that were not resolved until 1.7.4. Yet other reports indicate other
drivers than Mesa may still have issues even after 1.7.4. Ultimately, there
may be no safe version of libX11 to use right now.

However, GLX, which uses libX11, is considered legacy at this point, with many
users transitioning to EGL instead. It seems reasonable to not allow GLX to be
used from multiple threads at all, unless overridden by a pref, to work around
this.

We already have a FEATURE_THREADSAFE_GL in place to denote this, which was
currently used mainly for Nouveau which is also unsafe to use on multiple
threads. If this feature fails, the CanvasRender thread is not used, and
all WebGL commands go back to being on the Renderer thread as normal, avoiding
the problem.

A further snag is that recent ANGLE updates required a larger CanvasRenderer
thread stack size to avoid exhausting the stack. This patch uncovers the fact
that the Renderer and Compositor threads did not similarly have their stack
sizes adjusted in case WebGL is running on those threads instead.

Differential Revision: https://phabricator.services.mozilla.com/D170992
2023-02-25 22:20:50 +00:00
Erich Gubler
d6a6a3a83d Bug 1753349 (4/9): refactor: rename CreateEGLPBufferOffscreenContext to CreateWithoutSurface r=jgilbert
This was interesting enough that @jgilbert wanted this, so I'm including this for completeness in
the current patch stack.

Split out from @jgilbert's D164308.

Differential Revision: https://phabricator.services.mozilla.com/D166709
2023-01-19 04:47:52 +00:00
Erich Gubler
5ae49e0bf7 Bug 1753349 (2/9): refactor: inline size argument to GLContextEGL::CreateEGLPBufferOffscreenContext r=jgilbert
This is basically an implementation detail that the existing callers doesn't really need to know.
Factor it out.

Split out from @jgilbert's D164308.

Differential Revision: https://phabricator.services.mozilla.com/D166707
2023-01-19 04:47:51 +00:00
Stanca Serban
cee760ed88 Backed out 9 changesets (bug 1753349) for causing failures in PoolAlloc.cpp. CLOSED TREE
Backed out changeset 84a5f26fe60b (bug 1753349)
Backed out changeset 28e0175becf4 (bug 1753349)
Backed out changeset 0ffcaedc8046 (bug 1753349)
Backed out changeset 2043cc15deec (bug 1753349)
Backed out changeset 556557955d59 (bug 1753349)
Backed out changeset cbb9e6545343 (bug 1753349)
Backed out changeset bed90cd9beb6 (bug 1753349)
Backed out changeset 1b71f995ae95 (bug 1753349)
Backed out changeset 1ad75c8ea7a4 (bug 1753349)
2023-01-18 23:58:22 +02:00
Erich Gubler
d420b3bbab Bug 1753349 (4/9): refactor: rename CreateEGLPBufferOffscreenContext to CreateWithoutSurface r=jgilbert
This was interesting enough that @jgilbert wanted this, so I'm including this for completeness in
the current patch stack.

Split out from @jgilbert's D164308.

Differential Revision: https://phabricator.services.mozilla.com/D166709
2023-01-18 20:56:10 +00:00
Erich Gubler
80acad2332 Bug 1753349 (2/9): refactor: inline size argument to GLContextEGL::CreateEGLPBufferOffscreenContext r=jgilbert
This is basically an implementation detail that the existing callers doesn't really need to know.
Factor it out.

Split out from @jgilbert's D164308.

Differential Revision: https://phabricator.services.mozilla.com/D166707
2023-01-18 20:56:09 +00:00
sotaro
954c16acec Bug 1805209 - Use RemoteTexture for WebGPU r=gfx-reviewers,lsalzman
WebGPU uses CompositableInProcessManager to push TextureHost directly from WebGPUParent to WebRender. But CompositableInProcessManager plumbing has a problem and caused Bug 1805209.

gecko already has a similar mechanism, called RemoteTextureMap. It is used in oop WebGL. If WebGPU uses RemoteTextureMap instead of CompositableInProcessManager, both WebGPU and oop WebGL use same mechanism.

WebGPUParent pushes a new texture to RemoteTextureMap. The RemoteTextureMap notifies the pushed texture to WebRenderImageHost.

Before the change, only one TextureHost is used for one swap chain. With the change, multiple TextureHosts are used for one swap chain with recycling.

The changes are followings.

- Use RemoteTextureMap instead of CompositableInProcessManager.
- Use RemoteTextureOwnerId instead of CompositableHandle.
- Use WebRenderCanvasData instead of WebRenderInProcessImageData.
- Add remote texture pushed callback functionality to RemoteTextureMap. With it, RemoteTextureMap notifies a new pushed remote texture to WebRenderImageHost.
- Remove CompositableInProcessManager.

Differential Revision: https://phabricator.services.mozilla.com/D164890
2022-12-23 20:41:02 +00:00
Nicolas Silva
e716fc4f7b Bug 1797975 - Replace wr_notifier_nop_frame_done with an argument in new_frame_ready. r=gfx-reviewers,bradwerth
it started as a single method new_frame_ready with a composite parameter, to be split into two functions that end up calling the same HandleFrameOneDoc with a composite parameter so the extra function doesn't provide anything.

Differential Revision: https://phabricator.services.mozilla.com/D162299
2022-11-21 14:10:29 +00:00
Nicolas Silva
ed0908ee88 Bug 1797975 - Simplify the pending frame count tracking code. r=gfx-reviewers,bradwerth
Only transactions that contain the generate_frame flag are tracked by the pending frame and frame build counters.
This patch attempts to make this clearer with two small adjustments:

Firstly by putting the IncPendingFrameCount call right next to Transaction::GenerateFrame.

Secondly, undoing the hack in wr_notifier_wake_up. The latter is called outside of normal rendered/tracked frames and was calling HandleFrameOneDoc which decrements the rendered frame counter. To compensate it had to manually increment both counters via IncPendingFrameCount and manually decrement the built frame counter via DecPendingFrameBuildCount. Instead this patch introduces the aTrackedFrame argument so that HandleFrameOneDoc only fiddles with the counters when needed and wake_up does not have to hack around it.

Differential Revision: https://phabricator.services.mozilla.com/D162298
2022-11-21 14:10:29 +00:00
Nicolas Silva
af16db6234 Bug 1797975 - Remove outdated comments about mIsRendering. r=gfx-reviewers,bradwerth
mIsRendering does not appear to exist (anymore).

Differential Revision: https://phabricator.services.mozilla.com/D162296
2022-11-21 14:10:28 +00:00
Nicolas Silva
5a18024f2b Bug 1797975 - Rename CompositeIfNeeded into RetrySkippedComposite. r=gfx-reviewers,bradwerth
The previous name could have related to any situation where a composite is needed such as when animating or receiving transactions, but the function is actually specifically about scheduling a new composite if the previous one was skipped.

Differential Revision: https://phabricator.services.mozilla.com/D162295
2022-11-21 14:10:28 +00:00
Nicolas Silva
6352b3770e Bug 1797975 - Simplify the compositor throttling logic. r=gfx-reviewers,bradwerth
- Ensure that the pending frame count is decremented by HandleFrameOneDoc even after some of the rare early-outs.
- Always check TooManyPendingFrames in CompositeToTarget.

It is unclear that these will actually catch (all of) the extraneous skipped frames. If anything, the simplification will make further investigation easier.

Differential Revision: https://phabricator.services.mozilla.com/D162294
2022-11-21 14:10:27 +00:00
Jens Stutte
91630e2b39 Bug 1798630 - Use nsThread::Shutdown for the RenderThread. r=gfx-reviewers,sotaro
Differential Revision: https://phabricator.services.mozilla.com/D161026
2022-11-04 08:17:04 +00:00
Emilio Cobos Álvarez
42b7f1a58c Bug 1780788 - Use abstract strings as in-arguments for ipdl. r=nika,necko-reviewers,media-playback-reviewers,alwu,dragana
This prevents copies and avoids the hack we have to avoid this, which
right now is using nsDependent{C,}String.

Non-virtual actors can still use `nsString` if they need to on the
receiving end.

Differential Revision: https://phabricator.services.mozilla.com/D152519
2022-07-25 20:19:48 +00:00