Commit Graph

432 Commits

Author SHA1 Message Date
Emilio Cobos Álvarez
fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
James Willcox
2448df528a Bug 1453501 - Allow the compositor to be created in a paused state r=kats
MozReview-Commit-ID: B0wc8MYaBJg
2018-05-14 11:12:39 -05:00
shindli
42cb453a11 Backed out 3 changesets (bug 1453501) for bustage in build/build/src/gfx/gl/GLContextProviderEGL.cpp on a CLOSED TREE
Backed out changeset 8b53a7b34121 (bug 1453501)
Backed out changeset c07588586701 (bug 1453501)
Backed out changeset 6c231423492b (bug 1453501)
2018-05-14 17:05:14 +03:00
James Willcox
58d7215e3c Bug 1453501 - Allow the compositor to be created in a paused state r=kats
MozReview-Commit-ID: B0wc8MYaBJg
2018-05-14 08:15:38 -05:00
Xidorn Quan
0b8abfb678 Bug 1447056 part 2 - Invoke Resize in SetSizeConstraints with the current size to apply the new constraints. r=bz
MozReview-Commit-ID: 9kRcDHTPCqt

--HG--
extra : rebase_source : 767c063284685f5e2b5a9af873c5ed2b3e99e3d1
extra : source : 5dbfc09ffece8bf2fcaeaa5a248e5fd3fe65d911
2018-04-05 08:08:30 +10:00
Kartikaya Gupta
395eaf8c66 Bug 1448490 - Make the layers id a struct instead of a uint64_t. r=mattwoodrow
The new struct is in LayersTypes.h, all the rest of the changes are just
replacing existing uint64_t instances with the new LayersId struct.

Note that there is one functional change, in
CompositorBridgeParent::DeallocPWebRenderBridgeParent, where we now
correctly convert the PipelineId to a LayersId before using it to index
into sIndirectLayerTrees, whereas before we were incorrectly just using
the mHandle part of the PipelineId.

MozReview-Commit-ID: GFHZSZiwMrP

--HG--
extra : rebase_source : d2b274f63aaee2ee9bba030297e0a37a19af0d6c
2018-03-24 19:06:01 -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
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
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
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
Sotaro Ikeda
5e1a7f84b4 Bug 1441498 - Protect mCompositorVsyncDispatcher by lock. r=kats
mCompositorVsyncDispatcher is created and destroyed on main thread. But it is
accessed from Compositor thread or VSyncBridge thread. To avoid race condition
between main thread and Compositor thread/VSyncBridge thread,
mCompositorVsyncDispatcher needs to be protected by lock.
2018-03-07 10:53:05 -05:00
Kartikaya Gupta
6641e4d0f0 Bug 1430797 - Follow-up to address review comment. r=mstange
MozReview-Commit-ID: 4DkzPSlDLwN
2018-01-17 08:59:38 -05:00
Kartikaya Gupta
c14f095505 Bug 1430797 - Allow webrender on eWindowType_child, so that it is used on OS X. r=nical
MozReview-Commit-ID: Gir5QWoal8d

--HG--
extra : rebase_source : 11892fec7c784262ab9d192ccd51348a993a14d8
2018-01-16 14:28:20 -05:00
Nicolas Silva
b5d400cfab Bug 1377321 - Only use WebRender for top-level windows and remote content. r=kats 2018-01-15 14:38:19 +01:00
Milan Sreckovic
bd27b86da3 Bug 1423559: Use BaseRect access methods instead of member variables in widget/ r=mstange
MozReview-Commit-ID: AqnztoUbsmk

--HG--
extra : rebase_source : 76a232a08b42ed73b4922c03bc0f2e9d1769203b
2018-01-10 11:14:16 -05:00
Kartikaya Gupta
2aaf6edd31 Bug 1425878 - Don't expose raw pointers to refcounted vsync dispatcher object. r=sotaro
MozReview-Commit-ID: 5ywkZqfY8uZ

