Commit Graph

36750 Commits

Author SHA1 Message Date
Sylvestre Ledru
34acbb653a Bug 1619165 - Reformat recent changes to the Google coding style r=andi
First reformat with clang-format 10

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D68802
2020-04-25 09:40:08 +00:00
Simon Giesecke
2d8c4390b7 Bug 1628715 - Part 15: Replace MOZ_NONNULL_RETURN by returning NotNull<elem_type*>. r=xpcom-reviewers,necko-reviewers,dragana,nika
Differential Revision: https://phabricator.services.mozilla.com/D71300
2020-04-24 13:35:27 +00:00
Simon Giesecke
c0341c3791 Bug 1628715 - Part 10: Activate nodiscard attributes on AppendElement(s). r=xpcom-reviewers,nika,peterv
Differential Revision: https://phabricator.services.mozilla.com/D70834
2020-04-24 14:34:15 +00:00
Simon Giesecke
191a830575 Bug 1628715 - Part 7: Add MOZ_NONNULL_RETURN to infallible nsTArray::AppendElements. r=xpcom-reviewers,necko-reviewers,nika,valentin
Differential Revision: https://phabricator.services.mozilla.com/D70831
2020-04-24 13:31:14 +00:00
sotaro
74fce68a04 Bug 1632096 - Forward WebRender gl(ANGLE) error message to gfx critical note r=gw
Differential Revision: https://phabricator.services.mozilla.com/D72123
2020-04-24 11:32:05 +00:00
Nicolas Silva
505c116b8f Bug 1612440 - Discard the SpatialTree's frame state after scene swap. r=gw
The information comes with SetDisplayList messages but was applied before scene building instead of during scene swap, which breaks the transaction model and looks like a bug.

Differential Revision: https://phabricator.services.mozilla.com/D71934
2020-04-23 20:39:35 +00:00
Narcis Beleuzu
3eaaf8fd77 Backed out changeset d84032238d5f (bug 1632096) for bustages on GLContext.h . CLOSED TREE 2020-04-24 05:46:10 +03:00
sotaro
41ebbb733f Bug 1632096 - Forward WebRender gl(ANGLE) error message to gfx critical note r=gw
Differential Revision: https://phabricator.services.mozilla.com/D72123
2020-04-23 22:58:27 +00:00
Glenn Watson
31dabce5a8 Bug 1632409 - Separate image mask API from the generic clip API in WR. r=kats
Separating out the generic clip definition API into image masks
(and other types in future) makes the serialized data smaller. More
importantly, it will allow us to simplify some of the WR clip internals
in future and optimize the performance spent in clip chain handling.

Differential Revision: https://phabricator.services.mozilla.com/D72125
2020-04-23 20:44:21 +00:00
Glenn Watson
a252244f3c Bug 1632389 - Remove image mask support from scroll layer API. r=nical
This is not used, so we can remove it as the first part of modifying
the public clip API in order to allow some internal optimizations.

If callers ever want to make use of this in future, it can be
achieved by placing an image mask clip node in the clip chain for
the primitives in the scroll layer.

Differential Revision: https://phabricator.services.mozilla.com/D72099
2020-04-23 11:39:42 +00:00
Dzmitry Malyshau
01bd7e3c8a Bug 1632323 - Separate WebGPU internal usage bits from the public API r=groves
Differential Revision: https://phabricator.services.mozilla.com/D72065
2020-04-23 15:52:01 +00:00
Jamie Nicol
f9253cf629 Bug 1632444 - Correctly detect target OS when deciding what shaders to optimize. r=jrmuizel
A previous patch attempted to optimize only GL or GLES shaders,
depending on the target platform. However, it was trying to detect the
platform by using `cfg!(target_os = {})`, but as this is in a
build script that actually detects the host platform instead. This
resulted in the wrong version of shaders being optimized, and
therefore falling back to unoptimized shaders at runtime.

This fix uses `env::var("CARGO_CFG_TARGET_OS")` instead, which works
correctly in build scripts.

Differential Revision: https://phabricator.services.mozilla.com/D72127
2020-04-23 12:23:35 +00:00
Nicolas Silva
20be49d861 Bug 1612440 - Separate scene and frame related data in DocumentView. r=gw
DocumentView has a mix of members that affect scene building and memebers that change frame to frame. These need to be updated at different rates and more importantly follow the respective flow of scene and frame transactions, which wasn't done properly before this change.

