Commit Graph

29380 Commits

Author SHA1 Message Date
James Willcox
ee03b7a943 Bug 1401455 - Expose glxChooseVisual() in GLXLibrary r=jgilbert
MozReview-Commit-ID: CdG2TAJA2Yc
2018-03-16 08:39:44 -05:00
sotaro
7871e211ec Bug 1444798 - Fix ExternalImageCallback func types r=jrmuizel 2018-03-16 21:03:59 +09:00
Coroiu Cristina
51fd916771 Merge mozilla-central to autoland a=merge on a CLOSED TREE 2018-03-16 01:43:13 +02:00
Kartikaya Gupta
d16ab46492 Bug 1445662 - Update RemoteContentController to allow the GPU process controller thread to be different from the compositor thread. r=rhunt
A couple of RemoteContentController methods get called on the controller
thread in the GPU process. This is the same as the compositor thread so
we could just do compositor-thread stuff here, but we will want to
support the controller thread being the main thread instead of the
compositor thread. So we detect those cases and bounce the message
accordingly.
2018-03-15 15:25:11 -04:00
Kartikaya Gupta
c4a6aff0f0 Bug 1445662 - Annotate remaining PAPZCTreeManager-invoked methods with threading constraints. r=rhunt
These methods are already guaranteed to be called on the controller
thread.
2018-03-15 15:25:10 -04:00
Kartikaya Gupta
5083c84c88 Bug 1445662 - Ensure ZoomToRect runs on the controller thread. r=rhunt
Currently the ZoomToRect function is only ever called on Android, on the
UI process main thread, which is neither the controller nor the sampler
thread. Instead of allowing "random" threads to run inside APZ, we
ensure that callers run it on the controller thread.
2018-03-15 15:25:10 -04:00
Kartikaya Gupta
bb580f89fa Bug 1445662 - Ensure UpdateZoomConstraints runs on the sampler thread. r=rhunt
Without this patch, UpdateZoomConstraints can get called on:
a) the compositor/sampler thread (over PAPZCTreeManager)
b) the controller thread which is also the UI process main thread (on
   desktop platforms without a GPU process)
c) the UI process main thread when it's *not* the controller thread (on
   Android).
Instead of having to reason about all these scenarios separately, we can
try to unify them a little bit by ensuring the function contents always
run on the sampler thread, which is the thread that seems to make the
most sense for it.
2018-03-15 15:25:10 -04:00
Kartikaya Gupta
cfbe8bb66a Bug 1445662 - Assert that IAPZCTreeManager's helper methods are always on the controller thread. r=rhunt
These two functions (UpdateWheelTransaction and ProcessUnhandledEvent)
are only ever called on the concrete APZCTreeManager when the APZ code
is living in the GPU process. This is because the calls are made by the
IAPZCTreeManager implementation which lives in the UI process, and
remoted over PAPZCTreeManager. So the assertion is safe, and will help
us guard against inadvertent breakage when we try making a different
thread the controller thread in the GPU process.

In addition, the WillHandleInput function can be called in the GPU
process on the compositor thread, but we will allow it to be called on
the main thread as well. In that case we need to ensure we don't try
running EventStateManager pref-reading code in the GPU process, and
instead preserve the current behaviour of just returning true.
2018-03-15 15:25:10 -04:00
Kartikaya Gupta
323f2093f0 Bug 1445662 - Remove ProcessTouchVelocity from PAPZCTreeManager.ipdl. r=rhunt
This function is never actually called over IPDL. It is called directly
on the concrete APZCTreeManager instance by the
AndroidDynamicToolbarAnimator code, both of which live in the
compositor. So we don't need to expose this method on IAPZCTreeManager
or over PAPZCTreeManager.
2018-03-15 15:25:09 -04:00
Kartikaya Gupta
9ab9425d9f Bug 1445662 - Make the DPI non-static and bound to the controller thread. r=rhunt
Since we can have multiple browser windows on multiple different
displays with different DPIs, it doesn't make sense to have a single
static DPI value shared across all APZCTreeManagers. Instead, each
APZCTM should store its own DPI value for the display the window is on.
Since the DPI is only ever read from the controller thread, we can make
it bound to that thread, and update the setter code to also set it on
that thread.

