Commit Graph

2026 Commits

Author SHA1 Message Date
Dorel Luca
506e65bcab Backed out changeset bbb39655cf71 (bug 1605934) for build bustage in widget/gtk/mozwayland/mozwayland.c 2020-01-18 15:39:55 +02:00
Sylvestre Ledru
6689a37527 Bug 1605934 - Use nested namespaces r=sg
Done with:
./mach static-analysis check --checks="-*, modernize-concat-nested-namespaces" --fix .
and then clang-format on the files

Differential Revision: https://phabricator.services.mozilla.com/D58217

--HG--
extra : moz-landing-system : lando
2020-01-18 13:16:39 +00:00
Boris Chiou
74964a38a3 Bug 1591629 - Split TransformData into 2 parts - transform data and motion path data. r=hiro
So we don't need to create motion path data if there is no offset-path style
and no animations of offset-path.

Differential Revision: https://phabricator.services.mozilla.com/D57907

--HG--
extra : moz-landing-system : lando
2020-01-08 09:02:36 +00:00
Boris Chiou
5d817ca9a4 Bug 1591629 - Keep TransformData only in the first element when passing animation data through IPC. r=hiro
The benefits are:
1. For the rest `layers::Animation`s, their `TransformData` are `Nothing()`,
   so we can avoid any posisible copy.
2. In the compositor, we move `TransformData` out of the array, and use
   `UniquePtr` to avoid including AnimationHelper.h into AnimationInfo.h,
   which causes some compilation errors because LayersMessages.h is not
   visible in AnimationInfo.h.

Differential Revision: https://phabricator.services.mozilla.com/D57751

--HG--
extra : moz-landing-system : lando
2020-01-08 09:02:28 +00:00
Markus Stange
239125933c Bug 1592026 - Move NativeLayerRoot::CommitToScreen call from PostRender into the compositors. r=jrmuizel
This makes it more similar to how SwapBuffers was used.
This patch also makes us call glFlush directly when using native layers, rather than going through the misleadingly-named GLContext::SwapBuffers method.

Differential Revision: https://phabricator.services.mozilla.com/D57062

--HG--
extra : moz-landing-system : lando
2019-12-29 12:41:04 +00:00
Markus Stange
0f70058b6f Bug 1592044 - Reduce the frequency of IOSurface and framebuffer creation and destruction with the help of a surface pool. r=jgilbert
There are multiple SurfacePools: Main thread painting and the non-WebRender compositors create a new pool per window, and WebRender creates one shared pool across all windows. The non-WebRender users set the pool size limit to zero, i.e. no recycling across paints. This preserves the pre-existing behavior.
WebRender's pool size is configurable with the gfx.webrender.compositor.surface-pool-size pref.
Every window holds on to a SurfacePoolHandle. A SurfacePoolHandle has an owning reference to the pool, via a surface pool wrapper. Once all handles are gone, the surface pool goes away, too.
The SurfacePool holds on to IOSurfaces and MozFramebuffers. Both are created on demand, independently, but are associated with each other.
A given NativeLayer uses only one surface pool handle during its lifetime. The native layer no longer influences which GLContext its framebuffers are created for; the GL context is now managed by the surface pool handle.
As a result, a NativeLayer can no longer change which GLContext its framebuffers are created by.
So in the future, if we ever need to migrate a window frome one GLContext to another, we will need to recreate the NativeLayers inside it. I think that's ok.

Differential Revision: https://phabricator.services.mozilla.com/D54859

--HG--
extra : moz-landing-system : lando
2019-12-18 21:01:51 +00:00
Sean Feng
6db9bbdc3e Bug 1500465 - Measure touch scroll latency and connect to telemetry. r=mstange,botond
Differential Revision: https://phabricator.services.mozilla.com/D36246

--HG--
extra : moz-landing-system : lando
2019-12-07 03:57:56 +00:00
sotaro
8cbdbb0cb2 Bug 1601531 - Tag image descriptors with PREFER_COMPOSITOR_SURFACE where appropriate r=gw
Differential Revision: https://phabricator.services.mozilla.com/D55922

