Граф коммитов

1557 Коммитов

Автор SHA1 Сообщение Дата
Lee Salzman bff5086efb Bug 1631070 - silence unused parameter warnings in SWGL. r=jimb
Differential Revision: https://phabricator.services.mozilla.com/D71393
2020-04-17 20:13:01 +00:00
Lee Salzman 808ca7fb37 Bug 1630142 - implement linear filtering for SWGL glBlitFramebuffer. r=jimb
This provides an implementation of linear filtering via the linear_blit
routine. That required factoring out textureLinear helper functions and
reusing them to do the actual filtering of the source texture.

Some collateral cleanups involved changing IntRect to use a start/end
format instead of origin/size, cleaner ways of getting offset texture
sampler pointers, and fixing clamping of linear filter coordinates.

Differential Revision: https://phabricator.services.mozilla.com/D70968
2020-04-17 16:51:27 +00:00
Andrew Osmond bb9d882e66 Bug 1627739 - Do not delay FrameTexturesUpdated notifications for empty updates. r=kvark
The FrameTexturesUpdated event is intended to be issued when any
necessary texture cache updates have been completed for the current
frame. Originally we would simply check if the pending_texture_updates
vector in Renderer is empty. However the updates themselves could be
nops, and not trigger a timely frame render to occur, causing the
notifications to be delayed indefinitely. Now we track if there are
actually any pending specifically texture cache updates and only defer
the notification if true.

A consequence of deferring the notification indefinitely was revealed
when animating images just outside the current view. We would not
release the buffers for recycling even though we had no reason to hold
onto them. This could cause the image decoder to allocate new buffers
while the old buffers would not get released. It was not a true memory
leak because as soon as a frame is rendered, it would release all of the
old buffers, but it could easily cause a out of memory crash to occur if
the user was not interacting with the browser while in this state.

Differential Revision: https://phabricator.services.mozilla.com/D70770
2020-04-14 16:53:45 +00:00
Dzmitry Malyshau 1240a7a135 Bug 1629776 - Handle WR case of an empty inner transformed rectangle r=gw
Differential Revision: https://phabricator.services.mozilla.com/D71229
2020-04-16 23:20:48 +00:00
Nicolas Silva ea0d91e150 Bug 1587713 - Remove the late blob rasterization code. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D49186
2020-04-16 20:13:24 +00:00
Nicolas Silva a7bf827f4d Bug 1630212 - Remove non-tiled blob images. r=jrmuizel
Gecko always tiles blobs. The other code path is untested and a tad complicated, let's remove it.

Differential Revision: https://phabricator.services.mozilla.com/D71021
2020-04-16 20:13:24 +00:00
Lee Salzman cef6b8c8e7 Bug 1630481 - make Wrench force external BGRA8 images to known format to avoid needing swizzles. r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D71134
2020-04-16 15:13:03 +00:00
Glenn Watson f276147e7f Bug 1630480 - Update gleam GL bindings to 0.11.0 r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D71133

--HG--
extra : moz-landing-system : lando
2020-04-16 02:13:31 +00:00
Lee Salzman 728df4e3e8 Bug 1630370 - ignore mipmap allocation in SWGL. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D71090

--HG--
extra : moz-landing-system : lando
2020-04-15 19:15:26 +00:00
Jamie Nicol 845c501566 Bug 1629835 - Ensure PBO upload strides are a multiple of 64 pixels on adreno r=kvark
Previously we were using 256 bytes (which happens to be equal to 64
pixels for RGBA8 textures). A recent change to the GPU Cache uncovered
the fact that the requirement is actually 64 pixels, eg 1024 bytes for
RGBAF32 textures.

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

--HG--
extra : moz-landing-system : lando
2020-04-14 17:38:03 +00:00
Nicolas Silva 83cb2f1fbc Bug 1627299 - Remove MsgSender/MsgReceiver. r=kvark
These just wrap regular std Sender/Receiver without providing any value. Serialize/Deserialize was implement manually for MsgSender/MsgReceiver to assert. Serde being amazing, it provides with annotations to not require the traits to be implemented on some enum variants and assert at runtime which functionally equivalent but less error-prone than the fake trait implementations.

Removing the rest of channel.rs is coming in a followup.

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

