composite_simple() calculates combined dirty rect from all tile's dirty rect. But the combined dirty rect becomes invalid when there is an old tile that was dropped. The dropped tile's dirty rect is not counted in composite_simple().
Differential Revision: https://phabricator.services.mozilla.com/D62531
--HG--
extra : moz-landing-system : lando
With this patch, a minimal valid rect is calculated for each
picture cache tile. This is used to reduce the scissor rect
during tile rasterization, and the draw rect during tile
compositing, whenever there is a partial tile.
Differential Revision: https://phabricator.services.mozilla.com/D62177
--HG--
extra : moz-landing-system : lando
For Draw (non-native) and CA modes, we include the per-tile
valid rect in the clip rect from the surface.
For DC (non-virtual) mode, a per-tile clip rect is set on the
visual for each tile, separate from the overall clip rect that
is set on the surface visual.
For DC (virtual) mode, the Trim API is used to remove pixels
in the virtual tile area that are outside the valid / clipped
region.
Note: Although the valid rect is now applied in the native
compositors, it's currently only based on the overall picture
cache bounding rect. Thus, with this patch there isn't any
noticeable performance improvement. Once this lands and is
working correctly, the follow up patch to calculate a smaller
valid region per-tile is a small amount of work.
Differential Revision: https://phabricator.services.mozilla.com/D61424
--HG--
extra : moz-landing-system : lando
I think this probably only shows up with fission oop iframes, tabs probably avoid this path.
The problem occurs when we reconstruct the containing iframe for a style change, we briefly hide the child document, clearing the display list on the parent via ClearCachedResources. Then show it again, we attempt an empty transaction and this succeeds because there is nothing to stop it. (The non-wr case fails because the layer contents are missing and that causes the empty transaction to fail.)
So keep track if we have sent a display list to the parent to allow/disallow an empty transaction.
This fixes a couple webrender+fission reftest failures but it's also a general rendering bug in webrender+fission reproducible in a regular browser.
Differential Revision: https://phabricator.services.mozilla.com/D61577
--HG--
extra : moz-landing-system : lando
I think this probably only shows up with fission oop iframes, tabs probably avoid this path.
The problem occurs when we reconstruct the containing iframe for a style change, we briefly hide the child document, clearing the display list on the parent via ClearCachedResources. Then show it again, we attempt an empty transaction and this succeeds because there is nothing to stop it. (The non-wr case fails because the layer contents are missing and that causes the empty transaction to fail.)
So keep track if we have sent a display list to the parent to allow/disallow an empty transaction.
This fixes a couple webrender+fission reftest failures but it's also a general rendering bug in webrender+fission reproducible in a regular browser.
Differential Revision: https://phabricator.services.mozilla.com/D61577
--HG--
extra : moz-landing-system : lando
So as to avoid UB. It is somewhat unfortunate/dumb the fact that we need to do
this and we can't detect when we forget to do it :(
Give it uint8_t as it's type as that's enough and consistent with LogicalSide.
Differential Revision: https://phabricator.services.mozilla.com/D62390
--HG--
extra : moz-landing-system : lando
When BasicCompositor is used, BasicCompositor does not use CompositorWindow.
Differential Revision: https://phabricator.services.mozilla.com/D61345
--HG--
extra : moz-landing-system : lando
This is another one which is included everywhere. If the OOL call mattered we
could move these to a different header or something, but I suspect it won't.
Differential Revision: https://phabricator.services.mozilla.com/D62173
--HG--
extra : moz-landing-system : lando
We include it everywhere because it's included from gfxTypes.h.
This should avoid including all the generated bindings _everywhere_.
Differential Revision: https://phabricator.services.mozilla.com/D62174
--HG--
extra : moz-landing-system : lando
In bug 1578329 I introduced two scoping mistakes:
- A marker was made to have a shorter duration.
- A label was scoped too short and so would most likely be missed during
sampling.
This patch reverts to the original wider scope.
Differential Revision: https://phabricator.services.mozilla.com/D62274
--HG--
extra : moz-landing-system : lando
Fourth iteration: improve the detail in reported tile invalidations.
The invalidation enum stores the old and new values for lightweight
types. For a change in PrimCount, the old and new list of ItemUids is
stored (if logging is enabled); the tool can then diff the two to see
what was added and removed. To convert that back into friendly strings,
the interning activity is used to build up a map of ItemUid to a string.
A similar special-casing of Content Descriptor will print the item
that's invalidating the tile, plus the origin and/or rectangle.
Also adding zoom and pan command line options both to fix high-DPI
issues and also to allow zooming out far enough to see out-of-viewport
cache lifetime and prefetching due to scrolling.
Also fix a bug where interning updates get lost if more than one update
happens without building a frame: switch to a vector of serialized
updatelists (one per type) instead of allowing just one string (per
type).
Differential Revision: https://phabricator.services.mozilla.com/D61656
--HG--
extra : moz-landing-system : lando
The test is meant to check that tupes work and a tuple of a single element needs a comma to differentiate it from just being the element.
Differential Revision: https://phabricator.services.mozilla.com/D61681
--HG--
extra : moz-landing-system : lando
This ensures that even if APZ is force-disabled, the permanent offset between
the visual and layout viewports is preserved during rendering.
Differential Revision: https://phabricator.services.mozilla.com/D62094
--HG--
extra : moz-landing-system : lando
Bug 1609002 made it so that the async scroll offset sent to webrender
is taken from only the layout component of the async transform, rather
than the combined layout and visual components. The consequence of
this is that the layout-only transform is in LayerPixel space (and
unnaffected by the async zoom) rather than ParentLayerPixel
space (which is affected by async zoom).
To convert the value to LayoutDevicePixel space, as webrender expects,
we were dividing by the pinch zoom scale, which includes the async
zoom. This was causing content to jump around whilst async panning and
zooming, as the scroll offset was incorrectly scaled. This is fixed
by instead dividing by the cumulative resolution, which does not
include the async zoom.
Differential Revision: https://phabricator.services.mozilla.com/D61787
--HG--
extra : moz-landing-system : lando
Bug 1609002 made it so that the async scroll offset sent to webrender
is taken from only the layout component of the async transform, rather
than the combined layout and visual components. The consequence of
this is that the layout-only transform is in LayerPixel space (and
unnaffected by the async zoom) rather than ParentLayerPixel
space (which is affected by async zoom).
To convert the value to LayoutDevicePixel space, as webrender expects,
we were dividing by the pinch zoom scale, which includes the async
zoom. This was causing content to jump around whilst async panning and
zooming, as the scroll offset was incorrectly scaled. This is fixed
by instead dividing by the cumulative resolution, which does not
include the async zoom.
Differential Revision: https://phabricator.services.mozilla.com/D61787
--HG--
extra : moz-landing-system : lando
To avoid computing transform bounds over and over. It is generally just better.
Replace the various "overridebounds" thingies by using the "fallback" of the
transform-reference-box code which we need anyway.
Differential Revision: https://phabricator.services.mozilla.com/D61890
--HG--
extra : moz-landing-system : lando
Implement WaylandDMABUFSurfaceImage which is backed by dma buf memory on Wayland and it holds
decoded video images produced by ffmpeg va-api decoder.
Differential Revision: https://phabricator.services.mozilla.com/D61678
--HG--
extra : moz-landing-system : lando
Implement WaylandDMABUFSurfaceImage which is backed by dma buf memory on Wayland and it holds
decoded video images produced by ffmpeg va-api decoder.
Differential Revision: https://phabricator.services.mozilla.com/D61678
--HG--
extra : moz-landing-system : lando
This patch adds reporting the surface types used by the image frame in a
bit mask (such if it is a CAPTURE including a DATA_SHARED, the mask will
be 1 << CAPTURE | 1 << DATA_SHARED), as well as an estimated size
included in the report as decoded-unknown for when we do not know if the
surface is on the heap or the non-heap specifically. This is the default
implementation for a SourceSurface as well, so we should no longer have
the case where surfaces appear empty despite being in the cache. It also
makes requests being validated as always notable for reporting purposes.
Differential Revision: https://phabricator.services.mozilla.com/D61458
--HG--
extra : moz-landing-system : lando
We will no longer allow OMTP on 32-bit systems with less than 2GB of RAM
and 2 or fewer cores. These systems are unlikely to realize a benefit
from OMTP and see a higher than normal incidence of OOM crashes in the
content process due to OMTP having a higher memory footprint.
Differential Revision: https://phabricator.services.mozilla.com/D60058
--HG--
extra : moz-landing-system : lando
We incorporate the reference frame origin offset for non-animated
transforms, but forgot for animated transforms. Since the offset itself
is not animated, we should still incorporate it into the snapping
transform.
Differential Revision: https://phabricator.services.mozilla.com/D61689
--HG--
extra : moz-landing-system : lando
The test is meant to check that tupes work and a tuple of a single element needs a comma to differentiate it from just being the element.
Differential Revision: https://phabricator.services.mozilla.com/D61681
--HG--
extra : moz-landing-system : lando
SyncObjectD3D11Host::Synchronize() calling in RenderCompositorANGLE::BeginFrame() is still necessary for D3D11DXVA2Manager::CopyToImage(). Then backout Bug 1596630.
Differential Revision: https://phabricator.services.mozilla.com/D61658
--HG--
extra : moz-landing-system : lando
We need a way to switch it on and off to compare the performance and power usage of various test cases.
The new pref is "webrender.enable-multithreading" and does not require a restart.
Differential Revision: https://phabricator.services.mozilla.com/D61589
--HG--
extra : moz-landing-system : lando
- Create new SharedSurfaceType called EGLSurfaceDMABUF
- Implement EGLSurfaceDMABUF by SharedSurfaceDMABUF which is backed by WaylandDMABufSurface.
It can be used by Wayland/EGL WebGL backend.
- It's disabled by default, can be enabled by widget.wayland_dmabuf_webgl.enabled pref.
Differential Revision: https://phabricator.services.mozilla.com/D60114
--HG--
extra : moz-landing-system : lando
No other items need to round their bounds/clips, and backdrop filters
should be no exception. They should trust scene building (and to a
lesser extent, frame building) to perform any necessary snapping. This
patch also removes the ToRoundedLayoutPoint/Rect methods as there are no
more users of the APIs, nor should there ever be.
Differential Revision: https://phabricator.services.mozilla.com/D61618
--HG--
extra : moz-landing-system : lando
addUpdateRect needs to be called after beginFrame, otherwise it doesn't do anything.
Differential Revision: https://phabricator.services.mozilla.com/D59155
--HG--
extra : moz-landing-system : lando
The CARenderer documentation does not provide any guidance on how to use CARenderer with different resolutions.
In the initial implementation I simply tried the following: Make a device-pixel sized framebuffer, call glViewport with the device pixel size, and then call glOrtho with the "point" size. And this seemed to work.
However, it doesn't always work. When hooking up profiler screenshots, I noticed that in some cases, some layers would just not be rendered. Sometimes I even saw layers show up in wrong places.
After this patch, these problems no longer appear.
Differential Revision: https://phabricator.services.mozilla.com/D59154
--HG--
extra : moz-landing-system : lando
In bug 1574493, we moved most snapping to scene building and a minority
to frame building. No snapping is done in the shader. However there was
some left over code that still tried to replicate the past behaviour and
this caused wobbling during the rendering. This patch removes the extra
snapping on the CPU side and trusts scene/frame building to do the job.
Differential Revision: https://phabricator.services.mozilla.com/D61590
--HG--
extra : moz-landing-system : lando
Webrender positions sticky items relative to the viewport rect set on
their ancestor scroll frame, which it expects to be in local
space. The viewport should be set to what gecko calls the scroll
frame's "scroll port" (relative to its reference frame).
Previously we were setting this to be `composition bounds /
resolution`, which gives the correct results at the initial zoom
level, but causes sticky items to jump around when the zoom
changes. This occurs because the composition bounds of the RCD-RSF do
not change as the zoom changes, and instead remain equal to the
widget's size.
The layout viewport remains at the correct size when zoomed, but
unfortunately doesn't have the correct origin. And FrameMetrics does
not provide the constant "initial zoom" value we require to obtain the
desired viewport rect from the composition bounds. To fix this we
therefore must query the scroll port and offset directly from the
scrollable frame, meaning the value remains correct even as the zoom
changes.
Differential Revision: https://phabricator.services.mozilla.com/D60970
--HG--
extra : moz-landing-system : lando
There's two potential cases handled by this patch:
(1) A scrollbar container followed by another scrollbar container.
In this case, we need to ensure these are placed into separate
clusters, even though the cluster flags otherwise match, to
ensure that slice creation will see the two clusters.
(2) If a fixed position scroll root trails a scrollbar container.
In this case, ensure that a scrollbar contains marks the
cluster flags to create a slice straight after the scrollbar,
to avoid other primitives with the same scroll root sneaking
into the scrollbar container.
Differential Revision: https://phabricator.services.mozilla.com/D61519
--HG--
extra : moz-landing-system : lando
This patch is generated via:
1. Manually modify gfx/2d/Types.h
2. Run the following script and clang-format.
3. Add brackets for the for loop in nsCSSRendering.cpp.
```
function rename() {
echo "Renaming $1 to $2"
rg -l "$1" | xargs sed -i -E -e s/"$1"/"$2"/g
}
rename "NS_FOR_CSS_HALF_CORNERS\(i\)" "for (const auto i : mozilla::AllPhysicalHalfCorners())"
rename "NS_FOR_CSS_HALF_CORNERS\(corner\)" "for (const auto corner : mozilla::AllPhysicalHalfCorners())"
```
Differential Revision: https://phabricator.services.mozilla.com/D61252
--HG--
extra : moz-landing-system : lando
This patch is generated via:
1. Manually modify gfx/2d/Types.h
2. Run the following script and clang-format.
```
function rename() {
echo "Renaming $1 to $2"
rg -l "$1" | xargs sed -i -E -e s/"$1"/"$2"/g
}
rename "NS_FOR_CSS_FULL_CORNERS\(i\)" "for (const auto i : mozilla::AllPhysicalCorners())"
rename "NS_FOR_CSS_FULL_CORNERS\(corner\)" "for (const auto corner : mozilla::AllPhysicalCorners())"
```
Differential Revision: https://phabricator.services.mozilla.com/D61251
--HG--
extra : moz-landing-system : lando
This patch is generated via:
1. Manually modify gfx/2d/Types.h
2. Run the following script and clang-format.
```
function rename() {
echo "Renaming $1 to $2"
rg -l "$1" | xargs sed -i -E -e s/"$1"/"$2"/g
}
rename "NS_FOR_CSS_SIDES\(side\)" "for (const auto side : mozilla::AllPhysicalSides())"
rename "NS_FOR_CSS_SIDES\(s\)" "for (const auto s : mozilla::AllPhysicalSides())"
rename "NS_FOR_CSS_SIDES\(i\)" "for (const auto i : mozilla::AllPhysicalSides())"
rename "NS_FOR_CSS_SIDES\(ix\)" "for (const auto ix : mozilla::AllPhysicalSides())"
```
Differential Revision: https://phabricator.services.mozilla.com/D61250
--HG--
extra : moz-landing-system : lando
This patch introduces a per-tile valid rect. In the initial implementation,
this only uses the bounds of the overall picture cache bounding rect. The
next part of this patch will make use of true per-tile valid regions, to
improve performance where there are holes in a single cache slice.
Differential Revision: https://phabricator.services.mozilla.com/D61378
--HG--
extra : moz-landing-system : lando
We want to use the same line decoration (dashed, dotted, wavy) shader code for
both horizontal and vertical lines, so it makes sense for them to use a
coordinate system that has been rotated (transposed, actually) so that .x always
runs parallel to the line being decorated, and .y is always perpendicular.
Before this patch, we passed the orientation enum as a vertex attribute, used a
switch to swap coordinates in the vertex shader, and then swapped them again in
the fragment shader.
This patch trades the orientation for a f32 'axis select' vertex attribute, and
uses `mix` to swap them in the vertex shader. Then no consideration is necessary
in the fragment shader: the vLocalPos varying is already in the appropriate form.
Since get_line_decoration_sizes is already thinking in terms of line-parallel
coordinates, it might seem like a good idea for decoration jobs to simply use
line-parallel coordinates throughout. However, this actually results in more
swapping and opportunities for confusion: much of the CPU work is concerned with
the rectangle the decoration's mask occupies in the texture cache, which is
axis-aligned.
Differential Revision: https://phabricator.services.mozilla.com/D60926
--HG--
extra : rebase_source : 8dcd8455c664067dd25f583c944d611a35c25e79
extra : source : dfb21632ea198c1acdc6a34ee08113d516f666d5
Without this change, get_line_decoration_sizes returns an (inline_size,
block_size) pair, where inline_size is parallel to the line being decorated, and
block_size perpendicular. However, these values are generally used as the
dimensions of an axis-aligned bounding box for the line, not as specific
parameters to the rendering process, so it makes sense to arrange them into a
LayoutSize value in this function, since it is already taking the orientation
into account anyway.
The caller, SceneBuilder::add_line, then doesn't need to swap the components,
and the adjustment of the clipping rectangle to avoid partial dots looks a bit
more natural: widths with widths, heights with heights.
Differential Revision: https://phabricator.services.mozilla.com/D60925
--HG--
extra : rebase_source : 093d572a7a35bddc6e070fc08d511f7f164a4d89
extra : source : 3549dd471446c291864822736f4587c81741cd56
We want to use the same line decoration (dashed, dotted, wavy) shader code for
both horizontal and vertical lines, so it makes sense for them to use a
coordinate system that has been rotated (transposed, actually) so that .x always
runs parallel to the line being decorated, and .y is always perpendicular.
Before this patch, we passed the orientation enum as a vertex attribute, used a
switch to swap coordinates in the vertex shader, and then swapped them again in
the fragment shader.
This patch trades the orientation for a f32 'axis select' vertex attribute, and
uses `mix` to swap them in the vertex shader. Then no consideration is necessary
in the fragment shader: the vLocalPos varying is already in the appropriate form.
Since get_line_decoration_sizes is already thinking in terms of line-parallel
coordinates, it might seem like a good idea for decoration jobs to simply use
line-parallel coordinates throughout. However, this actually results in more
swapping and opportunities for confusion: much of the CPU work is concerned with
the rectangle the decoration's mask occupies in the texture cache, which is
axis-aligned.
Differential Revision: https://phabricator.services.mozilla.com/D60926
--HG--
extra : moz-landing-system : lando
Without this change, get_line_decoration_sizes returns an (inline_size,
block_size) pair, where inline_size is parallel to the line being decorated, and
block_size perpendicular. However, these values are generally used as the
dimensions of an axis-aligned bounding box for the line, not as specific
parameters to the rendering process, so it makes sense to arrange them into a
LayoutSize value in this function, since it is already taking the orientation
into account anyway.
The caller, SceneBuilder::add_line, then doesn't need to swap the components,
and the adjustment of the clipping rectangle to avoid partial dots looks a bit
more natural: widths with widths, heights with heights.
Differential Revision: https://phabricator.services.mozilla.com/D60925
--HG--
extra : moz-landing-system : lando
We replace SetWidthIfLength and SetOffsetIfLength with ComputeDecorationLine{Thickness,Offset} functions,
and consolidate more of the computation of the offset within this function to simplify callers.
Differential Revision: https://phabricator.services.mozilla.com/D61454
--HG--
extra : moz-landing-system : lando
For zoomable APZCs, we were correctly dividing the scroll offset by
the pinch zoom scale. This is effectively equal to multiplying by the
device pixel ratio then dividing by the zoom, converting the offset
from parent layer space to layout device space.
However, for non-zoomable APZCs, we were incorrectly assuming that the
pinch zoom scale equalled 1.0. This was causing us to send incorrectly
scaled async scroll offsets to webrender, resulting in content moving
too slowly or quickly whilst asynchronously panning, then suddenly
jumping as the synchronous scroll offset caught up.
This is fixed by ensuring we always divide the asynchronous scroll
offset by the pinch zoom scale, regardless of whether the APZC is
zoomable or not.
Differential Revision: https://phabricator.services.mozilla.com/D61315
--HG--
extra : moz-landing-system : lando
SourceSurfaceCapture can contain an underlying surface instead of a set
of drawing commands. The surface has its own valid state, and must be
checked by the parent in SourceSurfaceCapture::IsValid. If we don't,
then we may end up failing silently while drawing, and images will go
missing. The underlying surface can be invalidated by a device reset if
it is a SourceSurfaceD2D1, as an example.
Differential Revision: https://phabricator.services.mozilla.com/D61245
--HG--
extra : moz-landing-system : lando
EGL_KHR_swap_buffers_with_damage (or EGL_EXT_swap_buffers_with_damage)
is an EGL extension that allows the application to inform the display
server (system compositor) which areas of the window have changed.
This commit implements support for that extension in the layers compositor.
The layers compositor always renders the whole frame, so we're only getting
the benefit of not redrawing unchanged areas *in the system compositor*,
not actually doing partial invalidation/compositing,
but that makes the implementation simpler (no need to track buffer age).
Differential Revision: https://phabricator.services.mozilla.com/D51517
--HG--
extra : moz-landing-system : lando
Previously, we would wait until the following frame (for uncertain reasons
that date back to B2G), but this meant the layout and visual viewports would
be out of sync for a frame, causing APZ to misbehave.
Differential Revision: https://phabricator.services.mozilla.com/D61286
--HG--
extra : moz-landing-system : lando
Some updates and clarifications after Glenn's All Hands 2020 overview
talk.
Differential Revision: https://phabricator.services.mozilla.com/D61270
--HG--
extra : moz-landing-system : lando
There is nothing clipping related in there anymore.
Differential Revision: https://phabricator.services.mozilla.com/D61178
--HG--
rename : gfx/wr/webrender/src/clip_scroll_tree.rs => gfx/wr/webrender/src/spatial_tree.rs
extra : moz-landing-system : lando
Third iteration:
Fix broken scrolling (and incorrect positioning of quad tree lines) by
serializing the SpaceMapper(-transform) from take_context, and using it
to transform the primitive rects (instead of the previous translation
based on unclipped.origin);
Note: this is done at visualization time and not at export time to
distinguish actually moving elements from merely-scrolling ones.
Serialize the entire UpdateList, so we get the data (Keys) that's being
added; add it to the overview;
Move the static CSS code into tilecache_base.css; add this and the .js
file to the binary, write them as part of output (instead of manual
copy); clean up CSS a bit;
Differential Revision: https://phabricator.services.mozilla.com/D61049
--HG--
extra : source : 535ae1d4818a3f0af64d61846035135751352bd1
extra : histedit_source : bf9a8f830ec7db4c2d1fcb6deaaf72949d6b69ed
Third iteration:
Fix broken scrolling (and incorrect positioning of quad tree lines) by
serializing the SpaceMapper(-transform) from take_context, and using it
to transform the primitive rects (instead of the previous translation
based on unclipped.origin);
Note: this is done at visualization time and not at export time to
distinguish actually moving elements from merely-scrolling ones.
Serialize the entire UpdateList, so we get the data (Keys) that's being
added; add it to the overview;
Move the static CSS code into tilecache_base.css; add this and the .js
file to the binary, write them as part of output (instead of manual
copy); clean up CSS a bit;
Differential Revision: https://phabricator.services.mozilla.com/D61049
--HG--
extra : moz-landing-system : lando
We currenly only support the dynamic toolbar at bottom, so we apply the
`fixed margin offset` only if the sticky element is stuck at the bottom
of the root scroll container.
Differential Revision: https://phabricator.services.mozilla.com/D60066
--HG--
extra : moz-landing-system : lando
nsRect's special member functions are pretty vanilla aside from the MOZ_COUNT_{C,D}TORs, so the copy assignment doesn't need to do anything unusual, but let's state so explicitly to please the compiler.
Differential Revision: https://phabricator.services.mozilla.com/D60991
--HG--
extra : moz-landing-system : lando
Adds support for bind groups and compute pipelines
The end goal of this PR is to run the compute example.
Differential Revision: https://phabricator.services.mozilla.com/D60746
--HG--
extra : moz-landing-system : lando
Adds support for bind groups and compute pipelines
The end goal of this PR is to run the compute example.
Differential Revision: https://phabricator.services.mozilla.com/D60746
--HG--
extra : moz-landing-system : lando
Second part: trace the updates that are sent to the DataStore, and save
at least the Insert/Remove and ItemUID as part of the wr-capture.
(We could expand this with more info, eg. the actual Keys, later).
TileView then reads them back and generates a color coded report to
overlay with the page view. This helps to see the types and amounts of
interned primitives that lead to cache invalidations.
Differential Revision: https://phabricator.services.mozilla.com/D60619
--HG--
extra : moz-landing-system : lando
On pages with many render tasks (typically a lot of text shadows), we spend a lot of time moving RenderTask which is a fairly large struct into the render graph's buffer. This patch avoids it by using the VecHelper trick of allocaitng space before initializing the value. Some RenderTask::new_* methods which take the render task graph in parameter were modified to add the task and return the task ID to work around borrow-checking restriction.
Differential Revision: https://phabricator.services.mozilla.com/D60854
--HG--
extra : moz-landing-system : lando
Second part: trace the updates that are sent to the DataStore, and save
at least the Insert/Remove and ItemUID as part of the wr-capture.
(We could expand this with more info, eg. the actual Keys, later).
TileView then reads them back and generates a color coded report to
overlay with the page view. This helps to see the types and amounts of
interned primitives that lead to cache invalidations.
Differential Revision: https://phabricator.services.mozilla.com/D60619
--HG--
extra : moz-landing-system : lando
The computation of the repetition depends on the aspect ratio of the segment's uv rectangle, which was previously represented by the dx/dy variables in the shader. These were mistakenly computing the ratio of the normalized uvs within the primitive's total uv rect, which was incorrect since the normalization introduces a non-uniform scale.
This patch fixes it by taking the uv size in device pixels instead of the the normalized textel rect. dx and dy are also renamed into segment_uv_size which is a more informative name.
Differential Revision: https://phabricator.services.mozilla.com/D60768
--HG--
extra : moz-landing-system : lando
Unlike the border areas that only nead their own dimensions, the middle area of a border-image determines its repetition parameter based on the size of the borders. A new flag is provided for the brush_image shader to know whether to use the segment's own rect or look at the borders when computing the pattern's size.
Differential Revision: https://phabricator.services.mozilla.com/D59675
--HG--
extra : moz-landing-system : lando
border-image-repeat: Round is equivalent to Repeat with the pattern size adjusted to fill the area with a whole number of repetitions. This is done by adjusting the segment's stretch_size in the shader so that it fits a whole number of times in the segment's size.
Differential Revision: https://phabricator.services.mozilla.com/D59370
--HG--
extra : moz-landing-system : lando
This is done by using CreateDataSourceSurfaceWithStrideFromData to create a
DataSourceSurface and then OptimizeSourceSurface to record and optimize that.
This means that we now only have SourceSurfaceRecording using SurfaceType
RECORDING. We then rely on this to improve the test in OptimizeSourceSurface to
check that a SourceSurfaceRecording is for its recorder.
Differential Revision: https://phabricator.services.mozilla.com/D60736
--HG--
extra : moz-landing-system : lando
Second part: trace the updates that are sent to the DataStore, and save
at least the Insert/Remove and ItemUID as part of the wr-capture.
(We could expand this with more info, eg. the actual Keys, later).
TileView then reads them back and generates a color coded report to
overlay with the page view. This helps to see the types and amounts of
interned primitives that lead to cache invalidations.
Differential Revision: https://phabricator.services.mozilla.com/D60619
--HG--
extra : moz-landing-system : lando
Second part: trace the updates that are sent to the DataStore, and save
at least the Insert/Remove and ItemUID as part of the wr-capture.
(We could expand this with more info, eg. the actual Keys, later).
TileView then reads them back and generates a color coded report to
overlay with the page view. This helps to see the types and amounts of
interned primitives that lead to cache invalidations.
Differential Revision: https://phabricator.services.mozilla.com/D60619
--HG--
extra : moz-landing-system : lando
We generate ByteBuf by rust bindgen, so we can drop StyleVecU8.
One potential follow-up is that we can merge this together with WrVecU8.
Differential Revision: https://phabricator.services.mozilla.com/D60328
--HG--
rename : ipc/glue/ByteBuf.h => ipc/glue/ByteBufUtils.h
extra : moz-landing-system : lando
Though this may make us use more space when serializing
StyleTransform, but we don't have to do extra conversion on the compostior
side, and this makes us easier to maintain the Rust type.
Differential Revision: https://phabricator.services.mozilla.com/D60045
--HG--
extra : moz-landing-system : lando
The only drawback is: we resolve LengthPercentage value before passing
translate property through IPC, so its percentage part is redundant.
However, this makes us easier to maintain the Rust type.
Differential Revision: https://phabricator.services.mozilla.com/D60044
--HG--
extra : moz-landing-system : lando
This allows calling code to specify whether a primitive would prefer
to be promoted to a compositor surface and/or picture cache slice.
This is a performance hint that can be used for large external
primitives, such as videos and canvas elements.
Differential Revision: https://phabricator.services.mozilla.com/D60637
--HG--
extra : moz-landing-system : lando
We generate ByteBuf by rust bindgen, so we can drop StyleVecU8.
One potential follow-up is that we can merge this together with WrVecU8.
Differential Revision: https://phabricator.services.mozilla.com/D60328
--HG--
rename : ipc/glue/ByteBuf.h => ipc/glue/ByteBufUtils.h
extra : moz-landing-system : lando
Though this may make us use more space when serializing
StyleTransform, but we don't have to do extra conversion on the compostior
side, and this makes us easier to maintain the Rust type.
Differential Revision: https://phabricator.services.mozilla.com/D60045
--HG--
extra : moz-landing-system : lando
The only drawback is: we resolve LengthPercentage value before passing
translate property through IPC, so its percentage part is redundant.
However, this makes us easier to maintain the Rust type.
Differential Revision: https://phabricator.services.mozilla.com/D60044
--HG--
extra : moz-landing-system : lando
This patch makes us use the correct intrinsic for loading a uint8x16
register. It is not entirely clear why clang accepts this without
complaint but beyond the types, it should be equivalent.
Differential Revision: https://phabricator.services.mozilla.com/D60667
--HG--
extra : moz-landing-system : lando
There are a number of issues with the current gradient dithering
implementation, that cause many test failures and also fuzziness
rendering when enabling DirectComposition virtual surfaces. In
particular, the dither result is dependent on the offset of the
update rect within a render target.
For now, this patch disables gradient dithering by default. This
gives us:
- A heap of new test PASS results (or reduced fuzziness).
- Fixes a number of non-deterministic fuzziness bugs with DC.
- Improves performance of gradient rendering by a reasonable amount.
We can fix gradient dithering as a follow up, and re-enable if/when
we find content that would benefit from it significantly (we may
be able to improve gradients in other ways than dithering too).
Differential Revision: https://phabricator.services.mozilla.com/D60460
--HG--
extra : moz-landing-system : lando
The semantics of the inaccuracy reftest mode are that the overall
test succeeds as long as one of the multiple test images mismatches
the reference image.
However, the previous implementation would print an unexpected result
if any of the comparisons were equal (even though the overall test
result would be reported correctly).
This patch changes wrench so that it only reports an unexpected
failure for the overall test, not each individual reference.
Differential Revision: https://phabricator.services.mozilla.com/D60564
--HG--
extra : moz-landing-system : lando
For safe area insets (cutout) support, CSS Round Display Level 1 (https://drafts.csswg.org/css-round-display/#viewport-fit-descriptor) has new viewport value as `viewport-fit`.
To support safe area insets that is notch on display, CSS Environment Variables Module Level 1 (https://drafts.csswg.org/css-env-1/#safe-area-insets) adds `safearea-insets-*` (left, top, right and bottom). Also, `meta` element has `viewport-fit` enum value. (ex `<meta name="viewport" content="viewport-fit=cover>`) whether web browser window cover notch area.
`viewport-fit` has 3 enum value, `auto`, `cover` and `contain`. GeckoView wants to expose this value to browser application such Fenix. Because Android API (https://developer.android.com/guide/topics/display-cutout) uses window root layout (It is set by Application) to cover notch on display.
Differential Revision: https://phabricator.services.mozilla.com/D55609
--HG--
extra : moz-landing-system : lando
There's no need for bilinear interpolation of DC surfaces. This
fixes a lot of the fuzziness issues when using virtual surfaces,
so it makes sense to land it now while continuing to investigate
the remaining issues.
Differential Revision: https://phabricator.services.mozilla.com/D60383
--HG--
extra : moz-landing-system : lando
Unlike other types of render tasks, pictures can have hundreds of dependencies. The dependency vector is re-built every frame, leading to a lot of vector re-allocations in some pages.
Depends on D60151
Differential Revision: https://phabricator.services.mozilla.com/D60182
--HG--
extra : moz-landing-system : lando
The majority of render tasks have 0, 1 or 2 dependencies, except for pictures that typically have dozens to hundreds of dependencies. SmallVec with 2 inline elements avoids many tiny heap allocations in pages with a lot of text shadows and other types of render tasks.
Differential Revision: https://phabricator.services.mozilla.com/D60151
--HG--
extra : moz-landing-system : lando
This was done by:
This was done by applying:
```
diff --git a/python/mozbuild/mozbuild/code-analysis/mach_commands.py b/python/mozbuild/mozbuild/code-analysis/mach_commands.py
index 789affde7bbf..fe33c4c7d4d1 100644
--- a/python/mozbuild/mozbuild/code-analysis/mach_commands.py
+++ b/python/mozbuild/mozbuild/code-analysis/mach_commands.py
@@ -2007,7 +2007,7 @@ class StaticAnalysis(MachCommandBase):
from subprocess import Popen, PIPE, check_output, CalledProcessError
diff_process = Popen(self._get_clang_format_diff_command(commit), stdout=PIPE)
- args = [sys.executable, clang_format_diff, "-p1", "-binary=%s" % clang_format]
+ args = [sys.executable, clang_format_diff, "-p1", "-binary=%s" % clang_format, '-sort-includes']
if not output_file:
args.append("-i")
```
Then running `./mach clang-format -c <commit-hash>`
Then undoing that patch.
Then running check_spidermonkey_style.py --fixup
Then running `./mach clang-format`
I had to fix four things:
* I needed to move <utility> back down in GuardObjects.h because I was hitting
obscure problems with our system include wrappers like this:
0:03.94 /usr/include/stdlib.h:550:14: error: exception specification in declaration does not match previous declaration
0:03.94 extern void *realloc (void *__ptr, size_t __size)
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/malloc_decls.h:53:1: note: previous declaration is here
0:03.94 MALLOC_DECL(realloc, void*, void*, size_t)
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/mozilla/mozalloc.h:22:32: note: expanded from macro 'MALLOC_DECL'
0:03.94 MOZ_MEMORY_API return_type name##_impl(__VA_ARGS__);
0:03.94 ^
0:03.94 <scratch space>:178:1: note: expanded from here
0:03.94 realloc_impl
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/mozmemory_wrap.h:142:41: note: expanded from macro 'realloc_impl'
0:03.94 #define realloc_impl mozmem_malloc_impl(realloc)
Which I really didn't feel like digging into.
* I had to restore the order of TrustOverrideUtils.h and related files in nss
because the .inc files depend on TrustOverrideUtils.h being included earlier.
* I had to add a missing include to RollingNumber.h
* Also had to partially restore include order in JsepSessionImpl.cpp to avoid
some -WError issues due to some static inline functions being defined in a
header but not used in the rest of the compilation unit.
Differential Revision: https://phabricator.services.mozilla.com/D60327
--HG--
extra : moz-landing-system : lando
rg -l 'mozilla/Move.h' | xargs sed -i 's/#include "mozilla\/Move.h"/#include <utility>/g'
Further manual fixups and cleanups to the include order incoming.
Differential Revision: https://phabricator.services.mozilla.com/D60323
--HG--
extra : moz-landing-system : lando
Now mfbt/Move.h is empty except for that excellent comment about move
semantics... Should we put it somewhere else and delete the header as a
follow-up? Or just delete the header and carry on?
Differential Revision: https://phabricator.services.mozilla.com/D60297
--HG--
extra : moz-landing-system : lando
This patch introduces a new reftest (syntax ** or !* in reftest files).
This type of test renders a single input file multiple times, at a range
of different picture cache tile sizes. It then verifies that each of the
images matches (or doesn't).
This can be used to verify rasterizer accuracy when drawing primitives
with different tile sizes and/or dirty rect update strategies.
One of the included tests in this patch fails the accuracy test - the
intent is to fix this inaccuracy in a follow up patch and then be able to
mark it pixel exact.
Differential Revision: https://phabricator.services.mozilla.com/D60185
--HG--
extra : moz-landing-system : lando
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
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
Optionally serialize N frames into a circular memory buffer, and save
them as part of wr-capture into tilecache/.
The new tile_view utility reads the folder and converts the frames to
svg for easier visualization, with a few extra features:
- color code each primitive based on which slice it is on;
- highlight new or moving primitives in red (brute force diff);
- print all invalidated tiles at the top and the invalidation reason;
- overlay the tile quadtree to visualize splitting & merging;
- HTML and JS wrappers for animation playback, timeline scrubbing;
Positioning of the tiles on the screen is a bit broken still; especially
during scrolling and "special" pages (like about:config).
Interning info is not used yet.
Differential Revision: https://phabricator.services.mozilla.com/D59975
--HG--
extra : moz-landing-system : lando
Optionally serialize N frames into a circular memory buffer, and save
them as part of wr-capture into tilecache/.
The new tile_view utility reads the folder and converts the frames to
svg for easier visualization, with a few extra features:
- color code each primitive based on which slice it is on;
- highlight new or moving primitives in red (brute force diff);
- print all invalidated tiles at the top and the invalidation reason;
- overlay the tile quadtree to visualize splitting & merging;
- HTML and JS wrappers for animation playback, timeline scrubbing;
Positioning of the tiles on the screen is a bit broken still; especially
during scrolling and "special" pages (like about:config).
Interning info is not used yet.
Differential Revision: https://phabricator.services.mozilla.com/D59975
--HG--
extra : moz-landing-system : lando
Optionally serialize N frames into a circular memory buffer, and save
them as part of wr-capture into tilecache/.
The new tile_view utility reads the folder and converts the frames to
svg for easier visualization, with a few extra features:
- color code each primitive based on which slice it is on;
- highlight new or moving primitives in red (brute force diff);
- print all invalidated tiles at the top and the invalidation reason;
- overlay the tile quadtree to visualize splitting & merging;
- HTML and JS wrappers for animation playback, timeline scrubbing;
Positioning of the tiles on the screen is a bit broken still; especially
during scrolling and "special" pages (like about:config).
Interning info is not used yet.
Differential Revision: https://phabricator.services.mozilla.com/D59975
--HG--
extra : moz-landing-system : lando
Changes:
Tighten reftest pixel differences now that reftest has been migrated fully over to ubuntu1804.
Differential Revision: https://phabricator.services.mozilla.com/D59595
--HG--
extra : moz-landing-system : lando
We return a SourceSurfaceRecdording from OptimizeSourceSurface to represent
the optimized surface. However, GetDataSurface might be called on this
SourceSurfaceRecdording, so we hold the original SourceSurface we optimized in
the SourceSurfaceRecdording to return its GetDataSurface.
Differential Revision: https://phabricator.services.mozilla.com/D59712
--HG--
extra : moz-landing-system : lando
Adds exponential acceleration to touchpad pan events to improve percieved scrolling responsiveness
Platforms affected: Linux, any using PANDELTA_PAGE
Differential Revision: https://phabricator.services.mozilla.com/D58395
--HG--
extra : moz-landing-system : lando
This moves the opaqueness calculation out of if (blob) condition and
changes how we calculate the size of the fallback surface depending
on whether we have a compltely opaque snapped item or now.
This change allows scrollbars to marked as opaque on Windows which reduces the
GPU utilization in the DWM with DirectComposite on from 21% to 17% at 1080p and
29% to 24% at 4k
Differential Revision: https://phabricator.services.mozilla.com/D51557
--HG--
extra : moz-landing-system : lando
This test needs mobile viewport sizing because we gate double tap zooming on that.
Differential Revision: https://phabricator.services.mozilla.com/D59590
--HG--
extra : moz-landing-system : lando
Note, in helper_bug1280013.html, since we are now zooming to 2x, the quantities
specified in CSS pixels need to be scaled down by 2x accordingly, to maintain
the relative positions of the elements and gestures on the screen.
Differential Revision: https://phabricator.services.mozilla.com/D59589
--HG--
extra : moz-landing-system : lando
The exception is the tests in test_group_minimum_scale_size.html, which are
specifically testing mobile viewport sizing behaviour.
Differential Revision: https://phabricator.services.mozilla.com/D59587
--HG--
extra : moz-landing-system : lando
This patch only allows sacrificing subpixel anti-aliasing when the
screen size is larger than WUXGA, and when the force disable pref is not
set. In the future, we may also add disable this for high end GPUs.
This also consolidates the WebRender debug flags to use the same
signaling infrastructure to avoid needing to store the debug flag state
and check on each transaction. Instead it now applies the debug flag
updates when the gfxVar changes.
Differential Revision: https://phabricator.services.mozilla.com/D57469
--HG--
extra : moz-landing-system : lando
CompositorWidgetChild is about to be responsible for creating,
destroying, and presenting a shared buffer that CompositorWidgetParent
will draw into. To do this, it will need the window handle,
transparency mode changes, window size changes, and window size mode
changes.
Its creation is also about to become fallible, so it needs a separate
initialization routine.
Differential Revision: https://phabricator.services.mozilla.com/D57430
--HG--
extra : moz-landing-system : lando
I don't think it makes much of a difference but clippy is quite vocal about it.
Differential Revision: https://phabricator.services.mozilla.com/D59114
--HG--
extra : moz-landing-system : lando
On webrender on android, parent-process pages (eg about:support) were not being
rendered immediately after minimising then resuming the app, resulting in a
black screen. The problem was that webrender believed the previous frame was
still valid, and therefore that it did not need to render a new
one. Content-process pages were unnaffected because we clear cached resources
when the app is minimised, so we accidentally rendered a new frame on
resumption.
To fix this we always force a new frame to be rendered immediately on
resumption. This uncovers a race condition which causes us to sometimes render
frames at the wrong size when the window size has changed (for example when
showing or hiding the keyboard), so that is also fixed.
This also fixes a bug affecting fenix, where when opening a page in a new tab
the portion of the screen where the keyboard used to be would remain black until
the page had loaded. This no longer occurs because we force a composite as soon
as the keyboard is hidden.
Additionally, this patch reverts the original attempt at fixing this
bug, as it is not necessary.
Differential Revision: https://phabricator.services.mozilla.com/D59367
--HG--
extra : moz-landing-system : lando
I removed the old opacity filter path in the brush_blend shader and cleaned up the filter mode
constants in the shader so there are less magic numbers. This should help if/when we move more
filters to their own shaders.
Depends on D59610
Differential Revision: https://phabricator.services.mozilla.com/D59611
--HG--
extra : moz-landing-system : lando
Opacity is a common effect that is used and the opacit filter path is also used when a stacking
context has an opacity of < 1. The brush_blend shader is slow since it has support for a large
portion of CSS filters; however, opacity is used much more often than the rest of the filters.
This patch adds a simple shader for opacity effects which bypasses the extra overhead in the
brush_blend shader.
Differential Revision: https://phabricator.services.mozilla.com/D59610
--HG--
extra : moz-landing-system : lando
We need to provide separated dmabuf configurations for WebGL and Texture backends
as we want to enable dmabuf for WebGL only right now.
Depends on D59487
Differential Revision: https://phabricator.services.mozilla.com/D59488
--HG--
extra : moz-landing-system : lando
PlatformCompositorWidgetDelegate was meant to be a pure virtual base
class for all the functions that nsWindow could call that would
either go to an in-process compositor widget or an OMTC widget.
By that definition, it does not seem like CompositorWidgetParent should
be a subclass, since nsWindow cannot directly call its methods and
currently CompositorWidgetParent has several "do nothing"
implementations of the interface methods because they don't really
belong.
This changeset remedies this by refactoring CompositorWidgetParent so
it is no longer an implementor of PlatformCompositorWidgetDelegate. Now
the only implementors are CompositorWidgetChild and InProcessWin-
CompositorWidget, which makes sense because they are both directly
called through the nsWindow delegate.
It also eliminates some of the methods that seem like they don't belong
in PlatformCompositorWidgetDelegate.
Differential Revision: https://phabricator.services.mozilla.com/D57429
--HG--
extra : moz-landing-system : lando
This patch only allows sacrificing subpixel anti-aliasing when the
screen size is larger than WUXGA, and when the force disable pref is not
set. In the future, we may also add disable this for high end GPUs.
This also consolidates the WebRender debug flags to use the same
signaling infrastructure to avoid needing to store the debug flag state
and check on each transaction. Instead it now applies the debug flag
updates when the gfxVar changes.
Differential Revision: https://phabricator.services.mozilla.com/D57469
--HG--
extra : moz-landing-system : lando
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
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
This is a pre-requisite cleanup, as the FrameLayerBuilder code ends up calling
this unconditionally, and thus the assertion on the other patch can end up
failing. Hopefully it's dead code, though, so no big deal.
Tweak the WebRender code to avoid two virtual calls in the common path, too.
Differential Revision: https://phabricator.services.mozilla.com/D59229
--HG--
extra : moz-landing-system : lando
* Revert some partial webgl+oop+vr code.
* More missing FuncScope.
* Fix compile errors.
* Refactor some ifdef'd code to branch and compile on all platforms.
* -Wno-error=unused-result for GCC to allow for (void)MustUse().
Depends on D55739
Differential Revision: https://phabricator.services.mozilla.com/D56169
--HG--
extra : moz-landing-system : lando
(This is a combination of 31 commits)
* Fix Linux compilation.
* Fix mac compilation.
* CI compile fixes.
* printf's size_t is %zu. %tu would be unsigned ptrdiff_t.
* No non-ref Maybe args.
* MOZ_CRASH for noreturn
* Handle implied texture sizes, rewrite comment stripping.
* Replace e.g. WebGLProgramInner with simpler webgl::ProgramKeepAlive.
* Bounce ValidateProgram call off driver.
* Uniform name length limit, cubemap fb-attach, non-array uniforms, undersized texImage views.
* alignas for uint8_t[sizeof(float)*N] pun buffers.
* CC fixes?
* Fill attrib0Active.
* Repair max-warnings limit.
* This is basically required in order for CI's logging to not explode.
* Don't cache WebGLMemoryTracker.
* Deleted prog/shader error, no texSubImage(null), client-side fingerprint resist for exts.
* Fix GetUniformIndices and MakeRangeFromView.
* CC Traverse base class from within derived class to fix leaking the world. :(
* PauseTransformFeedback
* TexImage video fastpath
* GetFragLocation for arrays
* Forbid BindBufferRange during TF
* Mark tests and fix RBAB query and test.
* Change(!) query deletion behavior to match spec.
* Mark conformance2/query/query.html failing for now.
* Implicitly EndQuery on DeleteQuery while spec is in flux.
* Fix error code for test.
* RAII LruPosition for WebGL context limit.
* Include std::list.
* Mark CompileResult and LinkResult.pending as false when retrieved.
* Hold strong-ref to NotLostData during Run<> to prevent LoseContext=>UAF.
* Don't assume GetUniformLocation(foo+'[0]') means foo is an array.
* Don't assume !mCanvasElement means !!mOffscreenCanvas.
* Handle composition while context-lost.
* All non-value-init members must be const or have inline init.
* Mark passing tests on Linux.
Depends on D54019
Differential Revision: https://phabricator.services.mozilla.com/D55739
--HG--
extra : moz-landing-system : lando
* Context loss using RAII
* Move Program reflection Client-side
Depends on D54018
Differential Revision: https://phabricator.services.mozilla.com/D54019
--HG--
extra : moz-landing-system : lando
Splits WebGLContext into ClientWebGLContext and HostWebGLContext. The Client enables the JS-control of a WebGL context in a content procecss while the Host executes the WebGL graphics operations (via a WebGLContext that maintains much of the existing code) in the compositor process. At this point, the cross-process behavior is disabled -- this series of patches is an incremental step toward that final goal.
Differential Revision: https://phabricator.services.mozilla.com/D54018
--HG--
extra : moz-landing-system : lando
Allow two independent pools of worker threads, one
for each SceneBuilder thread. Thus long running
low-priority SVG work should no longer block UI
hit-testing from running.
Previous code tried to force a yield by using
priority and affinity, to keep the constraint of
"8 worker threads at most". Net perf is a loss,
the code is not cross platform, and we already
have many processes/threads/pools co-existing. So
this patch removes the constraint.
Talos shows a mix of mostly gains and some losses,
link in this comment:
https://bugzilla.mozilla.org/show_bug.cgi?id=1595708#c13
This trade-off seems worth a try in exchange for
better UI latency.
(the big Win32 gain is repairing an earlier loss)
Bug 1602907 - obsoleted
Bug 1604570 - this patch
Bug 1602905 - this patch
Differential Revision: https://phabricator.services.mozilla.com/D58677
--HG--
extra : moz-landing-system : lando
This fixes RenderCompositorOGL::DestroySurface to update mTotalPixelCount as needed when there are still tiles in the surface that's getting removed.
I'm also adding a few asserts and performing some minor cleanup.
Differential Revision: https://phabricator.services.mozilla.com/D58518
--HG--
extra : moz-landing-system : lando
I don't think it makes much of a difference but clippy is quite vocal about it.
Differential Revision: https://phabricator.services.mozilla.com/D59114
--HG--
extra : moz-landing-system : lando