--HG--
extra : moz-landing-system : lando
2019-12-06 06:53:57 +00:00
Markus Stange
df49f517a5 Bug 1597585 - Make LayerManagerComposite use mGL to pass the GL context to PreRender, just like WebRender. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D53772

--HG--
extra : moz-landing-system : lando
2019-11-20 23:22:58 +00:00
Markus Stange
d582a45148 Bug 1597585 - Remove WidgetRenderingContext's unused field mCompositor. r=mattwoodrow
The only use of this was inside Android's nsWindow::PreRender.
That method was removed in changeset 81de9d1439b0e352729142f6aa2914674073da03 (bug 1335895).

Differential Revision: https://phabricator.services.mozilla.com/D53771

--HG--
extra : moz-landing-system : lando
2019-11-20 23:22:18 +00:00
Hiroyuki Ikezoe
1737c375d1 Bug 1586986 - Introduce 'fixed margins' on the main-thread to omit the gap between 'fixed margins' on the compositor and the last dynamic toolbar position on the main-thread. r=botond
The gap is caused by the difference between 'fixed margin' on the compositor
based on the state where the dynamic toolbar is completely visible and
position:fixed elements positioned by the time where is partially visible or
completely hidden.  That's because the 'fixed margin' is computed based on the
bottom of the ICB whereas position:fixed elements are slightly shifted from the
ICB edge during the toolbar transition.

Differential Revision: https://phabricator.services.mozilla.com/D52337

--HG--
extra : moz-landing-system : lando
2019-11-21 21:36:16 +00:00
David Parks
4dc38ba6aa Bug 1577336: Part 7 - Move DXGI async plugin operations to compositor process r=jmathies,mattwoodrow,sotaro,mccr8
Previously, we created TextureD3D11 objects in the content process to back surfaces created for the plugin process.  Those objects were then composited by the async ImageBridge.  In order to remove Win32 kernel operations from content (including DX/GDI operations), this patch bounces the requests from content to the compositor process.  The compositor process maintains 2 textures to be used for all plugin composition -- one for the plugin process and one for display.  The plugin process can freely write to its texture and request composition when it is done, which triggers a blit to the display texture.  This mirrors pre-existing behavior.

Differential Revision: https://phabricator.services.mozilla.com/D46086

--HG--
extra : moz-landing-system : lando
2019-11-20 21:49:35 +00:00
David Parks
18e50987a5 Bug 1577336: Part 6 - Make SurfaceDescriptorGPUVideo a union that contains SurfaceDescriptorRemoteDecoder r=mattwoodrow,jolin
SurfaceDescriptorGPUVideo, which currently only represents RemoteDecoder video, switches from being a struct to a union that holds a SurfaceDescriptorRemoteDecoder struct.  SurfaceDescriptorRemoteDecoder is a new name for the old SurfceDescriptorGPUVideo.  This is done so that we can later add SurfaceDescriptorPlugin as another type of SurfaceDescriptorGPUVideo.

Differential Revision: https://phabricator.services.mozilla.com/D52400

--HG--
extra : moz-landing-system : lando
2019-11-20 21:55:06 +00:00
James Hooks
6ea13e1732 Bug 1585806 - Make SideBits an enum class, add casting where necessary. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D51291

--HG--
extra : moz-landing-system : lando
2019-11-16 20:59:34 +00:00
Markus Stange
d3a4eb5918 Bug 1576390 - Remove now-unused DrawWindowOverlay and WindowOverlayChanged methods. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D52748

--HG--
extra : moz-landing-system : lando
2019-11-13 02:24:06 +00:00
Markus Stange
ba013d0f42 Bug 1594950 - Change NextSurface APIs to accept a dirty region, and remove the public method InvalidateRegionThroughoutSwapchain. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D50878