--HG--
extra : moz-landing-system : lando
2020-04-14 16:58:39 +00:00
Nicolas Silva e1d3184a15 Bug 1627299 - Remove the separation between API messages and payloads. r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D69979

--HG--
extra : moz-landing-system : lando
2020-04-14 16:58:39 +00:00
Glenn Watson a6cc45031e Bug 1629724 - Improve the GC strategy of the render target pool. r=nical
Only drop targets from the render target pool when the size of
the pool is larger than an arbitrary threshold (this is 32 MB
for now), _and_ the render target hasn't been used in the last
60 frames of rendering.

This reduces the number of allocation thrashing of textures in
the render target pool on most pages.

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

--HG--
extra : moz-landing-system : lando
2020-04-14 10:59:55 +00:00
Kartikaya Gupta 12ccbb9268 Bug 1629521 - Fix WR handling of items with both top and bottom sticky ranges. r=kvark
The WR code that computed the sticky_offset didn't properly combine the offsets
from the top- and bottom- sticky calculations if an item had both. This patch
fixes the calculation, which makes the remaining test failure (in the
configuration without any dynamic toolbar) pass.

Depends on D70679

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

--HG--
extra : moz-landing-system : lando
2020-04-13 18:39:07 +00:00
Kartikaya Gupta d4434cef4f Bug 1628484 - Remove assertions that don't always hold. r=kvark
These assertions don't hold in some perfectly legitimate cases, such as when
items have both top and bottom sticky behaviours. The actual behaviour still
seems ok, so let's just drop the assertions.

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

--HG--
extra : moz-landing-system : lando
2020-04-10 19:03:17 +00:00
Glenn Watson 82cea19dee Bug 1629672 - Move prim_origin from instance to template. r=Bert,kvark
Previously, the prim origin needed to be stored in the prim
instance, to avoid picture cache invalidations. With support
for external scroll offset, this is no longer necessary.

This simplifies some of the code paths, and reduces the size
of primitive instances.

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

--HG--
extra : moz-landing-system : lando
2020-04-14 01:04:05 +00:00
Glenn Watson a4806e99d8 Bug 1629704 - Rotate vertex data textures per frame. r=Bert,kvark
On some (primarily older, integrated) drivers, we see significant
time in CPU stalls during updates to the vertex data textures.

As a short term fix, this patch creates an array of vertex data
textures, and rotates which set of them are in use each frame.

There are better long-term options (such as porting the GPU cache
scatter method, or perhaps using UBO/SSBOs here), but this is a
simple workaround for now.

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

--HG--
extra : moz-landing-system : lando
2020-04-14 01:54:09 +00:00
Glenn Watson 7eee44a592 Bug 1629693 - Enable GPU cache scatter path when running ANGLE. r=kvark
On some (mostly older, integrated) GPUs, the normal GPU texture cache
update path doesn't work well when running on ANGLE, causing CPU stalls
inside D3D and/or the GPU driver. To reduce the number of code paths we
have active that require testing, we will enable the GPU cache scatter
update path on all devices running with ANGLE. We want a better solution
long-term, but for now this is a significant performance improvement on
HD4600 era GPUs, and shouldn't hurt performance in a noticeable way on
other systems running under ANGLE.

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

--HG--
extra : moz-landing-system : lando
2020-04-13 23:26:07 +00:00
Glenn Watson 8c7529f5d0 Bug 1628901 - Fix panic caused by calling BeginDraw with empty dirty rect. r=sotaro
Previously, it was possible for a tile that had a valid scroll root
to have an empty valid (and dirty) rect due to the picture cache
clip rect, in some situations.

This could result in the tile not being tagged as off-screen, which
means it is added to the queue of tiles to be updated. On most
platforms this is benign, but the BeginDraw method of DirectComposition
fails if the dirty rect is empty.

This patch fixes the logic so that tiles that meet these conditions
are correctly tagged as not visible, and skipped from update queue.

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

--HG--
extra : moz-landing-system : lando
2020-04-13 00:37:19 +00:00
Dzmitry Malyshau a1b1f0462a Bug 1620606 - Capture clip and primitive stores r=aosmond
this is purely infomational and doesn't get loaded back ever

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

