Commit Graph

736 Commits

Author SHA1 Message Date
Olli Pettay
b9786d5d3e Bug 1754562, make parent process' idle detection be aware of active RefreshDrivers in the other processes, r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D138504
2022-02-26 22:37:03 +00:00
criss
06f4fe1b55 Backed out changeset 39bd7bdd12be (bug 1754562) for causing multiple failures. CLOSED TREE 2022-02-25 13:40:50 +02:00
Olli Pettay
e5d862393e Bug 1754562, make parent process' idle detection be aware of active RefreshDrivers in the other processes, r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D138504
2022-02-25 10:13:16 +00:00
Noemi Erli
4a40d84af8 Backed out changeset 8739b71b8bd9 (bug 1740499) as requested by smaug 2022-01-20 22:21:32 +02:00
Olli Pettay
7b5b7f81b2 Bug 1740499, don't unsuppress so aggressively r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D134915
2022-01-17 11:16:26 +00:00
Florian Quèze
2fc5fb47dc Bug 1748466 - Make ShouldKeepTimerRunningWhileWaitingForFirstContentfulPaint return early for initial about:blank documents, r=smaug.
Differential Revision: https://phabricator.services.mozilla.com/D135691
2022-01-12 11:04:47 +00:00
Emilio Cobos Álvarez
46b109b130 Bug 1745869 - Grant 1s of activity to hidden OOPIF iframes. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D134804
2022-01-02 12:39:38 +00:00
Narcis Beleuzu
bc32f340e2 Backed out 2 changesets (bug 1745869) for bc failures on browser_hidden_iframe.js . CLOSED TREE
Backed out changeset e2dd2ff842fa (bug 1745869)
Backed out changeset 0d2bf1bbda4f (bug 1745869)
2021-12-31 00:27:32 +02:00
Emilio Cobos Álvarez
2538fedfc8 Bug 1745869 - Grant 1s of activity to hidden OOPIF iframes. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D134804
2021-12-30 15:14:22 +00:00
Emilio Cobos Álvarez
99e31e6ae7 Bug 1746229 - Minor cleanups to the refresh driver. r=smaug
* Use early-return to avoid rightward drift.
 * Use static prefs where appropriate.
 * Remove dead warning code which is unlikely to be actively
   investigated right now (bug 1303369).

Differential Revision: https://phabricator.services.mozilla.com/D133925
2021-12-16 14:57:10 +00:00
Andrew Osmond
cabfab5e52 Bug 1738971 - Part 3. Rework VsyncChild to allow multiple implementations. r=gfx-reviewers,jgilbert
VsyncChild is main thread only, and we would like to reuse PVsync on the
worker threads via PBackgroundChild which already implements it. This
patch does the necessary refactoring to have multiple implementations of
PVsyncChild.

Differential Revision: https://phabricator.services.mozilla.com/D130264
2021-12-10 02:57:50 +00:00
Andrew Osmond
940dad5f39 Bug 1738971 - Part 1. Split out plumbing for AnimationFrameProvider from Document. r=dom-worker-reviewers,smaug
This patch splits out AnimationFrameProvider from the Document WebIDL to
allow the workers to implement it. It also splits out a helper class to
manage the requestAnimationFrame callbacks which may be reused on a
worker thread.