Depends on D71781

Differential Revision: https://phabricator.services.mozilla.com/D71927
2020-04-22 19:41:21 +00:00
Nicolas Silva
eef976c85a Bug 1612440 - Move some scene-related transaction handling code to the scene builder thread. r=gw
The goal is to move this code out of the render backend to avoid requiring the messages to transit through this thread. Other similar changes are in progress.

Differential Revision: https://phabricator.services.mozilla.com/D71781
2020-04-22 12:04:14 +00:00
Robert Mader
cd16f095fa Bug 1632137 - Do not require GL compat profile for Webrender, r=jgilbert
This mirrors GLX behaviour.

Differential Revision: https://phabricator.services.mozilla.com/D71993
2020-04-22 20:25:44 +00:00
Glenn Watson
ff2b478716 Bug 1624988 - Improve inflation factor calculation for drop-shadows. r=kvark
Include the inflation factor from all drop-shadow filters when
calculating the overall inflation factor for a surface.

This doesn't fix cases with large offsets, which is a larger amount
of work to fix, but it fixes the common case and the referenced
case in this bug.

Differential Revision: https://phabricator.services.mozilla.com/D71878
2020-04-22 20:54:55 +00:00
Stefan Hindli
ff96217137 Backed out changeset f75deee57611 (bug 1624988) for wrench bustages CLOSED TREE 2020-04-22 23:42:32 +03:00
Glenn Watson
d251a60158 Bug 1624988 - Improve inflation factor calculation for drop-shadows. r=kvark
Include the inflation factor from all drop-shadow filters when
calculating the overall inflation factor for a surface.

This doesn't fix cases with large offsets, which is a larger amount
of work to fix, but it fixes the common case and the referenced
case in this bug.

Differential Revision: https://phabricator.services.mozilla.com/D71878
2020-04-22 14:26:21 +00:00
Kartikaya Gupta
17a76bc82d Bug 1627716 - Remove unused constants. r=geckoview-reviewers,agi
Depends on D71779

Differential Revision: https://phabricator.services.mozilla.com/D71780
2020-04-22 11:50:41 +00:00
Kartikaya Gupta
761f671816 Bug 1627716 - Remove some leftover IPC functions. r=botond
Depends on D71778

Differential Revision: https://phabricator.services.mozilla.com/D71779
2020-04-22 16:40:52 +00:00
Kartikaya Gupta
2f35aa94fe Bug 1627716 - Remove APZ/composition code related to DynamicToolbarAnimator. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D71778
2020-04-22 17:30:50 +00:00
Kartikaya Gupta
c840d0f81a Bug 1627716 - Remove now-unused SetRenderOffset code related to DynamicToolbarAnimator. r=jrmuizel
Depends on D71776

Differential Revision: https://phabricator.services.mozilla.com/D71777
2020-04-22 11:50:40 +00:00
Jamie Nicol
7beb14ca46 Bug 1631778 - Only optimize shaders for expected GL version on each platform r=jrmuizel
The full set of optimized shaders can be quite large, so only optimize
for the GL version we expect to be used on the target platform. That
is GLES on Android and Windows (where we presume ANGLE is being used),
and GL elsewhere.

If a different GL version is used we will simply fall back to the
unoptimized shaders.

Depends on D71905

Differential Revision: https://phabricator.services.mozilla.com/D71945
2020-04-22 17:16:48 +00:00
Dzmitry Malyshau
4b29474d3f Bug 1630813 - Remove gfx/wgpu/wgpu-native, move wgpu-remote out into gfx/wgpu_bindings r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D71699
2020-04-22 15:35:13 +00:00
Botond Ballo
74925f0fa3 Bug 1632042 - Fix inclusion of APZUtils.h in APZInputBridge.h. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D71880
2020-04-22 08:16:15 +00:00
Kartikaya Gupta
7b824820e7 Bug 1632180 - Update docker image and environment used for WebRender CI on Github to include clang. r=jnicol
Differential Revision: https://phabricator.services.mozilla.com/D71965
2020-04-22 14:52:24 +00:00
Jamie Nicol
5acad1e764 Bug 1631778 - Ensure webrender's shaders.rs is filled deterministically. r=jrmuizel
The list of pre-optimized shaders was being generated in a
non-deterministic order, causing large build time regressions. This
sort the list of shaders before writing them to the shaders.rs file.