As with the previous patch, the change in APZCTreeManagerParent is a
no-op but allows making some other thread in the GPU process the controller
thread. And the change in nsBaseWidget is a no-op everywhere except
Android.
2018-03-15 15:25:09 -04:00
Kartikaya Gupta
d59c0946db Bug 1445662 - Ensure the keyboard map access is threadsafe. r=rhunt
- The change in APZCTreeManagerParent is functionally a no-op because it
  only ever runs in the GPU process on the controller thread. But it
  allows moving the controller thread to some other thread.
- The change in nsBaseWidget is a no-op for desktop platforms, because
  in the UI process the main thread is the controller thread. But on
  Android it moves the call from the main thread to the Java UI thread.
2018-03-15 15:25:08 -04:00
Jeff Muizelaar
c8a1c9f6f0 Bug 1446166. Ensure that WebRenderUserData's are removed when LayerManager is destroyed. r=kats
This lets us avoid having to check whether we have the right one when getting them.

MozReview-Commit-ID: 9YDiSd7AekB

--HG--
extra : rebase_source : 4e9ce48075fa02eba83209f545181a0883e7551e
2018-03-15 13:51:05 -04:00
Peter Bacalso
0445cb7bdd Bug 1443292 - Move TouchBehaviorFlags from APZUtils.h to LayersTypes.h. r=botond
--HG--
extra : rebase_source : 2b4b07718222f65d8e30342b6f52eec114358318
extra : amend_source : b4fe1d0570f7f8c19f545504cd6a33fe3345d476
2018-03-14 18:18:27 -04:00
Kartikaya Gupta
552d7db33b Bug 1425573 - Follow-up to fix logging compilation failure. r=me and DONTBUILD
MozReview-Commit-ID: KaoJYgriHo4
2018-03-15 12:00:20 -04:00
Coroiu Cristina
fbaf1d233a Backed out 8 changesets (bug 1445662) for bustage at build/src/gfx/layers/apz/util/ChromeProcessController.cp on a CLOSED TREE
Backed out changeset d514b05d1f6a (bug 1445662)
Backed out changeset 13f4f51d7bd1 (bug 1445662)
Backed out changeset 20c79dee1905 (bug 1445662)
Backed out changeset ca1e29c9b439 (bug 1445662)
Backed out changeset 8fadda7d555e (bug 1445662)
Backed out changeset b5f2ceda75bd (bug 1445662)
Backed out changeset 41d8b7a6b339 (bug 1445662)
Backed out changeset 121cd3a0490f (bug 1445662)
2018-03-15 20:37:10 +02:00
Kartikaya Gupta
97dac6f1db Bug 1445662 - Update RemoteContentController to allow the GPU process controller thread to be different from the compositor thread. r=rhunt
A couple of RemoteContentController methods get called on the controller
thread in the GPU process. This is the same as the compositor thread so
we could just do compositor-thread stuff here, but we will want to
support the controller thread being the main thread instead of the
compositor thread. So we detect those cases and bounce the message
accordingly.

MozReview-Commit-ID: 6kLqdl6jgO0

--HG--
extra : rebase_source : 04f0ce53e247f198527f001cd80b48b126d25f9d
2018-03-14 16:57:52 -04:00
Kartikaya Gupta
a7f18cd8d9 Bug 1445662 - Annotate remaining PAPZCTreeManager-invoked methods with threading constraints. r=rhunt
These methods are already guaranteed to be called on the controller
thread.

MozReview-Commit-ID: 4pfUZe6cI8e

--HG--
extra : rebase_source : 9ad24c0bb2e45bbd63e0a2febc14391e1a28f274
2018-03-14 16:57:52 -04:00
Kartikaya Gupta
186ffd08c7 Bug 1445662 - Ensure ZoomToRect runs on the controller thread. r=rhunt
Currently the ZoomToRect function is only ever called on Android, on the
UI process main thread, which is neither the controller nor the sampler
thread. Instead of allowing "random" threads to run inside APZ, we
ensure that callers run it on the controller thread.

MozReview-Commit-ID: 64LkHaFLIOl