--HG--
extra : moz-landing-system : lando
2019-11-13 18:55:18 +00:00
Markus Stange
80c235777f Bug 1594950 - Bake the layer size and its opaqueness into the layer, don't allow mutating it. r=jrmuizel
These settings are now supplied during layer creation and never change.
Consumers must now create new NativeLayer objects if they want to change size or toggle opaqueness.
This aligns the NativeLayer API with DirectComposition's capabilities. It also simplifies swap chain
management.

Differential Revision: https://phabricator.services.mozilla.com/D51757

--HG--
extra : moz-landing-system : lando
2019-11-13 18:46:02 +00:00
Cosmin Sabou
1d71e9f510 Backed out 4 changesets (bug 1594950) for turning bug 1405083 into permafail.
Backed out changeset 684a87e91d94 (bug 1594950)
Backed out changeset adea6912c3a3 (bug 1594950)
Backed out changeset aea7108204e9 (bug 1594950)
Backed out changeset 15baea8520de (bug 1594950)
2019-11-13 06:44:24 +02:00
Markus Stange
2db4b324b7 Bug 1594950 - Change NextSurface APIs to accept a dirty region, and remove the public method InvalidateRegionThroughoutSwapchain. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D50878

--HG--
extra : moz-landing-system : lando
2019-11-12 19:50:26 +00:00
Markus Stange
82452d888a Bug 1594950 - Bake the layer size and its opaqueness into the layer, don't allow mutating it. r=jrmuizel
These settings are now supplied during layer creation and never change.
Consumers must now create new NativeLayer objects if they want to change size or toggle opaqueness.
This aligns the NativeLayer API with DirectComposition's capabilities. It also simplifies swap chain
management.

Differential Revision: https://phabricator.services.mozilla.com/D51757

--HG--
extra : moz-landing-system : lando
2019-11-12 19:50:25 +00:00
Barret Rennie
3e24c77cf6 Bug 1581240 - Return collected frames as a promise to JS r=bzbarsky,mstange,nika
The `setCompositionRecording` API on nsIDOMWindowUtils has been broken up into
two new APIs:

* `startCompositionRecording()`, which starts the composition recorder; and
* `stopCompositionRecording(bool writeToDisk)` which stops the composition
  recorder and either returns a Promise that resolves to the collected frames
  or returns a Promise that resolves when the frames have been written to disk.

The collected frames are serialized over IPC as part of a Shmem as to not
approach the IPC data transfer limit.

Differential Revision: https://phabricator.services.mozilla.com/D47818

--HG--
extra : moz-landing-system : lando
2019-11-07 22:35:04 +00:00
Daniel Varga
8afb8d99f1 Backed out 4 changesets (bug 1581240) for build bustage with error: implicit instantiation of undefined template 'nsTString<char>. On a CLOSED TREE
Backed out changeset b73b86efe266 (bug 1581240)
Backed out changeset 17dd226e21ae (bug 1581240)
Backed out changeset e2fd47ff8a89 (bug 1581240)
Backed out changeset c0589670c762 (bug 1581240)
2019-11-07 01:31:57 +02:00
Barret Rennie
d9aec252da Bug 1581240 - Return collected frames as a promise to JS r=bzbarsky,mstange,nika
The `setCompositionRecording` API on nsIDOMWindowUtils has been broken up into
two new APIs:

* `startCompositionRecording()`, which starts the composition recorder; and
* `stopCompositionRecording(bool writeToDisk)` which stops the composition
  recorder and either returns a Promise that resolves to the collected frames
  or returns a Promise that resolves when the frames have been written to disk.

The collected frames are serialized over IPC as part of a Shmem as to not
approach the IPC data transfer limit.

Differential Revision: https://phabricator.services.mozilla.com/D47818