Differential Revision: https://phabricator.services.mozilla.com/D71905
2020-04-22 13:51:13 +00:00
Jamie Nicol
c4506737ea Bug 1620014 - Snap animated transform offsets in webrender. r=aosmond
In bug 1589669 we ensured that webrender snaps the asynchronous scroll
offset correctly. Prior to that, the fractional offsets of picture
cache tiles were changing every frame, leading to excessive picture
cache invalidation. Since then, however, we have landed bug 1609002,
which made it so that asynchronous scrolling is split in to the scroll
offset and the visual viewport transform. The visual viewport
transform is sent to webrender as an animated transform property, and
since this was not being snapped it regressed the picture caching
invalidation fix. This change ensures that offset is snapped
correctly.

Differential Revision: https://phabricator.services.mozilla.com/D71920
2020-04-22 12:41:55 +00:00
Sam Dalton
522abc8e0e Bug 1626784 - Changed FPSCounter.cpp to check for emptiness with .empty() instead of .size() r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D69751
2020-04-22 12:56:01 +00:00
Nicolas Silva
3a6da68bf2 Bug 1612440 - Wrap the shared font instance map to a type exposed in the api crate. r=gw
This is a small preliminary refactoring that will be needed to let the api talk to the scene builder thread.

Differential Revision: https://phabricator.services.mozilla.com/D71325
2020-04-22 08:49:38 +00:00
Nicolas Silva
119986111e Bug 1631039 - Remove WebRender's recording infrastructre. r=gw
The code is untested, and mostly obsoleted by (multi) frame captures.
Also it gets in the way of some other changes I need to make.

Differential Revision: https://phabricator.services.mozilla.com/D71372
2020-04-22 08:49:38 +00:00
Nicolas Silva
4f156a4330 Bug 1612440 - Don't implement Serialize/Deserialize in some parts of th API. r=gw
Now that the capture code is gone, we don't use these serde implementations. They get in the way of changing the way transactions are represented so I'd like to remove a bunch of them for now.

Differential Revision: https://phabricator.services.mozilla.com/D71604
2020-04-22 08:48:24 +00:00
Lee Salzman
cc83337f4b Bug 1632025 - fix SWGL shader key parsing. r=jimb
Differential Revision: https://phabricator.services.mozilla.com/D71874
2020-04-22 03:39:21 +00:00
sotaro
7769346520 Bug 1631753 - Rename DCLayer to DCTile r=gw
Differential Revision: https://phabricator.services.mozilla.com/D71744
2020-04-21 19:40:55 +00:00
Bogdan Tara
245fef246f Backed out changeset 2c50d92db013 (bug 1631687) for reftests failures on default-subregion.svg and mix-blend-mode-and-filter.svg CLOSED TREE 2020-04-22 00:49:49 +03:00
Glenn Watson
ff1ce2738f Bug 1631687 - Remove per-primitive surface inflation r=kvark
It's no longer required, since we inflate the picture and
surface rects directly.

Differential Revision: https://phabricator.services.mozilla.com/D71712
2020-04-21 12:40:48 +00:00
Jonathan Kew
659072f6d9 Bug 1631419 - Don't try to pass a dash array of > 16 elements to ExtCreatePen. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D71784
2020-04-21 17:30:53 +00:00
Lee Salzman
a8641e2018 Bug 1622826 - stop gfxFontInfoLoader on xpcom-shutdown. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D71684
2020-04-21 12:07:58 +00:00
Daosheng Mu
2b669b7fa8 Bug 1631635 - Implement IsPositionEmulated for XRInputSource. r=kip,imanol
Differential Revision: https://phabricator.services.mozilla.com/D71678
2020-04-21 11:17:34 +00:00
Glenn Watson
92bbbc45cb Bug 1631678 - Instrument some more parts of WR with profiler scopes r=nical
Differential Revision: https://phabricator.services.mozilla.com/D71703
2020-04-21 11:10:07 +00:00
Jamie Nicol
8f5b537943 Bug 1604615 - Adjust reftest expectations. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D70034
2020-04-21 10:32:23 +00:00
Jamie Nicol
d9a1b3bbde Bug 1604615 - Use optimized shader source in webrender. r=jrmuizel
Add a gecko pref "gfx.webrender.use-optimized-shaders". If enabled,
then when attempting to compile a webrender shader first look for the
optimized source. If the optimized source is not present, emit a
warning and fall back to the unoptimized source.