--HG--
extra : rebase_source : 3a887a5765fb0f7c2b5acdc8be94f3ea84199081
2017-12-18 13:33:56 -05:00
Robin Grenet
34508b32f6 Bug 1360278 - Add preference to trigger context menu on mouse up for GTK+ and macOS, r=mstange,smaug
MozReview-Commit-ID: Bg60bD8jIg6

--HG--
extra : rebase_source : cc8bd5796096f49ad4fdab81885a426afd6117e4
2017-11-16 13:35:58 +01:00
Kevin Chen
49b2130100 Bug 1415469 - Remove mDeviceResetSequenceNumber from TDR process since we don't need it anymore; r=dvander
MozReview-Commit-ID: 3uQQwW8QOJA

--HG--
extra : rebase_source : ab6090ad51a2a4714f1739a30d854d624d187239
2017-11-08 15:26:43 +08:00
sotaro
bce40231ea Bug 1390741 - Use BasicCompositor if widget type does not support acceleration r=aosmond,kats 2017-11-03 16:38:34 +09:00
Botond Ballo
2c1a3530e6 Bug 1340415 - Ensure main-thread and async autoscrolling do not happen at the same time. r=kats
The two happening at the same time can lead to the APZ autoscroll being
cancelled due to APZ receiving a main-thread scroll offset update.

To achieve this:

  - The content process assumes APZ is handling the autoscroll until
    told otherwise.

  - If the parent process knows APZ won't handle an autoscroll, it
    tells the content process via its response to the Autoscroll:Start
    message. This covers all cases where APZ doesn't handle the
    autoscroll, except the case where APZCTreeManager itself rejects
    the autoscroll and it lives in the compositor process rather than
    the parent process.

  - If APZCTreeManager rejects an autoscroll and it lives in the
    compositor process, it sends an 'autoscroll-rejected-by-apz' message
    to the content process.

MozReview-Commit-ID: L62v4COai6W

--HG--
extra : rebase_source : bc4c6417e77461634263defb88e67ed5036c454e
2017-10-18 18:18:13 -04:00
Kris Maglione
c2da8a30a3 Bug 1404198: Part 2d - Switch to NS_NewTimer* in widget. r=njn
MozReview-Commit-ID: G4S8q9DYPS0

--HG--
extra : rebase_source : 9c6da05bf2ef3cfee551879879330a85688b1f5d
2017-10-15 23:12:54 -07:00
Nicholas Nethercote
bff3932f55 Bug 1402743 - Remove nsIDOMWindowUtils::getCursorType(). r=bkelly.
It has no users in mozilla-central or comm-central. This also lets us remove
nsBaseWidget::GetCursor().

--HG--
extra : rebase_source : 3875ce37c78f82285c4e5dbd8133e9ae3dafa0de
2017-09-25 11:46:07 +10:00
Jim Mathies
2a7901349f Bug 1387507 - Remove a11y e10s checks and preferences. r=felipe 2017-09-08 09:31:06 -05:00
Kirk Steuber
6e217001f8 Bug 1362382 - Move RegisterDragDrop to be called during idle time, if possible r=jimm
Additionally, do not call RegisterDragDrop for hidden windows.

MozReview-Commit-ID: Fv8j9FntGGT

--HG--
extra : rebase_source : fccbc576887d000805da8ac915d16fc4fddfeceb
2017-08-30 11:18:25 -07:00
sotaro
11c145a7c1 Bug 1394338 - Add WebRender error handling to RendererOGL r=nical 2017-08-30 09:10:22 +09:00
Tom Ritter
52deded719 Bug 1393536 Clean up unused variables in widget/ r=jimm
MozReview-Commit-ID: 9NBzIriF8NU

--HG--
extra : rebase_source : da185c4e55d066ec61b534d32a06d7d1819d35ca
2017-08-25 10:39:30 -05:00
Sebastian Hengst
765cc1b925 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: JhesEg4Bxjy
2017-08-04 19:28:27 +02:00
sotaro
a773ee4276 Bug 1354411 - Rebuild CompositorSessions if WebRender is disabled r=kats
When WebRender creation is failed, WebRender is disabled in gecko. There is a case that WebRenderBridgeParents exist when WebRender is disabled. To handle this, gecko needs to rebuild all CompositorSessions.

