Commit Graph

29403 Commits

Author SHA1 Message Date
Andreea Pavel
d9d9517a78 Merge mozilla-central to autoland. a=merge on a CLOSED TREE 2018-03-20 00:42:18 +02:00
Andreea Pavel
7062e6b6a2 Merge mozilla-inbound to mozilla-central. a=merge 2018-03-20 00:39:56 +02:00
Lee Salzman
f0cb87c218 Bug 1438917 - limit allocations in SkTDynamicHash. r=jrmuizel
MozReview-Commit-ID: 1d3Tngi6Uek
2018-03-19 11:56:14 -04:00
Lee Salzman
dd7db02829 Bug 1444506 - follow-up - upstream bug fixes. r=me
MozReview-Commit-ID: DcB1BBpKTjj
2018-03-19 02:28:53 -04:00
Lee Salzman
d4d5b04b4c Bug 1444506 - follow-up - support BGRA in bilerp_clamp_8888 fast-path. r=me 2018-03-19 02:12:39 -04:00
Bogdan Tara
4785e99532 Merge inbound to mozilla-central. a=merge 2018-03-17 12:29:57 +02:00
Jeff Muizelaar
b0c6c75854 Bug 1439006. Allow multiple kinds of WebRenderUserData on a DisplayItem. r=mstange
Currently we can only have one type of WebRenderUserData on an Item. We already
have a hash table of WebRenderUserData so it's not hard to include type in the
hash to support one per type.

MozReview-Commit-ID: geJ0BeWv8b
2018-03-16 19:15:27 -04:00
James Willcox
8a43a8baff Bug 1401455 - Use correct GLX visual when rendering with WebRender r=karlt
MozReview-Commit-ID: AKT4bgdIkfV
2018-03-16 17:19:23 -05:00
James Willcox
36df193c10 Bug 1401455 - Add GLContextGLX::FindVisual() r=lsalzman
MozReview-Commit-ID: IiInaCEtnIF
2018-03-16 17:19:21 -05:00
James Willcox
4e30d2b54d Bug 1401455 - Expose glxChooseVisual() in GLXLibrary r=jgilbert
MozReview-Commit-ID: CdG2TAJA2Yc
2018-03-16 17:19:17 -05:00
Kartikaya Gupta
c864e00967 Bug 1441324 - Move the input event messages from PAPZCTreeManager to PAPZInputBridge. r=froydnj,rhunt
This remotes the APZInputBridge interface over the PAPZInputBridge
protocol in the case of the GPU process, and makes the GPU process'
main thread act as the APZ controller thread in that process. If
there is no GPU process we continue as before and the APZInputBridge
interface implementation is the concrete APZCTreeManager instance
in the UI process.

The main changes in this patch are moving all the code associated with
these messages out of APZCTreeManager{Parent,Child} and into
APZInputBridge{Parent,Child}. APZCTreeManagerChild now returns an
APZInputBridgeChild instance via InputBridge(), instead of returning
itself. The SetControllerThread call in the GPU process is also updated.

MozReview-Commit-ID: M4AaIW1Q0h

--HG--
extra : rebase_source : e5a8f14e23be34229fe80a47f6789d19b19e0a9f
2018-03-16 16:28:19 -04:00
Kartikaya Gupta
26139682b6 Bug 1441324 - Introduce an empty APZInputBridge protocol managed by PGPU. r=rhunt
This just adds the boilerplate that goes with the new protocol, without
adding any of the actual messages. The protocol is managed by PGPU, and
there will be one instance per compositor. The parent side lives on the
main thread of the GPU process, and the child side lives on the main
thread of the UI process. The protocol is only instantiated if the GPU
process is active.

MozReview-Commit-ID: J4VzwmEfYTa

--HG--
extra : rebase_source : 397ddda8b0e76e5ed5f63783b1220ed7b4414d99
2018-03-16 16:28:19 -04:00
Kartikaya Gupta
8848975da9 Bug 1441324 - Move the APZCTreeManager initialization for the GPU process to CompositorBridgeParent initialization. r=rhunt
This is important because the RecvInitialize method in CompositorBridgeParent
is run via a sync IPC message, and so we are guaranteed that when return to the
caller in the UI process, the APZCTreeManager will have been created. This
ensures that when we create the APZInputBridge actors (which will happen on a
different top-level protocol, but be triggered after the sync RecvInitialize
is complete) we know that the concrete APZCTreeManager is ready for use.

MozReview-Commit-ID: KYDyJNXxQJm