--HG--
extra : moz-landing-system : lando
2019-11-06 20:48:49 +00:00
Markus Stange
c0cdef1454 Bug 1592739 - Stop using the vibrant region as the transparent region. r=mattwoodrow
This code was assuming that the only non-opaque parts of compositor rendering would be the
parts of the window that had vibrancy. But now that the default window background is transparent,
we can have non-vibrant parts where we render into transparency. Dialog windows such as sheet
windows are an example of this.
So instead of using the non-vibrant region of the window as its opaque region, we now use
the region that is covered by opaque Gecko layers. This region is a lot more conservative:
For example, the main browser chrome is now entirely transparent, because the chrome's opaque
parts share a layer with its transparent parts.
As a result, this change slightly affects the CALayer partitioning in the main browser window:
The entire browser chrome is now transparent, not just the tab bar.
The web content area is still opaque.

I think this will be fine. The thing I'm most concerned about is that scrolling inside web
content might cause invalidations of pixels from the chrome, because then we'd recomposite
the CALayers that cover the vibrant tab bar. This doesn't seem to happen most of the time
though, from what I can tell.

Differential Revision: https://phabricator.services.mozilla.com/D51466

--HG--
extra : moz-landing-system : lando
2019-11-05 19:04:14 +00:00
Dan Glastonbury
45381819c6 Bug 1561179 - P1: Enable the creation of multiple VideoBridgeParent actors. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D50398

--HG--
extra : moz-landing-system : lando
2019-11-04 03:41:45 +00:00
Boris Chiou
29378ebb46 Bug 1429305 - Cache gfx path. r=hiro
We cache the path in AnimationInfo for layers, and in
CompsoitorAnimationStorage for web-renderer.

Differential Revision: https://phabricator.services.mozilla.com/D50013

--HG--
extra : moz-landing-system : lando
2019-10-31 21:36:39 +00:00
Boris Chiou
d546797708 Bug 1429305 - Add new layer messages for passing motion path info. r=hiro,mattwoodrow
This also includes the implementation of SetAnimatable, FromAnimatable,
and merge the final matrix with motion path.

Besides, we always use PathBuilderSkia for calculating the gfx::Path for
web-renderer.

Differential Revision: https://phabricator.services.mozilla.com/D50011

--HG--
extra : moz-landing-system : lando
2019-10-31 20:07:41 +00:00
Razvan Maries
cdb80ead85 Backed out 6 changesets (bug 1561179) for perma fails on browser_timeout_throttling_with_audio_playback.js. CLOSED TREE
Backed out changeset 5d8059472045 (bug 1561179)
Backed out changeset 90c207dd2cc2 (bug 1561179)
Backed out changeset e90af73ef3c4 (bug 1561179)
Backed out changeset 4678da971197 (bug 1561179)
Backed out changeset 55340b999a4e (bug 1561179)
Backed out changeset 4037cce56491 (bug 1561179)
2019-10-31 03:21:24 +02:00
Dan Glastonbury
a98be7dd62 Bug 1561179 - P1: Enable the creation of multiple VideoBridgeParent actors. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D50398

--HG--
extra : moz-landing-system : lando
2019-10-30 23:48:25 +00:00
Lee Salzman
d7ccbd0261 Bug 1591996 - miscellaneous Gecko fixes for Skia m79 update. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D50825

--HG--
extra : moz-landing-system : lando
2019-10-28 21:42:48 +00:00
Markus Stange
64c13fc106 Bug 1587940 - Remove capability for opaque regions from NativeLayer interface. r=jrmuizel
This change makes opaqueness a boolean per layer again. The opaque region is
currently only used by the temporary WebRender code; the future WebRender code
won't use it. Removing this support simplifies the code and makes it easier to
implement clipping.

Differential Revision: https://phabricator.services.mozilla.com/D50722

--HG--
extra : moz-landing-system : lando
2019-10-29 19:24:24 +00:00
Emilio Cobos Álvarez
698db0028a Bug 1589327 - Remove some other various fennec-dependent code. r=snorp,botond
Some of this may be able to be cleaned up further.

Differential Revision: https://phabricator.services.mozilla.com/D49587

--HG--
extra : moz-landing-system : lando
2019-10-18 18:49:49 +00:00
alwu
d832456285 Bug 1579127 - only count the frame dropping due to system overload. r=mattwoodrow
When user adjusts the video playback rate, which might cause we sending images in a speed that is faster than the speend we composite images.