Differential Revision: https://phabricator.services.mozilla.com/D130262
2021-12-10 02:57:49 +00:00
Csoregi Natalia
77f4c3192d Backed out 17 changesets (bug 1738971, bug 1736177) for bp-hybrid failures and others. CLOSED TREE
Backed out changeset 828633114de2 (bug 1736177)
Backed out changeset 5be8557c4721 (bug 1736177)
Backed out changeset 49f8b4205a46 (bug 1736177)
Backed out changeset 2610d4464ad5 (bug 1736177)
Backed out changeset 6d6c78c31c28 (bug 1736177)
Backed out changeset d55f1ee88bb9 (bug 1736177)
Backed out changeset bf588f8ffcf1 (bug 1736177)
Backed out changeset 86f6f6d86c6c (bug 1736177)
Backed out changeset f400c75c5829 (bug 1736177)
Backed out changeset 4a34124d5f4e (bug 1736177)
Backed out changeset 70aff7fcd001 (bug 1736177)
Backed out changeset db2347ee8147 (bug 1736177)
Backed out changeset 3dde5ddb65e5 (bug 1738971)
Backed out changeset 894ba6b7b68f (bug 1738971)
Backed out changeset dc4503052cf1 (bug 1738971)
Backed out changeset d9aef3e9797e (bug 1738971)
Backed out changeset 562a1e8e5ac3 (bug 1738971)
2021-12-10 01:13:23 +02:00
Andrew Osmond
6c4cd0191f Bug 1738971 - Part 3. Rework VsyncChild to allow multiple implementations. r=gfx-reviewers,jgilbert
VsyncChild is main thread only, and we would like to reuse PVsync on the
worker threads via PBackgroundChild which already implements it. This
patch does the necessary refactoring to have multiple implementations of
PVsyncChild.

Differential Revision: https://phabricator.services.mozilla.com/D130264
2021-12-09 19:25:23 +00:00
Andrew Osmond
a163d1a55f Bug 1738971 - Part 1. Split out plumbing for AnimationFrameProvider from Document. r=dom-worker-reviewers,smaug
This patch splits out AnimationFrameProvider from the Document WebIDL to
allow the workers to implement it. It also splits out a helper class to
manage the requestAnimationFrame callbacks which may be reused on a
worker thread.

Differential Revision: https://phabricator.services.mozilla.com/D130262
2021-12-09 19:25:22 +00:00
Mike Hommey
b9b2736d16 Bug 1744877 - Remove --disable-xul. r=Gijs
Building with --disable-xul has been busted since _at least_ bug
1082579, for more than 7 years (I didn't try to track that down
further). It's time to recognize that the option serves no purpose.

Differential Revision: https://phabricator.services.mozilla.com/D133161
2021-12-08 21:37:11 +00:00
Gerald Squelart
8c94ff82ed Bug 1738627 - profiler_thread_is_being_profiled_for_markers - r=canaltinova
`profiler_thread_is_being_profiled` is used a lot for markers, so it makes sense to have a specialized version, which is a bit shorter, and lives in ProfilerMarkers.h.

Differential Revision: https://phabricator.services.mozilla.com/D130009
2021-11-08 23:59:35 +00:00
Cristian Tuns
839b72e1d3 Backed out 5 changesets (bug 1738627) for causing xpcshell failures on test_ext_geckoProfiler_schema.js CLOSED TREE
Backed out changeset 42d385d7da97 (bug 1738627)
Backed out changeset edeb3a338954 (bug 1738627)
Backed out changeset 98f02e35134d (bug 1738627)
Backed out changeset 711daa6dd24b (bug 1738627)
Backed out changeset 49e12753a40c (bug 1738627)
2021-11-05 05:12:28 -04:00
Gerald Squelart
019bfd575e Bug 1738627 - profiler_thread_is_being_profiled_for_markers - r=canaltinova
`profiler_thread_is_being_profiled` is used a lot for markers, so it makes sense to have a specialized version, which is a bit shorter, and lives in ProfilerMarkers.h.

Differential Revision: https://phabricator.services.mozilla.com/D130009
2021-11-05 05:52:28 +00:00
Florian Quèze
a0cf8d0638 Bug 1735484 - avoid crashing in nsRefreshDriver::RemoveImageRequest when mPresContext is null, r=emilio.
Differential Revision: https://phabricator.services.mozilla.com/D129506
2021-10-26 15:52:19 +00:00
Gerald Squelart
e52556d921 Bug 1735697 - Remove profiler_can_accept_markers(), use profiler_thread_is_being_profiled() instead - r=florian
Differential Revision: https://phabricator.services.mozilla.com/D128577
2021-10-18 23:11:30 +00:00
Hiroyuki Ikezoe
3d8e39d543 Bug 1730998 - Remove apz peek messages stuff. r=botond
This stuff is now a no-op because the RequestContentRepaint message has a
higher priority than vsync.