--HG--
extra : rebase_source : 61f397c0e18f83c68c228879692c9d4767b25675
2018-03-14 16:57:52 -04:00
Kartikaya Gupta
139ae9307f Bug 1445662 - Ensure UpdateZoomConstraints runs on the sampler thread. r=rhunt
Without this patch, UpdateZoomConstraints can get called on:
a) the compositor/sampler thread (over PAPZCTreeManager)
b) the controller thread which is also the UI process main thread (on
   desktop platforms without a GPU process)
c) the UI process main thread when it's *not* the controller thread (on
   Android).
Instead of having to reason about all these scenarios separately, we can
try to unify them a little bit by ensuring the function contents always
run on the sampler thread, which is the thread that seems to make the
most sense for it.

MozReview-Commit-ID: 8V4WTNtST3d

--HG--
extra : rebase_source : c4ebda75657d906d318acc07c174e8f3f634d18f
2018-03-14 16:57:42 -04:00
Kartikaya Gupta
43bc6e764c Bug 1445662 - Assert that IAPZCTreeManager's helper methods are always on the controller thread. r=rhunt
These two functions (UpdateWheelTransaction and ProcessUnhandledEvent)
are only ever called on the concrete APZCTreeManager when the APZ code
is living in the GPU process. This is because the calls are made by the
IAPZCTreeManager implementation which lives in the UI process, and
remoted over PAPZCTreeManager. So the assertion is safe, and will help
us guard against inadvertent breakage when we try making a different
thread the controller thread in the GPU process.

In addition, the WillHandleInput function can be called in the GPU
process on the compositor thread, but we will allow it to be called on
the main thread as well. In that case we need to ensure we don't try
running EventStateManager pref-reading code in the GPU process, and
instead preserve the current behaviour of just returning true.

MozReview-Commit-ID: JFBX3NSXywn

--HG--
extra : rebase_source : 6718944034ec7b7223581e562aa59e9e79b54b53
2018-03-14 16:57:41 -04:00
Kartikaya Gupta
354719495e Bug 1445662 - Remove ProcessTouchVelocity from PAPZCTreeManager.ipdl. r=rhunt
This function is never actually called over IPDL. It is called directly
on the concrete APZCTreeManager instance by the
AndroidDynamicToolbarAnimator code, both of which live in the
compositor. So we don't need to expose this method on IAPZCTreeManager
or over PAPZCTreeManager.

MozReview-Commit-ID: 6fEkJpDDvhl

--HG--
extra : rebase_source : cff9bb8fa43698950388b77f782b0b3fe6ec119b
2018-03-14 16:57:41 -04:00
Kartikaya Gupta
20e68959db Bug 1445662 - Make the DPI non-static and bound to the controller thread. r=rhunt
Since we can have multiple browser windows on multiple different
displays with different DPIs, it doesn't make sense to have a single
static DPI value shared across all APZCTreeManagers. Instead, each
APZCTM should store its own DPI value for the display the window is on.
Since the DPI is only ever read from the controller thread, we can make
it bound to that thread, and update the setter code to also set it on
that thread.

As with the previous patch, the change in APZCTreeManagerParent is a
no-op but allows making some other thread in the GPU process the controller
thread. And the change in nsBaseWidget is a no-op everywhere except
Android.

MozReview-Commit-ID: CB23MxGISeL

--HG--
extra : rebase_source : b3358202ec5fa27422c56ae1b0b2237dbc8e489b
2018-03-14 16:57:41 -04:00
Kartikaya Gupta
73717e624e Bug 1445662 - Ensure the keyboard map access is threadsafe. r=rhunt
- The change in APZCTreeManagerParent is functionally a no-op because it
  only ever runs in the GPU process on the controller thread. But it
  allows moving the controller thread to some other thread.
- The change in nsBaseWidget is a no-op for desktop platforms, because
  in the UI process the main thread is the controller thread. But on
  Android it moves the call from the main thread to the Java UI thread.

MozReview-Commit-ID: LVVZLFxSuyj