--HG--
extra : rebase_source : f7bbd000a94e405322ceaed6823693e4a95c81d4
2018-03-16 16:28:18 -04:00
Kartikaya Gupta
874af3e540 Bug 1441324 - Extract an APZInputBridge interface from IAPZCTreeManager. r=rhunt
This separates the methods that are used to deliver input events
synchronously over IPDL to the compositor; this interface will be
remoted over a new APZInputBridge IPDL protocol in future patches.

MozReview-Commit-ID: 1f3V9SUKlfW

--HG--
rename : gfx/layers/apz/public/IAPZCTreeManager.cpp => gfx/layers/apz/src/APZInputBridge.cpp
extra : rebase_source : 523abce7949baf9e3b7803a61632eb4434a6967f
2018-03-16 16:28:18 -04:00
Kartikaya Gupta
aefbfdb5a8 Bug 1188955 - Add a basic double-tap-to-zoom mochitest. r=botond
MozReview-Commit-ID: KVqmpBG33JC

--HG--
extra : rebase_source : db2a378f5b4ddc130c1d3f8d8a9e3591c2e2f2e3
2018-03-19 16:58:34 -04:00
Kartikaya Gupta
c9ab45d675 Bug 1188955 - Turn the MAX_TAP_TIME into a preffable value. r=botond
MozReview-Commit-ID: HCiCd7vxTnF

--HG--
extra : rebase_source : 33f9222e3e9510ed669a9335900c945af463599a
2018-03-19 16:58:33 -04:00
Kartikaya Gupta
0f0983b5b5 Bug 1188955 - Use the subtest's ok/is functions so the subtest name shows up in the log. r=botond
MozReview-Commit-ID: 9VIYbSbqzlp

--HG--
extra : rebase_source : 8e298956893a8a82ddb3a23e574a5ceae8976a9b
2018-03-19 16:58:33 -04:00
Kartikaya Gupta
953b2d3283 Bug 1445288 - Turn test_key_scroll into a group test and robustify it a bit. r=botond
MozReview-Commit-ID: 7yIg1JckgfR

--HG--
rename : gfx/layers/apz/test/mochitest/test_key_scroll.html => gfx/layers/apz/test/mochitest/test_group_keyboard.html
extra : rebase_source : cb1be11435664109942b40c9178fdc9db56f9cd2
2018-03-19 17:22:09 -04:00
Kartikaya Gupta
f80768ca40 Bug 1446022 - Guard against dereferencing a null APZC pointer in degenerate cases. r=botond
This rolls back a few of the changes from bug 1443792. Although in
theory a LayerMetricsWrapper having an APZC should be equivalent to it
having a scrollable metrics, this might not always be strictly true. For
example, if there is no GeckoContentController registered for a layer
tree, then there might not be APZCs for that layer tree even though it
has scrollable metrics. More importantly, a malicious child process
might be able to trigger scenarios where the equivalence doesn't hold,
and thereby trigger failures in the UI/GPU process.

MozReview-Commit-ID: 1gfbILx7HWU

--HG--
extra : rebase_source : 69a2bd82a812d674046957346c4f5036211d94cf
2018-03-19 17:11:22 -04:00
Jeff Muizelaar
e81d471371 Bug 1440702. Add equality operators to Matrix4x4Flagged. r=Bas
This adds a naive implementation of equality. We can do better
in the future by looking at the flags.

MozReview-Commit-ID: K4xdfCmvvb9
2018-03-16 16:42:03 -04:00
Gurzau Raul
70be85b9cd Merge inbound to mozilla-central. a=merge 2018-03-16 19:53:35 +02:00
sotaro
7871e211ec Bug 1444798 - Fix ExternalImageCallback func types r=jrmuizel 2018-03-16 21:03:59 +09:00
Sylvestre Ledru
fa45a3c670 Bug 1443080 - Use the static call for static methods (not instance) r=Ehsan
MozReview-Commit-ID: JwHh4bzxuTR

--HG--
extra : rebase_source : 5f5e37517aa80c2e7b5933962178d761074886e7
2018-03-16 14:29:15 +01:00
Kartikaya Gupta
bba5baa68a Bug 1444946 - Update webrender to commit 486ee5f3aefb0172c2c5703e19f833e63eb295b9. r=jrmuizel
MozReview-Commit-ID: EwPVlYte5Wo

--HG--
extra : rebase_source : a7a135bde5afa3eae41e29962a504d15a49989ec
2018-03-16 09:02:26 -04:00
Zibi Braniecki
8264ecd92f Bug 1345957 - Update the use of LocaleService API in gfxPlatformFontList. r=jfkthame
MozReview-Commit-ID: Lj7H2DwlS91

--HG--
extra : rebase_source : 17e8304eb8d2d6640cd44816f1e3e825e26b57d4
2018-03-06 18:55:22 -08: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