There is also a problem related to gfxVars::UseWebRender on compositor thread. If e10s is enabled, but no-gpu process(default on linux and mac), gfxVars::UseWebRender change is soon notified by compositor thread tasks. If WebRender creation failure happens at 2nd WebRender creation, several WebRenderBridgeParents for 1st WebRender could exist. IPC messages from WebRenderLayerManager are normally async, then there is a chance that the WebRenderBridgeParents receive the messages after the gfxVars::UseWebRender change. Further the gfxVars::UseWebRender change in content process could be delayed than WebRenderBridgeParents, then content process does not have a way to stop sending PWebRenderBridge IPC until the change of gfxVars::UseWebRender is received. WebRenderBridgeParent related tasks handle the message, but some tasks are done based on gfxVars::UseWebRender. At this time, gfxVars::UseWebRender returned false on compositor thread, then it cause unexpected result for WebRenderBridgeParent and WebRender. To addres this inconsistent situation, WebRenderBridgeParent related tasks on compositor thread stop to use gfxVars::UseWebRender.
2017-08-04 14:36:41 +09:00
Michael Smith
6fcebfbe5b Bug 1373739 - Make headless compositing Windows-compatible, in addition to Linux. r=dvander
To make the HeadlessCompositorWidget work under Windows as well as Linux, I had
to change the way that I hooked it into the existing CompositorWidget system.
Under GTK, the CompositorWidgetInitData and CompositorWidgetDelegate types
provided the information needed by the headless compositor widget already (the
widget client size). On Windows, however, the definitions of these types
differ, and the client size information is simply retrieved from the platform
APIs when needed.

After this patch, CompositorWidgetDelegate is renamed to
PlatformCompositorWidgetDelegate, and a new base class called
CompositorWidgetDelegate is added with "AsPlatformSpecificDelegate()" and
"AsHeadlessCompositorWidget()" methods. In non-headless mode, widgets use
AsPlatformSpecificDelegate() to access the Windows- and GTK-specific delegate
APIs. In headless mode, AsHeadlessCompositorWidget() is used to access the
singular CompositorWidget implementation for headless. Meanwhile, the
CompositorWidgetInitData IPDL type is made into a union which always contains a
headless-specific HeadlessCompositorWidgetInitData struct and under GTK and
Windows also contains an {X11,Win}CompositorWidgetInitData struct.

This also includes a small patch to ensure that the GPU process and
hardware-accelerated compositing are always disabled under headless mode. These
features weren't activated by default in the Linux environments I tested in, but
did end up activating (and then promptly crashing Firefox) when I tested on
Windows.

MozReview-Commit-ID: CocPoHBDV7H

--HG--
extra : rebase_source : 4581fa63aa3a9f32a8dc2672015a35b9be01b20f
2017-07-06 17:45:34 -07:00
Botond Ballo
e54b8b4984 Bug 1105109 - Have the parent process notify APZ of the start and stop of autoscrolling. r=kats
The messages are routed through nsITabParent, nsIWidget, and IAPZCTreeManager
(the latter possibly remoted via PAPZCTreeManager if out-of-process compositing
is used).

MozReview-Commit-ID: 1zXzLa1fqpG

--HG--
extra : rebase_source : c482816ecbaec0a889d817851ee15be186b2a49c
2017-07-26 19:33:02 -04:00
Wes Kocher
40c3480d89 Merge inbound to central, a=merge
MozReview-Commit-ID: JNxfwQh0cac