--HG--
extra : rebase_source : 89e9c8824c31867ad92152ff9b496744a6afdd83
2018-03-14 16:57:41 -04:00
Noemi Erli
da9500ef7d Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-03-15 19:44:05 +02: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
Andrew Osmond
a53f4da6d7 Bug 1445802 - Disable broken asserts to unbreak Windows QR mda tests. r=aosmond 2018-03-15 06:42:19 -04:00
sotaro
0cc1972d14 Bug 1432039 - Improve assumption of content process's back-end prefs r=jrmuizel 2018-03-15 14:48:54 +09:00
Ryan VanderMeulen
0007daf65b Backed out changeset 1ec0f839a905 (bug 1086964) for mass Win7 debug test failures. 2018-03-14 20:35:43 -04:00
Emilio Cobos Álvarez
a4486328c8 Bug 1433671: Add MOZ_CAN_RUN_SCRIPT annotations to AccessibleCaret and other stuff. r=bz
MozReview-Commit-ID: Js0CF7WQM73
2018-03-14 23:32:22 +01:00
Ryan VanderMeulen
3f80fd8acc Bug 1086964 - Remove uses of no_pgo that are no longer needed. r=dmajor 2018-03-14 18:18:32 -04:00
Andreea Pavel
363ad2007d Merge mozilla-central to mozilla-inbound. a=merge on a CLOSED TREE 2018-03-15 00:11:42 +02:00
Andreea Pavel
067622ac36 Merge mozilla-inbound to mozilla-central. a=merge on a CLOSED TREE 2018-03-15 00:07:17 +02:00
Andrew Osmond
4986917db0 Bug 1435291 - Part 2. Make background SVGs use WebRender instead of fallback. r=jrmuizel 2018-03-14 14:19:13 -04:00
Ryan VanderMeulen
ca477b1e34 Bug 1445766 - Fix some non-unified build bustage in gfx/layers. r=lsalzman 2018-03-14 17:03:29 -04:00
Ryan Hunt
691f20afd2 Remove ReadLockHandle and ReadLockInit code (bug 1445008, r=aosmond)
This code is unused now that ReadLockDescriptors are not sent in layer transactions.

--HG--
extra : rebase_source : 8cd25541b22c3151e2dbd2f8ea6d1119e2f26c94
extra : source : 99a2d26d1ba82ad34a6c27641500a424cda015c3
2018-03-13 17:00:18 -05:00
Kearwood Gilbert
0fd0d36de4 Bug 1445647 - Fixed initialization of state.mSittingToStandingTransform
--HG--
extra : rebase_source : 42d51f2c33a27b920071f18d71b59c0550118f9f
2018-03-14 13:30:06 -07:00
Lee Salzman
9aa9c2ba03 Bug 1444506 - follow-up - use SkMD5. r=me 2018-03-14 10:17:38 -04:00
Emilio Cobos Álvarez
b3b7b29add Bug 1440993: followup: Avoid overwriting the frontbuffer variable. r=nical
MozReview-Commit-ID: 68ljrd3qf1u
2018-03-14 14:26:41 +01:00
Nicolas Silva
f59445a4bd Bug 1440993 - Null-check the GLContext's screen when reading back canvas data. r=sotaro. 2018-03-14 13:30:42 +01:00
Emilio Cobos Álvarez
222d41c92f Bug 1445478: Make pointerevents/test_bug1414336.html more reliable. r=kats
There can be something shuffling the iframe between the mouse event is sent and
the mouse event is received which makes us end up targeting the <body> instead
of the test target.

This can be reproduced with enough persistence either with and without the
patches from bug 1439875, at least on a headless build with rr chaos mode.

Move it to test_group_pointerevents in the apz tests to run it in a new window
and make it a bit more reliable.

MozReview-Commit-ID: BS6Es8iEmMY
2018-03-14 13:10:31 +01:00
sotaro
58a1b5e3d2 Bug 1443671 - Check aImageContainer in ImageBridgeChild::Connect() r=nical 2018-03-14 20:08:29 +09:00
arthur.iakab
8976abf9ca Merge inbound to mozilla-central. a=merge 2018-03-14 12:00:13 +02:00
Kearwood Gilbert
d0b2b8da65 Bug 1436791 - Implement gfxVRExternal,r=rbarker
- gfxVRExternal Enables other processes to present
  real or simulated VR hardware to Firefox.