--HG--
extra : moz-landing-system : lando
2020-04-09 11:10:49 +00:00
Dzmitry Malyshau 0e42a4799d Bug 1628772 - Update core-foundation dependency to 0.7 r=kats
Differential Revision: https://phabricator.services.mozilla.com/D70432

--HG--
extra : moz-landing-system : lando
2020-04-11 20:14:41 +00:00
Lee Salzman 11c8b841d8 Bug 1626188 - ensure shader keys are in sorted order. r=jimb
Differential Revision: https://phabricator.services.mozilla.com/D70555

--HG--
extra : moz-landing-system : lando
2020-04-11 00:25:46 +00:00
Lee Salzman 45437c6323 Bug 1627718 - clamp SWGL scale_blit to valid source and dest regions. r=jimb
Differential Revision: https://phabricator.services.mozilla.com/D70282

--HG--
extra : moz-landing-system : lando
2020-04-10 19:58:56 +00:00
Jim Blandy 7582bd90d4 Bug 1628910: Use correct lower bound for skip_end in SWGL's force_clear function. r=lsalzman
In wr/swgl/src/gl.cc, force_clear constrains skip_end to be no less than y0, but
skip_end is a horizontal position, not a vertical position, so skip_start is the
correct lower bound.

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

--HG--
extra : moz-landing-system : lando
2020-04-09 23:54:54 +00:00
Mihai Alexandru Michis 5beb91b795 Backed out changeset d91a97562b48 (bug 1628772) for causing failures regarding core-foundation.
CLOSED TREE
2020-04-10 03:42:05 +03:00
Dzmitry Malyshau feed464a5d Bug 1628772 - Update core-foundation dependency to 0.7 r=kats
Differential Revision: https://phabricator.services.mozilla.com/D70432

--HG--
extra : moz-landing-system : lando
2020-04-09 20:57:18 +00:00
Bert Peers 03acaa106c Bug 1624468 - Add a fast path for more gradient types in WR r=gw
Add support for repeating gradients in the cached fast path.

Documentation:
https://bugzilla.mozilla.org/attachment.cgi?id=9138638

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

--HG--
extra : moz-landing-system : lando
2020-04-08 22:19:11 +00:00
Glenn Watson d205961c97 Bug 1628564 - Remove the common primitive template data for picture primitives. r=nical
Picture primitives are special, so it doesn't make sense to have
the normal common primitive data for them. For example, the
bounding rect of a picture is determined during frame building.

Removing the common data for picture primitives simplifies the
code and makes it impossible to accidentally access an invalid
bounding rect for picture primitives.

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

--HG--
extra : moz-landing-system : lando
2020-04-09 15:25:25 +00:00
Jim Blandy c5713e75b5 Bug 1628508: Add 'IMPLICIT' comment for webrender_api::display_item::ScrollFrameDisplayItem. DONTBUILD r=gw
Differential Revision: https://phabricator.services.mozilla.com/D70269

--HG--
extra : moz-landing-system : lando
2020-04-08 23:31:36 +00:00
Jim Blandy 3094dff055 Bug 1628130: Delete webrender::prim_store::PrimitiveSceneData. r=gw
Most `Internable` implementations give `PrimitiveSceneData` as their
`InternData` associated type, the type of data associated with the handle in the
scene builder thread. However, nothing in the scene builder code, or anywhere in
WebRender, actually uses the contents of `PrimitiveSceneData`, so it can be
replaced with `()` with no effect on the code other than memory savings.

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

--HG--
extra : moz-landing-system : lando
2020-04-08 19:53:08 +00:00
Glenn Watson 29f4bd98b6 Bug 1627816 - Fix skipping composites when tile surface changes. r=nical
This fixes a case where the backing surface of a picture cache tile
changes, but was still being considered a no-op frame, which skips
the composite as an optimization if nothing has changed.

In this case, the tile surface changes from a rasterized texture
to a solid color that doesn't require a picture cache texture.

The patch ensures that the composite surface descriptors that are
used to detect no-op frame compositions include the backing
surface for each of the tiles that make up this virtual surface.

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

--HG--
extra : moz-landing-system : lando
2020-04-08 09:24:48 +00:00
Glenn Watson 8485fe5358 Bug 1627864 - Fix invalidation of tiles when the shape of the spatial node tree changes. r=nical,Bert,kvark
Previously, primitive dependency checking would invalidate a tile if
the spatial node index for a given primitive changed.