Use the optimized source by default in wrench, and add the flag
"--use-unoptimized-shaders" to override this.

Differential Revision: https://phabricator.services.mozilla.com/D70033
2020-04-21 10:32:15 +00:00
Jamie Nicol
f548e9a284 Bug 1604615 - Optimize webrender shaders at build time. r=gw
Move more shader parsing code to webrender_build, so it can be used
both at runtime and build time.

At build time optimize a set of shaders and feature flag combinations,
using glslopt. Some features are skipped because they are not
supported by the gl version, because the optimizer does not support
them, or because webrender does not need them currently.

Use build-parallel to ensure the optimization is performed in parallel
using the make jobserver. Write the optimized shader source to a
hashmap to be used at runtime, in addition to the unoptimized source.

Differential Revision: https://phabricator.services.mozilla.com/D70032
2020-04-21 10:32:03 +00:00
Jamie Nicol
b3f0dc3a6a Bug 1604615 - Add glslopt and build-parallel as build dependencies of webrender. r=jrmuizel
Update Cargo.lock files and vendor sources in to tree.

Differential Revision: https://phabricator.services.mozilla.com/D70030
2020-04-21 10:31:46 +00:00
Martin Stransky
e3d81b0f91 Bug 1474281 - Make EGL-provider support OGL. r=jgilbert
In the past EGL only supported GLES, not OGL. This has not been true
for a very long time, so lets support OGL context creation in the EGL
backend.

This allows e.g. the Wayland backend to use OGL contexts, which brings
it on par with the X11/GLX backend.

Differential Revision: https://phabricator.services.mozilla.com/D48096
2020-04-21 05:43:35 +00:00
Andrew Osmond
84731cd82b Bug 1561367 - Implement initial support for capturing multiple frames. r=kvark
This patch adds support for the capture and replaying of multiple frames
during normal operation of Firefox. Ctrl + Shift + 6 starts capturing
and pressing it again stops capturing. It attempts to capture the minimum
amount of data required to replay a sequence for debugging purposes.

There are several known limitations, particularly surrounding replaying
when transitioning between snapshots of the resource cache. It will
reload the entire document set, causing greater delay between frames.
Should you advance too quickly, it may also panic due to a race between
the current frame still being generated, and the new frame resetting the
resource cache state. These should be resolved with time, and the
current implementation should be workable to at least capture/debug most
animated issues with some effort.

It also adds support for loading dynamic properties which is necessary
for accurate replaying of a captured frame (sequence or individual)
which are in the middle of an animation.

Differential Revision: https://phabricator.services.mozilla.com/D59755
2020-04-20 16:03:53 +00:00
Dzmitry Malyshau
02f2325796 Bug 1630072 - WebGPU CanvasContext invalidation r=jgilbert,aosmond
This change enables light tracking of the commands and submissions
that affect a CanvasContext. Upon reaching the GPUQueue, they send
a signal for the parent HTML Element to be invalidated.
We are also invalidating the HTML Element and requesting a new
frame to be built on the creation of the swapchain.

Differential Revision: https://phabricator.services.mozilla.com/D71194
2020-04-20 23:50:04 +00:00
Simon Sapin
67c676d9a7 Bug 1631579 - Remove webrender::RendererKind r=gfx-reviewers,kvark
It appears to be unused since 2017 with https://github.com/servo/webrender/pull/1587

Differential Revision: https://phabricator.services.mozilla.com/D71647
2020-04-20 20:32:27 +00:00
sotaro
126d45bceb Bug 1631355 - Remove non virtual surface implementation from DCLayerTree r=gw
Virtual surface implementation is stable now. Removing non virtual surface implementation could simplify DCLayerTree.

Differential Revision: https://phabricator.services.mozilla.com/D71506
2020-04-20 20:01:42 +00:00
Jim Blandy
9e873c150c Bug 1631168: Address GCC warnings in SWGL. r=lsalzman
Add `UNUSED` marker to `gl.cc` function arguments.

Add GCC pragmas to ignore `-Wunused-parameter` and `-Wunused-but-set-variable`
warnings in the generated shaders. Since these are generated from GLSL, it is
hard to avoid the warnings by changing the code itself.

Avoid uninitialized values in `vec4::operator[]`.

Differential Revision: https://phabricator.services.mozilla.com/D71445
2020-04-20 20:54:55 +00:00