- This functionality is disabled by default, under
  dom.vr.external.enabled.
- VRDisplayInfo, VRControllerInfo, and associated
  structs have been restructured to ensure internal
  state is not exposed via shmem interface.
- Some refactoring to convert structs to
  POD types, enabling them to be located
  in shmem and be memcpy'd.
- Work needed before unpreffing marked
  with "TODO" comments.
MozReview-Commit-ID: FbsusbxuoQ8

--HG--
extra : rebase_source : 8a448169c3f47411c705a4d9fd462a1f9363dfd9
extra : amend_source : e6702549527292e2850d16e8f503f0be9848159f
2018-03-13 17:09:54 -07:00
Nicholas Nethercote
d41188c796 Bug 1445117 - Remove duplicates from nsGkAtoms. r=froydnj
In each case, the atom had an obvious name and a weird name. Where possible, I
kept the obvious name and commented out the weird name, viz:

- `mixed` over `_mixed` for "mixed"
- `el` over `el_` for "el"
- `other` over `other_` for "other"
- `remote` over `Remote` for "remote"

But for several of them I didn't do that, because the weird name is used
within the HTML5 parser -- which is a huge pain to modify because it involves
code generated by code from another repo -- so I kept the weird name and
commented out the obvious name, viz:

- `list_` over `list` for "list"
- `svgSwitch` over `_switch` for "switch"
- `set_` over `set` for "set"

MozReview-Commit-ID: Jp3CpdWXNDm

--HG--
extra : rebase_source : 421ce5316772f1951488307e81f2ceee696d363d
2018-03-14 10:27:25 +11:00
Kartikaya Gupta
778e7fae97 Bug 1443792 - Remove direct access to AsyncPanZoomController from ContainerLayerComposite. r=botond
MozReview-Commit-ID: 7CiK7bzDcPW

--HG--
extra : rebase_source : 468e2c1e09fb03fdefc21262aeb93e7086eda50d
2018-03-12 16:06:38 -04:00
Kartikaya Gupta
bb2e76ca71 Bug 1443792 - Remove direct access to AsyncPanZoomController from AsyncCompositionManager. r=botond
MozReview-Commit-ID: FA8XFOhy1wk

--HG--
extra : rebase_source : ad6085abeb2a43e5af73cfdbe575fc148c05785f
2018-03-12 16:06:38 -04:00
Kartikaya Gupta
86032d9307 Bug 1443792 - Tighten the equivalence between a layer being scrollable and having an APZC. r=botond
If we can assume that a layer being composited has an APZC at index i if and
only if the frame metrics at index i is scrollable, then we can do the
transformations in the next patch without any change in functionality.

MozReview-Commit-ID: FRkvhwdd3nh

--HG--
extra : rebase_source : f1bee292305730079b3208e447330028c1a40727
2018-03-12 16:06:37 -04:00
Kartikaya Gupta
bfc7d9097f Bug 1443792 - Move ComputeTransformForScrollThumb to APZCTreeManager. r=botond
This makes more sense in APZCTreeManager, but is exposed back to
AsyncCompositionManager via APZSampler. This also makes the APZ code
better encapsulated since the method API exposed on APZSampler doesn't
need to take a AsyncPanZoomController; it can just take the
LayerMetricsWrapper instead.

MozReview-Commit-ID: 9yJJd3x8VhN

--HG--
extra : rebase_source : b6f81116183810df158d8cce72891bb2db458355
2018-03-12 16:06:37 -04:00
Kartikaya Gupta
9edc276575 Bug 1443792 - Move the SampleAPZAnimations function into APZSampler. r=botond
MozReview-Commit-ID: 2KIQ5A2J7m9

--HG--
extra : rebase_source : c3fa7b3ff696413552d8659796438fc67c6e7202
2018-03-12 16:06:37 -04:00
Jeff Muizelaar
faae221e52 Bug 1391255. Crash earlier if recording playback fails. r=kats
This should help us narrow down what's going wrong a bit.

MozReview-Commit-ID: 2Ah0nMCwv55

--HG--
extra : rebase_source : fae57d36fe28b364fc652fb0e32abbbf8da43b0e
2018-02-23 13:14:39 -05:00