In this situation, the frame dropping actually won't cause any visual defect and we also don't want to report this frame dropping to user, because it's not caused by system overloading, it's just our compositor doesn't support compositing images in such a high rate.

Therefore, we should check if the dropped images are caused by system overload or high update rate, and only report the former to user.

Differential Revision: https://phabricator.services.mozilla.com/D46236

--HG--
extra : moz-landing-system : lando
2019-10-08 08:06:13 +00:00
Botond Ballo
7b097cc92f Bug 1552608 - Factor out a helper AsyncCompositionManager::ComputeFixedMarginsOffset(). r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D48376

--HG--
extra : moz-landing-system : lando
2019-10-07 21:52:49 +00:00
Botond Ballo
a3395bb518 Bug 1552608 - Use SideBits rather than int32_t to represent fixed-position sides in the Layers API. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D48374

--HG--
extra : moz-landing-system : lando
2019-10-07 21:03:52 +00:00
Botond Ballo
1273d512eb Bug 1552608 - Define AsyncCompositionManager::mFixedLayerMargins and its getter/setter on all platforms. r=tnikkel
It's still only used on Android, but keeping it and all code that interacts
with it inside an #ifdef is too much trouble for a tiny amount of space
saving.

Differential Revision: https://phabricator.services.mozilla.com/D48369

--HG--
extra : moz-landing-system : lando
2019-10-07 20:37:09 +00:00
Gurzau Raul
5a1b6187b8 Backed out changeset 348fa5ed7407 (bug 1579127) for image raster crashes on a CLOSED TREE. 2019-10-02 12:38:29 +03:00
alwu
8839b4e88b Bug 1579127 - only count the frame dropping due to system overload. r=mattwoodrow
When user adjusts the video playback rate, which might cause we sending images in a speed that is faster than the speend we composite images.

In this situation, the frame dropping actually won't cause any visual defect and we also don't want to report this frame dropping to user, because it's not caused by system overloading, it's just our compositor doesn't support compositing images in such a high rate.

Therefore, we should check if the dropped images are caused by system overload or high update rate, and only report the former to user.

Differential Revision: https://phabricator.services.mozilla.com/D46236

--HG--
extra : moz-landing-system : lando
2019-10-02 01:23:47 +00:00
Botond Ballo
6db92a9d0e Bug 1584691 - Reinstate support for scrollbar layers that are descendants of the scrolled content. r=tnikkel
This layer structure can still occur in cases where we place the RCD-RSF
scroll metadata on the root layer as a fallback.

Differential Revision: https://phabricator.services.mozilla.com/D47655

--HG--
extra : moz-landing-system : lando
2019-09-30 19:12:16 +00:00
Martin Stransky
d3e64dee66 Bug 1578380 - [Wayland] Use WaylandDMABUF texure backend on Wayland when DMABuf is enabled, r=sotaro
Depends on D46840

Differential Revision: https://phabricator.services.mozilla.com/D46841

--HG--
extra : moz-landing-system : lando
2019-09-24 11:06:39 +00:00
Oana Pop Rus
a22fdc5e79 Backed out 8 changesets (bug 1578380) for causing build bustages in ContentClient.cpp on a CLOSED TREE
Backed out changeset 28c2e884d20a (bug 1578380)
Backed out changeset 373c4563e9fd (bug 1578380)
Backed out changeset 3fdbc241d63a (bug 1578380)
Backed out changeset 754865b2810f (bug 1578380)
Backed out changeset b80b7e186f02 (bug 1578380)
Backed out changeset 3a8abb5d7a43 (bug 1578380)
Backed out changeset 2b52c3d15b7b (bug 1578380)
Backed out changeset ca57727c3aad (bug 1578380)
2019-09-24 13:06:55 +03:00
Martin Stransky
e968a933f9 Bug 1578380 - [Wayland] Use WaylandDMABUF texure backend on Wayland when DMABuf is enabled, r=sotaro
Depends on D46840