Depends on D127033

Differential Revision: https://phabricator.services.mozilla.com/D127593
2021-10-14 09:43:03 +00:00
Hiroyuki Ikezoe
c32127d1f0 Bug 1730998 - Bail out if the pres context was destroyed in an early runner. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D127030
2021-10-14 09:43:02 +00:00
Emilio Cobos Álvarez
cc9fcfbf0d Bug 560067 - Minor clean-up in the refresh driver image animation code. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D122116
2021-10-11 10:25:47 +00:00
Sandor Molnar
51cc896c91 Backed out 4 changesets (bug 1730998) for frequent Android gv-junit failures. CLOSED TREE
Backed out changeset 92641110e5c9 (bug 1730998)
Backed out changeset 7e496a4d1b55 (bug 1730998)
Backed out changeset 60d769e12932 (bug 1730998)
Backed out changeset 64a2b879aa79 (bug 1730998)
2021-10-06 16:43:50 +03:00
Hiroyuki Ikezoe
8e250ee9e5 Bug 1730998 - Remove apz peek messages stuff. r=botond
This stuff is now a no-op because the RequestContentRepaint message has a
higher priority than vsync.

Differential Revision: https://phabricator.services.mozilla.com/D127593
2021-10-06 01:07:37 +00:00
Hiroyuki Ikezoe
0a58ac2364 Bug 1730998 - Bail out if the pres context was destroyed in an early runner. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D127030
2021-10-06 01:07:35 +00:00
Daniel Holbert
ee57a1b379 Bug 1733727 part 1: Use smart pointers to manage lifetime of global variables in nsRefreshDriver.cpp. r=jfkthame
This patch doesn't change any user-observable behavior.

StaticAutoPtr lets us remove a handful of explicit 'delete' statements, by
making deletion happen automatically when these variables are cleared.