--HG--
rename : gfx/layers/wr/WebRenderCompositableHolder.h => gfx/layers/wr/AsyncImagePipelineManager.h
2017-07-28 17:40:43 -07:00
sotaro
b8bc54df5a Bug 1372880 - Add WebRender creation failure handling r=aosmond 2017-07-28 18:22:21 +09:00
Masayuki Nakano
333068f586 Bug 1384027 - part2: Move PuppetWidget::NotifyIMEInternal() implementation to PuppetWidget::NotifyIME() which is a method of TextEventDispatcherListener, not nsIWidget r=m_kato
nsIWidget::NotifyIME() should call only TextEventDispatcher::NotifyIME() if it's necessary.  Then, TextEventDispatcher::NotifyIME() calls TextEventDispatcherListener::NotifyIME() if it's necessary.  E.g., requests to IME are necessary only for TextInputProcessor or native IME handler because the composition is only owned by one of them.  However, notifications are necessary for both of them since focused editor contents and its focus state are shared.

So, it doesn't need to call nsBaseWidget::NotifyIMEInternal() if all NotifyIMEInternal() implementations are moved to proper TextEventDispatcherListener::NotifyIME().  Currently, nsBaseWidget::NotifyIMEInternal() is implemented only by PuppetWidget.  It sends notifications and requests to the parent process for native IME.  Therefore, we can move NotifyIMEInternal() implementation to TextEventDispatcherListener::NotifyIME() which is implemented by PuppetWidget.

This patch moves PuppetWidget::NotifyIMEInternal() implementation to PuppetWidget::NotifyIME() of TextEventDispatcherListener class, not of nsIWidget and removes NotifyIMEInternal() completely.

With this change, handling order is changed.  Old behavior is, TextEventDispatcher::NotifyIME() calls TextEventDispatcherListener::NotifyIME() before handling NOTIFY_IME_OF_FOCUS and then, nsBaseWidget::NotifyIME() sends the notification to the parent process.  However, new behavior is, the notification is sent before TextEventDispatcher::NotifyIME() handles NOTIFY_IME_OF_FOCUS.  Therefore, with new handling order, TextEventDispatcher can have IME notification requests after setting focus correctly.  Additionally, TextEventDispatcher for PuppetWidget updates the notification requests at every event dispatch via TextEventDispatcher::BeginInputTransactionInternal() by the previous patch.

So, with those patches, IMEContentObserver can refer actual IME notification requests correctly even after we'll make focus notification to async message.

MozReview-Commit-ID: JwdQ68BjTXL

--HG--
extra : rebase_source : fbc7e311d83aab3b38fdd5c1b5c24d85458eb77b
2017-07-26 00:09:41 +09:00
Andrew Osmond
69da7c2120 Bug 1381095 - Fallback correctly to non-WebRender if the GPU process/WebRender are disabled when creating a remote compositor session. r=dvander 2017-07-20 09:20:22 -04:00
Kris Maglione
86877fceef Bug 1381097: Part 1 - Add default-false pref to enable APZ in remote popups. r=kats
Ideally, we definitely want APZ in remote popup browsers for the sake of
responsiveness. However, there are currently some serious painting and
checkerboarding issues that make APZ popups unsuitable for release
populations.

Once these issues are addressed, we should enable the preference by default.
But given the relative lack of testing, and the issues we've seen so far, we
should keep the preference so that we can disable it with a hotfix if further
issues arise.

MozReview-Commit-ID: GOZRdsmLNZR

--HG--
extra : rebase_source : ce0f2ca029d951a9c65ec1482e065b6695793133
2017-07-15 12:01:36 -07:00
Masayuki Nakano
c726abb366 Bug 1377672 - part2: IMEStateManager::SetIMEState() should set input context with proper origin information r=m_kato
Currently, IMEStateManager always sets input context as set by current process even when it needs to adjust IME state when a tab parent for current focused IME process is removed.  Then, input context for the widget is marked as for main process but the widget still have IME focus of a remote process.

For fixing this mismatch, IMEStateManager should set ORIGIN_CONTENT even when the tab parent is being destroyed.

MozReview-Commit-ID: C10YOAtkET4