However, if a new display list is sent that changes the shape of
the spatial node tree this may cause unnecessary invalidations.

For example, a new display list that inserts a new spatial node at
the start of the tree could result in spatial node indices being
different, even though the values of the transforms was the same.

This patch changes the invalidation logic for spatial nodes to
compare the transforms by value, rather than index, meaning that
invalidations are avoided if the shape of the spatial tree has
changed, but the values are consistent.

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

--HG--
extra : moz-landing-system : lando
2020-04-07 23:58:19 +00:00
Lee Salzman 9bc70fa0d9 Bug 1627368 - allow requesting trilinear filtering in SWGL. r=jimb
Differential Revision: https://phabricator.services.mozilla.com/D69897

--HG--
extra : moz-landing-system : lando
2020-04-07 20:10:23 +00:00
Lee Salzman 08efd07ab4 Bug 1621382 - implement perspective-correct rasterization for SWGL shaders with PERSPECTIVE feature. r=jrmuizel
This implements Z plane clipping, gl_FragCoord.zw interpolation, and vertex attribute perspective-correction with support from the glsl-to-cxx compiler by using PERSPECTIVE feature in a WR shader.

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

--HG--
extra : moz-landing-system : lando
2020-04-07 14:53:01 +00:00
Lee Salzman 251606e979 Bug 1627413 - implement texture lod-bias. r=jimb
Differential Revision: https://phabricator.services.mozilla.com/D69873

--HG--
extra : moz-landing-system : lando
2020-04-07 16:55:56 +00:00
Lee Salzman 12a78b24e7 Bug 1627355 - implement missing SWGL texture rectangle binding. r=jimb
Differential Revision: https://phabricator.services.mozilla.com/D69894

--HG--
extra : moz-landing-system : lando
2020-04-07 17:05:08 +00:00
Jim Blandy 67aa2dee05 Bug 1627413: WebRender: Don't pass level-of-detail bias value to GLSL texture function. r=cbrewster
The `sampleInUvRect` function in `gfx/wr/webrender/res/cs_svg_filter.glsl` calls
`texture`, passing the optional third argument that specifies a bias to the
sampler's level-of-detail calculation, used for mipmap interpolation. However,
the `texture` override in `gfx/wr/swgl/src/glsl.h` that accepts this parameter
is stubbed out, with an `assert(0)`. This causes twelve tests in
`gfx/wr/wrench/reftests/filters` to crash.

Nothing in Firefox uses mipmaps, and Servo doesn't use Software WebRender, so it
should be fine for that call to `texture` to simply not pass the level-of-detail
bias.

This patch makes that change.

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

--HG--
extra : moz-landing-system : lando
2020-04-06 20:34:16 +00:00
Bert Peers 7f2e1717d9 Bug 1624468 - Add a fast path for more gradient types in WR r=gw
Differential Revision: https://phabricator.services.mozilla.com/D68945

--HG--
extra : moz-landing-system : lando
2020-04-06 07:16:25 +00:00
Glenn Watson 76a0c60d29 Bug 1627588 - Fix picture cache tiles being evicted too eagerly. r=nical
The picture cache code retains a set of tiles that are currently
off-screen but might be needed again soon, depending on how the
page is scrolled.

However, off-screen tiles were being skipped during draw processing,
which meant that the texture cache request method was not being
called on these tiles. This would often result in the texture
cache eagerly evicting these seemingly unused surface tiles.

This patch re-arranges the occlusion and visibility processing
code for tiles, so that if a tile has been retained in the
picture cache grid, the texture surface is always requested,
even if that tile is currently off-screen. This prevents the
texture cache from evicting tiles that we want to retain for now.

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

--HG--
extra : moz-landing-system : lando
2020-04-06 15:01:29 +00:00
Dzmitry Malyshau 3791cb767b Bug 1626827 - Force WR picture tasks to fit into max target size r=Bert
this is an attempt to handle tasks outside of the device bounds,
that belong to surfaces not establishing raster roots.