As part of this patch, I'm also converting one local variable to a smart
pointer (UniquePtr), since it takes ownership of data from one of the global
variables that I'm touching in ths patch, and we need to perform that
ownership-transfer without deleting the data (until we're done with it).

Differential Revision: https://phabricator.services.mozilla.com/D127335
2021-10-02 18:59:11 +00:00
Daniel Holbert
e3fcd438ab Bug 1733465 part 3: Make nsPresContext::GetRootWidget() return an already_AddRefed pointer instead of a raw pointer. r=tnikkel
Also, make the same change to nsPresContext::GetTextInputHandlingWidget and
TextComposition::GetWidget, which are essentially aliases/wrappers for this
function.

This patch shouldn't change behavior at all, aside from:
* optimizing away some redundant reference counting and widget-lookups
* delaying some nsIWidget::Release() calls, which will now happen after we're
  actually done using the object, instead of happening when the getter
  completes. (It's unlikely this impacts behavior, because there are other
  objects that are keeping the nsIWidget instance alive.)

Motivation / "wins" from this patch:
* nsPresContext::GetRootWidget already works with a refcounted pointer
  internally. Before this patch, it drops the reference before returning the
  pointer.  This is a bit suspect and would cause security issues, in the
  unlikely event that this were the last strong reference to the object.  It
  can just as easily/efficiently transfer the strong reference to the caller,
  and let the caller determine when to release it.
* Many of the callers were already storing the return value in nsCOMPtr, which
  meant that they were incurring an additional AddRef/Release when
  populating/destructing that smart pointer. Now they can just take ownership
  of the already_AddRefed return value and avoid redundnat refcount-churn.
* For the callers that weren't storing the return value in nsCOMPtr, some of
  them were calling this getter twice in a row (once to test for truthiness and
  once to use the known-truthy value).  This was wasteful, both from the
  repeated lookup-work (since the function isn't a trivial getter), and from
  repeated refcount-churn.  This patch collapses these repeat-calls to a single
  call, avoiding those inefficiencies.

Differential Revision: https://phabricator.services.mozilla.com/D127180
2021-10-01 20:38:10 +00:00
Sandor Molnar
cd907dc1bb Backed out 5 changesets (bug 1733465) for causing android build bustages in android/SessionAccessibility.cpp. CLOSED TREE
Backed out changeset 4c5b28b66740 (bug 1733465)
Backed out changeset 3db0452b185c (bug 1733465)
Backed out changeset d7460c9c6acb (bug 1733465)
Backed out changeset 3cee3f595e45 (bug 1733465)
Backed out changeset 267d5fc92f12 (bug 1733465)
2021-10-01 19:13:59 +03:00
Daniel Holbert
900fc1cf39 Bug 1733465 part 3: Make nsPresContext::GetRootWidget() return an already_AddRefed pointer instead of a raw pointer. r=tnikkel
Also, make the same change to nsPresContext::GetTextInputHandlingWidget and
TextComposition::GetWidget, which are essentially aliases/wrappers for this
function.

This patch shouldn't change behavior at all, aside from:
* optimizing away some redundant reference counting and widget-lookups
* delaying some nsIWidget::Release() calls, which will now happen after we're
  actually done using the object, instead of happening when the getter
  completes. (It's unlikely this impacts behavior, because there are other
  objects that are keeping the nsIWidget instance alive.)

Motivation / "wins" from this patch:
* nsPresContext::GetRootWidget already works with a refcounted pointer
  internally. Before this patch, it drops the reference before returning the
  pointer.  This is a bit suspect and would cause security issues, in the
  unlikely event that this were the last strong reference to the object.  It
  can just as easily/efficiently transfer the strong reference to the caller,
  and let the caller determine when to release it.
* Many of the callers were already storing the return value in nsCOMPtr, which
  meant that they were incurring an additional AddRef/Release when
  populating/destructing that smart pointer. Now they can just take ownership
  of the already_AddRefed return value and avoid redundnat refcount-churn.
* For the callers that weren't storing the return value in nsCOMPtr, some of
  them were calling this getter twice in a row (once to test for truthiness and
  once to use the known-truthy value).  This was wasteful, both from the
  repeated lookup-work (since the function isn't a trivial getter), and from
  repeated refcount-churn.  This patch collapses these repeat-calls to a single
  call, avoiding those inefficiencies.

Differential Revision: https://phabricator.services.mozilla.com/D127180
2021-10-01 14:37:06 +00:00
Daniel Holbert
040d0b4490 Bug 1712123: Don't do refresh-driver "catch-up" ticks until after pageload. r=smaug
The "catch-up" ticks are a strategy to make our repaint cycle more repsonsive
to user interaction, e.g. getting typed characters onto the screen sooner.
During pageload, this strategy isn't as crucial and may in fact harm the
overall pageload performance.  So, this patch makes us hold off on these ticks
until after the page has finished loading.

Differential Revision: https://phabricator.services.mozilla.com/D126850
2021-09-29 15:43:41 +00:00
Paul Bone
b404f1f90a Bug 1726712 - Provide nsRefreshDriver::IsRegularRateTimerTicking() r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D126753
2021-09-29 00:37:38 +00:00
criss
17b8040dd3 Backed out 2 changesets (bug 1727960) by dev request
Backed out changeset 14abef8826d0 (bug 1727960)
Backed out changeset 2817b34b999e (bug 1727960)
2021-09-28 02:27:39 +03:00
Matt Woodrow
8b80ec4fd2 Bug 1728914 - Move payload handling from LayerManger to WebRenderLayerManager. r=gfx-reviewers,aosmond,jrmuizel
Depends on D124418

Differential Revision: https://phabricator.services.mozilla.com/D124419
2021-09-05 02:16:37 +00:00
Olli Pettay
12e2e60f38 Bug 1728657 - Add a marker to tell when a RefreshDriver starts a timer the first time, r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D124252
2021-09-02 09:19:40 +00:00
Paul Bone
4c54df65f3 Bug 1727960 - Properly detect if nsRefreshDriver is ticking in IdleTaskRunner r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D123887
2021-09-02 01:17:27 +00:00
Olli Pettay
b91ca7c2a6 Bug 1725133 - Consider to not run a catch-up tick before a normal tick, r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D122332
2021-08-12 08:50:56 +00:00
Florian Quèze
150b8caec1 Bug 1723181 - Add an 'Image Animation' profiler marker, and rename the tick reason 'HasImageRequests' into 'HasImageAnimations' for clarity, r=mstange.
Differential Revision: https://phabricator.services.mozilla.com/D121397
2021-08-03 19:48:24 +00:00
Matt Woodrow
8964031845 Bug 1721537 - Split out WindowRenderer base class from LayerManager. r=miko
Depends on D120439

Differential Revision: https://phabricator.services.mozilla.com/D120440
2021-07-22 22:58:57 +00:00
Emilio Cobos Álvarez
9fff08499f Bug 1718755 - Use an early refresh driver runner rather than Dispatch() to coalesce theme changes. r=stransky
That way we guarantee they are processed before display.

Differential Revision: https://phabricator.services.mozilla.com/D119023
2021-07-20 14:10:58 +00:00
Tom Ritter
b43944124c Bug 1666222: Rip fuzzyfox out of the timestamp classes 2/5 r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D119637
2021-07-14 18:18:16 +00:00
Butkovits Atila
9295f06965 Backed out 4 changesets (bug 1718755) for causing Reftest failures. CLOSED TREE
Backed out changeset f2cc4fb3caa8 (bug 1718755)
Backed out changeset babc4fdcd08c (bug 1718755)
Backed out changeset 4566477a7075 (bug 1718755)
Backed out changeset 3cc5fcf9aeb6 (bug 1718755)
2021-07-14 18:36:32 +03:00
Emilio Cobos Álvarez
9fc3a5ddd3 Bug 1718755 - Use an early refresh driver runner rather than Dispatch() to coalesce theme changes. r=stransky
That way we guarantee they are processed before display.

Differential Revision: https://phabricator.services.mozilla.com/D119023
2021-07-14 11:29:24 +00:00
Sandor Molnar
a11189413a Backed out 2 changesets (bug 1718755) for causing build bustages. CLOSED TREE DONTBUILD
Backed out changeset eae7bcfd58c9 (bug 1718755)
Backed out changeset 6ad9e60bc38e (bug 1718755)
2021-07-08 12:55:09 +03:00
Emilio Cobos Álvarez
c31efc0d41 Bug 1718755 - Use an early refresh driver runner rather than Dispatch() to coalesce theme changes. r=stransky
That way we guarantee they are processed before display.

Differential Revision: https://phabricator.services.mozilla.com/D119023
2021-07-08 09:23:36 +00:00
Florian Quèze
bad6178c51 Bug 1717991 - Remove ifdefs around code that adds profiler markers with custom marker schemas, r=gerald.
Differential Revision: https://phabricator.services.mozilla.com/D118680
2021-06-25 13:28:01 +00:00
Emilio Cobos Álvarez
b2a195a3d2 Bug 1716481 - Improve ManagedPostRefreshObserver. r=smaug
Make it less sketchy.

Differential Revision: https://phabricator.services.mozilla.com/D118284
2021-06-24 22:05:12 +00:00
Nika Layzell
078b4f35fc Bug 1715144 - Part 1: Stop adding /ipc/glue to LOCAL_INCLUDES when including chromium-config.mozbuild, r=ipc-reviewers,necko-reviewers,mccr8,valentin
Differential Revision: https://phabricator.services.mozilla.com/D117103
2021-06-09 04:56:48 +00:00
Olli Pettay
de8107cd50 WIP: Bug 1708121, keep ticking after page load r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D116040
2021-05-27 16:08:04 +00:00