Differential Revision: https://phabricator.services.mozilla.com/D46841

--HG--
extra : moz-landing-system : lando
2019-09-24 09:10:11 +00:00
Botond Ballo
2641cbd682 Bug 1577859 - Additional post container scrolling removal cleanup in APZ code. r=tnikkel
With container scrolling, layers that are fixed wrt. the RCD-RSF are no
longer descendants of layers with RCD-RSF metadata. This allows us to remove
some code that handles this case in AsyncCompositionManager.

In particular, when ApplyAsyncContentTransformToTree() calls
AlignFixedAndStickyLayers():

  - If we are currently processing a layer with RCD-RSF metadata,
    AlignFixedAndStickyLayers() will not do anything (because there will be
    no descendants fixed wrt. the RCD-RSF), so it doesn't matter what
    transform we pass to AlignFixedAndStickyLayers().

  - If we are processing a different layer, then Metrics().IsRootContent()
    will be false, so GetCurrentAsyncTransformForFixedAdjustment()
    simplifies to just GetCurrentAsyncTransform().

As a result, GetCurrentAsyncTransformForFixedAdjustment() (and its helper
GetCurrentAsyncViewportTransform()) can be removed, and its use replaced
with GetCurrentAsyncTransform().

Differential Revision: https://phabricator.services.mozilla.com/D45595

--HG--
extra : moz-landing-system : lando
2019-09-15 23:34:13 +00:00
Botond Ballo
f94ae56498 Bug 1577859 - Stop handling scrollbar layers that are descendants of the scrolled content. r=tnikkel
With containerless scrolling, scrollbar layers and their target scrolled layers
will be in sibling subtrees.

Depends on D45596

Differential Revision: https://phabricator.services.mozilla.com/D45918

--HG--
extra : moz-landing-system : lando
2019-09-15 21:50:10 +00:00
Botond Ballo
3a1c85bca4 Bug 1577859 - Remove the layout.scroll.root-frame-containers pref and code that depends directly on it. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D45198

--HG--
extra : moz-landing-system : lando
2019-09-15 17:01:22 +00:00
Bob Owen
f5e4873899 Bug 1575874: Create the CanvasTranslator on the Compositor thread to prevent race with WaitForSurfaceDescriptor. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D43774

--HG--
extra : moz-landing-system : lando
2019-09-10 02:06:28 +00:00
Gerald Squelart
95f77c2409 Bug 1576819 - Use PROFILER_ADD_MARKER{,_WITH_PAYLOAD} everywhere - r=gregtatum
All calls to `profiler_add_marker()` (outside of the profilers code) are
now replaced by either:
- `PROFILER_ADD_MARKER(name, categoryPair)`
- `PROFILER_ADD_MARKER_WITH_PAYLOAD(name, categoryPair, TypeOfMarkerPayload,
                                    (payload, ..., arguments))`

This makes all calls consistent, and they won't need to prefix the category pair
with `JS::ProfilingCategoryPair::`.

Also it will make it easier to add (and later remove) internal-profiling
instrumentation (bug 1576550), and to replace heap-allocated payloads with
stack-allocated ones (bug 1576555).

Differential Revision: https://phabricator.services.mozilla.com/D43588

--HG--
extra : moz-landing-system : lando
2019-09-04 07:56:51 +00:00
Markus Stange
8b10792aed Bug 1578305 - Remove debug overlay layers in LayerManagerComposite::Destroy(). r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D44409

--HG--
extra : moz-landing-system : lando
2019-09-03 00:33:31 +00:00
Eric Rahm
c5497a628a Bug 1577916 - Remove using namespace std from gfx/layers r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D44285

--HG--
extra : moz-landing-system : lando
2019-09-02 17:38:31 +00:00
Coroiu Cristina
7b22710544 Backed out changeset 6e0fb526633d (bug 1577916) for build bustage at gfx/layers/composite/TextRenderer.cpp on a CLOSED TREE 2019-09-02 20:15:28 +03:00