--HG--
extra : source : 9430d123b19e0ac551c6048bb044fcfa22d13e45
2017-07-03 12:28:10 +09:00
Kartikaya Gupta
b13fcdbce3 Bug 1378956 - Don't try starting WebRender on widgets that have transparency. r=jrmuizel
MozReview-Commit-ID: 6AvsxxXCeVv

--HG--
extra : rebase_source : 85276ff6d43c9dd7d96c51957f66c4a47afc99a0
2017-07-06 16:00:43 -04:00
Ryan Hunt
bb5749ccf1 Bug 1351783 part 17 - Do less work when apz.keyboard.enabled is false. r=kats
When keyboard apz is disabled, we don't need to calculate focus targets and
we don't need to update focus state. It should be harmless even if it's done,
but I think it's good to not add something on this critical path that doesn't
do anything.

This commit also disable keyboard map generation in this case too for similar
reasoning. This has the side effect that you can't turn on keyboard apz without
doing a restart.

MozReview-Commit-ID: LxmofT2g7qs

--HG--
extra : rebase_source : 719d29efd80498b824fee03a5be1c1fd05c83074
extra : histedit_source : 7ad71a19782fc6dd203207afbdc7a73a936b3e04
2017-06-06 11:08:45 -05:00
Ryan Hunt
cc923c3909 Bug 1351783 part 6 - Create and send KeyboardMap to APZCTreeManager. r=kats
This commit makes it so we initialize, send, and store a KeyboardMap for every
APZCTreeManager for later keyboard event processing.

This is a naive approach so it may be worth improving.

MozReview-Commit-ID: CYTbLL3wRlC

--HG--
extra : rebase_source : 016b80a2a209d4fb5b92bc3adb95bd2dbb4399e0
2017-06-05 18:35:32 -05:00
Bill McCloskey
f115503a0b Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-26 14:19:58 -07:00
David Anderson
7df9b05034 Add MLGPU feature bits and compositor initialization. (bug 1365879 part 21, r=mattwoodrow) 2017-06-23 14:23:12 -07:00
Carsten "Tomcat" Book
1f871b61e4 Backed out changeset 9d0048e04446 (bug 1365879) 2017-06-23 12:15:32 +02:00
David Anderson
0505938414 Add MLGPU feature bits and compositor initialization. (bug 1365879 part 21, r=mattwoodrow)
--HG--
extra : rebase_source : 3d8d1a9619d997a2de9eea4e734a0457cd326e91
2017-06-22 21:12:19 -07:00
Carsten "Tomcat" Book
8a1350b5a6 Backed out changeset 4f6302a98ae4 (bug 1372405)
--HG--
extra : rebase_source : 41632f3158e88e692809731394a683d065a73dfb
2017-06-21 13:59:26 +02:00
Edgar Chen
273f4b0c7e Bug 1236512 - Part 1: Send "occlusionstatechange" custom event when occlusion state in Mac is changed; f=spohl; r=mstange
MozReview-Commit-ID: GTBeH4UwZiU
2017-05-26 18:09:34 +08:00
Bill McCloskey
6b3e84ed5f Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-20 21:44:11 -07:00
Carsten "Tomcat" Book
e5d9b2a520 Backed out changeset 844d46609652 (bug 1236512) for test failures in own test 2017-06-20 14:30:54 +02:00
Edgar Chen
244552c6fd Bug 1236512 - Part 1: Send "occlusionstatechange" custom event when occlusion state in Mac is changed; f=spohl; r=mstange
MozReview-Commit-ID: GTBeH4UwZiU
2017-05-26 18:09:34 +08:00
Kartikaya Gupta
f2e0962ebb Bug 1339474 - Enable APZ in QuantumRender builds. r=jrmuizel
All reftests that are still failing with APZ enabled are annotated with
a bug number that is tracking the fix.

MozReview-Commit-ID: 8QU15LHVy1t

--HG--
extra : rebase_source : 71908ca38e96e0f6f5a341605e70c3f6670b9237
2017-06-19 15:46:38 -04:00