I suspect that the scaling we are now setting up in adjust_scale_for_max_surface_size
doesn't work properly, since the function was assumed to only affect the raster-rooted
surfaces. But it does fix the crash we have.

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

--HG--
extra : moz-landing-system : lando
2020-04-04 00:06:13 +00:00
Aaron Klotz 4cac9b3eb9 Bug 1627354: Part 5 - Update wrench to build using Android 29; r=kats
Depends on D69634

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

--HG--
extra : moz-landing-system : lando
2020-04-04 03:15:57 +00:00
Dzmitry Malyshau 02a026667e Bug 1624881 - Work around the relative transform failed expectations r=gw
we expect that the children spatial node goes after the parent.
If it's not the case, we can still fall back to a full world transform,
but it's not going to be correct with regards to flattening.
As we don't know the circumstances and are unable to reproduce the issue,
making this fallback could be a reasonable thing to do for now.

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

--HG--
extra : moz-landing-system : lando
2020-04-03 00:39:37 +00:00
Stefan Hindli 52dbd58d66 Backed out changeset dfa94a886779 (bug 1624468) for causing web platform permafailures in /css/css-images/gradient-move-stops.html CLOSED TREE 2020-04-03 03:07:20 +03:00
Bert Peers b55f9bcbf6 Bug 1624468 - Add a fast path for more gradient types in WR r=gw
Differential Revision: https://phabricator.services.mozilla.com/D68945

--HG--
extra : moz-landing-system : lando
2020-04-02 19:50:12 +00:00
Nicolas Silva 780c056648 Bug 1626666 - Rename IpcProfileCounters into TransactionProfileCounters. r=jrmuizel
Few of the counters actually have anything to do with IPC although they all relate to events of layout transactions.

Depends on D69414

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

--HG--
extra : moz-landing-system : lando
2020-04-02 18:25:59 +00:00
Nicolas Silva 82f42d6e29 Bug 1626666 - Ensure ipc profile counters follow transactions through the scene builder thread. r=jrmuizel
Instead of collecting so-called ipc counters when receving the SetDisplayList on the render backend, pass the information through the scene builder thread and update the profile on the render backend after the scene is swapped. This prevents ipc counters to be displayed while the transaction is still being processed by the scene builder thread.

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

--HG--
extra : moz-landing-system : lando
2020-04-02 18:32:57 +00:00
Nicolas Silva 5ca5cd78ce Bug 1624627 - Add a slow transaction indicator. r=jrmuizel
It moves when DL building + IPC + scene building takes more than 100ms.

Depends on D69247

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

--HG--
extra : moz-landing-system : lando
2020-04-02 18:32:58 +00:00
Nicolas Silva fdb6027218 Bug 1624627 - Reimplement the slow frame indicator. r=jrmuizel
This removes the WebRender side of the previous slow frame indicator and replace it with a simple implementation that only looks at the CPU time on the render backend and renderer thread involved for building a frame.

A followup patch will add a separate indicator for when the displaylist/ipc/scene bits take too long.

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

--HG--
extra : moz-landing-system : lando
2020-04-02 17:23:15 +00:00
Nicolas Silva 53168da7e7 Bug 1625365 - Improve the blob image overview documentation. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D68985

--HG--
extra : moz-landing-system : lando
2020-04-02 18:32:14 +00:00
Nicolas Silva 4e7b069162 Bug 1626666 - Rework the ipc profile counters. r=Bert,gw
Before this patch:
 - Consume time merely is the time it takes to push something into a vector (always displays zero).
 - Total IPC time and the DisplayList IPC graph measure the time between api.set_display_list and the render backend picking the message up, plus the time it took to build the display list (but doesn't take into account the time it took for actual IPC in between).
 - Send time is only the time between api.set_display_list and the render backend picking the message up but doesn't take into account the time it took between the content thread sending the DL and the compositor thread forwarding it.

After this patch:
 - Content send time measures the time between the content thread sending the display list and the compositor forwarding it (actual IPC).
 - Api send time measures the time between the compostor thread forwarding the DL and the render backend picking it up.
 - Consume time is removed.
 - Total send time is the sum of content and api times.
 - Display list build times and display list IPC (total send time) are on separate graphs.

Depends on D69227

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

--HG--
extra : moz-landing-system : lando
2020-04-02 02:51:12 +00:00