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

2169 Коммитов

Автор SHA1 Сообщение Дата
Glenn Watson 33a3e935da Bug 1656820 - Remove content_size from scene pipeline. r=nical
Previously, the content_size was used when defining an iframe
to set the size of the root scrollable area.

However, this was never useful (the root pipeline scroll frame
is not considered a scroll root, it's more of a placeholder).
The scroll frame for content is typically defined within the
iframe display list (which also allows non-scrolled content
within the iframe, such as a background rectangle color).

The existing content_size was causing problems in Gecko because
there are some snapping / rounding inaccuracies with fractional
DPI ratios, resulting in root scroll frames with +/- 1 pixel
scrollable size.

The simplest fix for this is to remove content_size altogether
and rely on the iframe display item to define the content size
of the root scroll frame for a pipeline.

Differential Revision: https://phabricator.services.mozilla.com/D85719
2020-08-03 20:57:30 +00:00
Sylvestre Ledru e446a298e2 Bug 1617369 - Reformat recent rust changes with rustfmt r=emilio
# ignore-this-changeset

Depends on D85678

Differential Revision: https://phabricator.services.mozilla.com/D85679
2020-08-02 15:15:26 +00:00
Robert Mader dd996a396b Bug 1656472 - [X11] Drop CopySubBufferMESA and add SwapBuffersWithDamage support, r=nical
This largely reverts D81868, only keeping what's needed to make SwapBuffersWithDamage
work, and also adds BufferAge support to RenderCompositorOGL.

Differential Revision: https://phabricator.services.mozilla.com/D85565
2020-07-31 16:13:54 +00:00
Nathan Froyd e3ebda1914 Bug 1223932 - delete guard object uses from the tree; r=jwalden
CLOSED TREE

We don't need these macros anymore, for two reasons:

1. We have static analysis to provide the same sort of checks via `MOZ_RAII`
   and friends.
2. clang now warns for the "temporary that should have been a declaration" case.

The extra requirements on class construction also show up during debug tests
as performance problems.

This change was automated by using the following sed script:

```
# Remove declarations in classes.
/MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER/d
/MOZ_GUARD_OBJECT_NOTIFIER_INIT/d

# Remove individual macros, carefully.
{
  # We don't have to worry about substrings here because the closing
  # parenthesis "anchors" the match.
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM_TO_PARENT)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_IN_IMPL)/)/g;

  # Remove the longer identifier first.
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_TO_PARENT//g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM//g;
}

# Remove the actual include.
\@# *include "mozilla/GuardObjects.h"@d
```

and running:

```
find . -name \*.cpp -o -name \*.h | grep -v 'GuardObjects.h' |xargs sed -i -f script 2>/dev/null
mach clang-format
```

Differential Revision: https://phabricator.services.mozilla.com/D85168
2020-07-30 14:22:38 +00:00
Mihai Alexandru Michis a911a108d0 Backed out changeset ac9c811bc427 (bug 1223932) for causing spidermonkey rust failures.
CLOSED TREE
2020-07-30 18:23:21 +03:00
Nathan Froyd bec9f9b93a Bug 1223932 - delete guard object uses from the tree; r=jwalden
We don't need these macros anymore, for two reasons:

1. We have static analysis to provide the same sort of checks via `MOZ_RAII`
   and friends.
2. clang now warns for the "temporary that should have been a declaration" case.

The extra requirements on class construction also show up during debug tests
as performance problems.

This change was automated by using the following sed script:

```
# Remove declarations in classes.
/MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER/d
/MOZ_GUARD_OBJECT_NOTIFIER_INIT/d

# Remove individual macros, carefully.
{
  # We don't have to worry about substrings here because the closing
  # parenthesis "anchors" the match.
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM_TO_PARENT)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_IN_IMPL)/)/g;

  # Remove the longer identifier first.
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_TO_PARENT//g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM//g;
}

# Remove the actual include.
\@# *include "mozilla/GuardObjects.h"@d
```

and running:

```
find . -name \*.cpp -o -name \*.h | grep -v 'GuardObjects.h' |xargs sed -i -f script 2>/dev/null
mach clang-format
```

Differential Revision: https://phabricator.services.mozilla.com/D85168
2020-07-30 14:22:38 +00:00
sotaro 8537b85e41 Bug 1655900 - Fix crash by using Software WebRender on Windows r=nical
This is a short term fix just for addressing a crash.

Differential Revision: https://phabricator.services.mozilla.com/D85236
2020-07-29 06:59:52 +00:00
Dzmitry Malyshau 3d822b4eda Bug 1652972 - Mark EGL context as lost on Shutdown() r=aosmond
This is meant to save us in cases where the message loop in GPU process
receives commands related to resources that point to the old EGL context
that was just shut down. Since the symbols are erased, we'd end up with
trying to execute a nullptr on `MakeCurrent()`. With marking the context
as lost, however, no symbols will be accessed.

Differential Revision: https://phabricator.services.mozilla.com/D84868
2020-07-29 02:33:54 +00:00
sotaro 58ce4ff546 Bug 1655395 - Remove MOZ_ALWAYS_TRUE from RenderDXGITextureHostOGL r=nical
MOZ_ALWAYS_TRUE causes process abort on failure. we do not want the process abort with false.

The failure could happen when context is lost. It is not necessary to handle the context lost in RenderDXGITextureHostOGL. It is already handled by RendererOGL.

Differential Revision: https://phabricator.services.mozilla.com/D85116
2020-07-28 07:21:26 +00:00
Jeff Muizelaar 78402acff4 Bug 1655298 - Pass in MallocSizeOfOps to reporter. r=gw
Just passing this along with the report is easier than
trying to store these functions some place as we do in other places.

These ops aren't used yet but will be in subsequent patches.

There's a bit of ugly around the bindings because of a cbindgen
limitation.

Differential Revision: https://phabricator.services.mozilla.com/D84916
2020-07-27 02:55:47 +00:00
Jeff Muizelaar b083673982 Bug 1654699. Update core-foundation/core-graphics. r=kvark,keeler,jcj,chunmin
This includes updates to authenticator, cubeb-coreaudio,
metal, gfx-backend-vulkan, gfx-backend-metal, freetype

libloading is duplicated because of ash

Differential Revision: https://phabricator.services.mozilla.com/D84688
2020-07-24 22:35:25 +00:00
Csoregi Natalia ea1ddfabbf Backed out changeset 9702b4a4f53c (bug 1654699) for Gtest failures. CLOSED TREE 2020-07-24 21:29:52 +03:00
Jeff Muizelaar b17ab0c2e7 Bug 1654699. Update core-foundation/core-graphics. r=kvark,keeler,jcj,chunmin
This includes updates to authenticator, cubeb-coreaudio,
metal, gfx-backend-vulkan, gfx-backend-metal, freetype

libloading is duplicated because of ash

Differential Revision: https://phabricator.services.mozilla.com/D84688
2020-07-24 15:59:54 +00:00
Jeff Muizelaar 81afea999f Bug 1654929. Drop old FBOs that we haven't used in a while. r=gw
This keeps us from accumulating frame buffers without bound.
Previously I was seeing as many 56 frame buffers in this list
during a tab cycling stress test.

Differential Revision: https://phabricator.services.mozilla.com/D84760
2020-07-24 00:04:55 +00:00
Mihai Alexandru Michis c3d9e17fa4 Backed out changeset 45fc4a780b2b (bug 1654699) for causing failures regarding AudioStream position.
CLOSED TREE
2020-07-23 23:13:52 +03:00
Lee Salzman da45058f08 Bug 1649676 - use fallback font if loading WR mac font descriptor fails. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D84625
2020-07-23 13:34:36 +00:00
Jeff Muizelaar 4b666af85b Bug 1654699. Update core-foundation/core-graphics. r=kvark,keeler,chunmin
This includes updates to authenticator, cubeb-coreaudio,
metal, gfx-backend-vulkan, gfx-backend-metal, freetype

libloading is duplicated because of ash

Differential Revision: https://phabricator.services.mozilla.com/D84688
2020-07-23 17:01:14 +00:00
Kartikaya Gupta bbf55b1e31 Bug 1654652 - Remove unused bindings left over from document splitting. r=jrmuizel
More leftover stuff from the document splitting effort. I'm leaving in the
corresponding APIs in webrender_api in case other consumers of WebRender
are using it.

Differential Revision: https://phabricator.services.mozilla.com/D84590
2020-07-22 20:16:54 +00:00
Kartikaya Gupta 2c884ed990 Bug 1654373 - Save captures to MOZ_UPLOAD_PATH if that is set. r=kvark
This makes it possible to download the capture from the artifacts of the
CI job. It would be nicer if the capture were written to a tarball/zipfile,
but having to download the files individually is better than nothing.

Depends on D84422

Differential Revision: https://phabricator.services.mozilla.com/D84423
2020-07-22 15:52:04 +00:00
Andrew Osmond cde8b9c40f Bug 1632005 - Check for context loss with WebRender with native GL. r=nical
Similar to ANGLE and WebGL, we should be checking if there is a device
reset after a render pass via the glGetGraphicsResetStatus API.

Additionally, we should allow for simulating a device reset on platforms
other than Windows when using WebRender.

Differential Revision: https://phabricator.services.mozilla.com/D83937
2020-07-17 14:12:32 +00:00
Lee Salzman 47223485af Bug 1653374 - fix SwCompositor dependency tracking to account for transitive overlap dependencies. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D83878
2020-07-17 02:50:26 +00:00
Lee Salzman 0cf364d42f Bug 1653413 - update DCLayerTree surface rects at end of frame. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D83867
2020-07-17 00:54:28 +00:00
Nicolas Silva 35d380ffc3 Bug 1650990 - Use Euclid 0.20.14. r=kvark
It contains a fix for some of the rect operations interacting poorly with NaNs.

Differential Revision: https://phabricator.services.mozilla.com/D83774
2020-07-16 13:24:19 +00:00
Nicolas Silva eb34985ecc Bug 1625070 - Use glxCopySubBufferMESA when available if partial present and WebRender are enabled on GLX. r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D81868
2020-07-16 14:44:41 +00:00
Narcis Beleuzu 2f4cbd537c Backed out changeset 74a508f9bac4 (bug 1625070) for wr failure on position-sticky-scroll-reposition.html . CLOSED TREE 2020-07-16 13:03:13 +03:00
Nicolas Silva 8f37bf747b Bug 1625070 - Use glxCopySubBufferMESA when available if partial present and WebRender are enabled on GLX. r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D81868
2020-07-15 18:20:48 +00:00
Bert Peers 16439a0ec2 Bug 1647946 - SWGL Mac Correctness issues r=lsalzman,mstange
1/ the texture binding expects the pixel pointer to start at the top
left of the valid rectangle, not the top left of the entire mapped
layer;

2/ pending clears must be resolved before compositing the texture;

Differential Revision: https://phabricator.services.mozilla.com/D83587
2020-07-15 17:17:07 +00:00
Lee Salzman aa690536d8 Bug 1650984 - add SWGL LockedResource API. r=jimb,jrmuizel
SwCompositor needs to send SWGL textures references safely to the SwComposite
thread. However, the SWGL context's texture store may grow and make accessing
these tables unsafe. To work around this, this patch adds a LockedResource
API that locks down access to these textures ahead of time both to ensure that
no table access is necessary and to help detect any unexpected modifications
of these textures while they are locked. These LockedResource objects can then
be composited safely in another thread without interfering with normal SWGL
operation in the original that that isn't simultaneously using these textures.

Differential Revision: https://phabricator.services.mozilla.com/D82666
2020-07-14 20:49:26 +00:00
Lee Salzman d5441a4318 Bug 1650984 - make SwCompositor composite asynchronously in another thread. r=jrmuizel
This spawns a new SwComposite thread inside SwCompositor. Tile composite jobs
are submitted over a channel to the thread, with a condition being signaled
after all jobs are processed. The SwCompositor computes a dependency order for
the tiles based on whether it overlaps a tile that has been invalidated and
needs to be updated during the current frame. As tiles are gradually updated,
all tiles that would depend on the update as denoted by the dependency order get
submitted so that composition can proceed. Ultimately, this allows tile updates
and compositing to work in parallel, pipelining much of the cost of compositing.

Differential Revision: https://phabricator.services.mozilla.com/D82474
2020-07-14 20:49:13 +00:00
Sylvestre Ledru f7a0736a34 Bug 1617369 - Reformat recent rust changes with rustfmt r=emilio
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D83259
2020-07-12 17:01:13 +00:00
sotaro e204892c8c Bug 1649122 - Add basic AHardwareBuffer support to WebRender on android r=jrmuizel
android fence is not supported yet.

Differential Revision: https://phabricator.services.mozilla.com/D82317
2020-07-10 18:50:56 +00:00
Miko Mynttinen 0d02beff03 Bug 1536515 - Part 3: Add RenderExternalTextureHost r=sotaro
Differential Revision: https://phabricator.services.mozilla.com/D80506
2020-07-07 17:57:22 +00:00
Jim Blandy 1f4b5cd074 Bug 1649861: Turn of RendererOptions::clear_caches_with_quads under SWGL. r=lsalzman
The `clear_caches_with_quads` flags is meant to work around a bug in some
drivers' scissored clears, but its implementation uses the `GL_ALWAYS` depth
comparison function, which SWGL doesn't support.

SWGL does scissored clears very well, so simply turning this workaround off on
SWGL avoids the problem and gets good results.

Of course we could just make SWGL support `GL_ALWAYS`, but that would be kind of
annoying, since it basically disables depth checks altogether, and we want to
use entirely different paths when depth checks aren't needed.

Differential Revision: https://phabricator.services.mozilla.com/D81918
2020-07-01 22:27:56 +00:00
Emilio Cobos Álvarez 7c995807da Bug 1646936 - Generate a single metadata file in the objdir, and feed it to cbindgen. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D80360
2020-06-26 10:41:26 +00:00
Coroiu Cristina 302c2fa31a Backed out changeset 8f948dd74aba (bug 1646936) for SM and Toolchain failures on a CLOSED TREE 2020-06-26 13:08:09 +03:00
Emilio Cobos Álvarez 9c7c03bf30 Bug 1646936 - Generate a single metadata file in the objdir, and feed it to cbindgen. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D80360
2020-06-26 09:37:16 +00:00
Lee Salzman 7ed00023cb Bug 1646835 - group RenderCompositorNative subclass methods together. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D80773
2020-06-24 04:24:18 +00:00
Lee Salzman a6c3fcda13 Bug 1646835 - reuse depth buffers when rendering SWGL picture cache tiles. r=mstange
Bug 1592038 implemented a means for reducing memory usage resulting from needlessly
duplicated allocation of depth buffers when rendering WR picture cache tiles via
the NativeLayer interface. This aims to keep a similarly level of memory savings
even when using NativeLayer + SWGL.

SWGL allows, as an extension beyond OpenGL, specifying an allocation size separate
from the incidental size of a texture, which can be used to render to a smaller
valid rect of a texture without continually reallocating it every time the size
of the valid rect changes within the actual tile size. This functionality is used
to keep around only a single depth texture for the SWGL compositor that is resized
to accommodate the maximum requested tile size, so that any surface or tile can
use it as desired.

Differential Revision: https://phabricator.services.mozilla.com/D80274
2020-06-24 04:20:56 +00:00
Lee Salzman 6e8db72e54 Bug 1646835 - move SWGL context creation into specific SWGL RenderCompositors. r=jrmuizel
Currently RendererOGL has mixed-in details of SWGL context creation which becomes messy
and slightly unanticipated based on the nomenclature and structure of RendererOGL. Based
on other work in bug 1646835, it becomes more natural to move this context creation into
the specific SWGL RenderCompositors so that RendererOGL can be agnostic to any SWGL
details.

Differential Revision: https://phabricator.services.mozilla.com/D80273
2020-06-24 01:23:43 +00:00
Lee Salzman 6221028051 Bug 1646835 - refactor RenderCompositorOGL into RenderCompositorNative. r=mstange
RenderCompositorOGL currently has many responsibilities including supporting
OpenGL compositor for Linux, whole-window compositing for Mac NativeLayerCA,
and per-cache-tile compositing for Mac NativeLayerCA. With the addition of
support for SWGL, this becomes even further complicated.

It becomes advantageous to separate out RenderCompositorOGL specifically as
only the basic OpenGL compositing case, as that naturally yields a simple and
isolated RenderCompositor.

What is left over becomes RenderCompositorNative, a basis for implementing
NativeLayer-based RenderCompositors. To cleanly isolate state and details of
when HW compositing or SW compositing is being used, these are further split
off into RCNativeOGL and RCNativeSWGL versions that deal with specific
isolated details of OpenGL and SWGL respectively.

RCNativeOGL deals with just setting up OpenGL FBOs for NativeLayers.

RCNativeSWGL's new task is just to deal mapping NativeLayers and providing
SWGL FBOs for them without involving OpenGL.

Differential Revision: https://phabricator.services.mozilla.com/D80270
2020-06-23 23:54:24 +00:00
Lee Salzman d879c564d6 Bug 1646835 - add MapTile/UnmapTile hooks to the WR compositor. r=mstange
RenderCompositors for SWGL that wish to provide accelerated compositing need to
subvert the existing Bind/Unbind hooks in the WR compositor. These compositors
need to keep track of their HW tiles without actually binding an OpenGL FBO
for WR to render picture cache tiles. SWGL needs to intervene and get a backing
buffer for tile from the RenderCompositor so that it can create a SWGL FBO for
WR to render the picture cache tile to.

To that end, this adds MapTile/UnmapTile as a replacement for Bind/Unbind for
those scenarios. This is done in a way that it affects only the WrCompositor of
webrender_bindings without actually altering WR's Compositor interface. This is
beneficial because WR does not have to understand the details of SWGL
integration and also so as not to complicate other users of WR such as Servo
who are not currently utilizing SWGL at all.

RenderCompositorOGL is initially modified to use these hooks in this patch. It
later became more convenient to restructure that in a follow-up patch.

Differential Revision: https://phabricator.services.mozilla.com/D80269
2020-06-23 23:55:11 +00:00
Lee Salzman a8bc86a552 Bug 1646835 - implement basic SWGL compositor. r=jrmuizel
This is a first implementation of a software-only SWGL RenderCompositor
that relies on the existing widget hooks for Basic compositing. It attempts
to lock the widget and get a DT whose underlying data it can supply directly
to SWGL to composite to. Critically, it does not rely on OpenGL or any other
form of HW accel to function. The interface between the RenderCompositor and
SWGL will be further refined in follow-up patches.

Differential Revision: https://phabricator.services.mozilla.com/D80268
2020-06-24 00:53:39 +00:00
Lee Salzman 62ba932186 Bug 1646835 - allow specifying backing data and stride for SWGL default framebuffer. r=jimb
For performance reasons in SWGL software compositors. to avoid unnecessary
full-screen copies of the framembuffer, we need to allow those compositors to
map their underlying widget surfaces and pass that buffer to SWGL so that they
can be directly rendered to. That also requires supporting custom strides, as
we can't always enforce the particular layout of the buffers handed off to us.
To that end, InitDefaultFramebuffer is generalized to take such information
and then many places where we rely on a specific hard-coded SWGL-calculated
stride have been altered to deal with a caller-supplied stride.

Differential Revision: https://phabricator.services.mozilla.com/D80267
2020-06-23 01:44:00 +00:00
Martin Stransky 2b91832e28 Bug 1645704 [Wayland] Rename WaylandDMABufSurface to DMABufSurface at gxf, r=sotaro
Differential Revision: https://phabricator.services.mozilla.com/D79637
2020-06-21 13:59:17 +00:00
Markus Stange 4c8b889f5e Bug 1646066 - Make partial valid rects work properly in NativeLayerCA. r=jrmuizel
This moves the clipping responsibility into the layer. It also brings back
assertions that make sure that no invalid content reaches the screen.
On the layer side I'm renaming validRect to displayRect, because at the time
NextSurface* is called, that rect is not yet valid.
This implementation also allows having valid content outside of the display
rect. So, for example, if you grow and shrink the display rect multiple times
but most of the outer parts are transparent, in theory this allows you to paint
the transparent pixels only once rather than every time the display rect
expands.

Differential Revision: https://phabricator.services.mozilla.com/D79842
2020-06-18 22:15:22 +00:00
Jeff Muizelaar 6613f1b6b7 Bug 1646741 - Update gleam to 0.12. r=kvark
For stride calculation and SSBOs

Differential Revision: https://phabricator.services.mozilla.com/D80191
2020-06-18 18:11:13 +00:00
Coroiu Cristina 96536abc93 Backed out changeset 9367aa4b97e2 (bug 1646741) for wrench failures on a CLOSED TREE 2020-06-18 21:03:36 +03:00
Jeff Muizelaar c326a65a01 Bug 1646741 - Update gleam to 0.12. r=kvark
For stride calculation and SSBOs

Differential Revision: https://phabricator.services.mozilla.com/D80191
2020-06-18 15:02:08 +00:00
Hiroyuki Ikezoe 77bf0111ce Bug 1467765 - Sample off-main-thread animations on the render backend thread in case of WebRender. r=kats
Now CompositorAnimationStorage::GetAnimatedValue() and SetAnimatedValue()s
are called on the sampler thread in case of WebRender, are called on the
compositor thread in case of non WebRender, so we drop assertions of
IsInCompositorThread check there. A mLock.AssertCurrentThreadOwns call in
each function should make sure the function gets called on the
sampler/compositor thread with acquiring the lock.

One caveat in this change is that in case we try to get an animation value via
nsIDOMWindowUtils.getOMTAStyle(), we do sample animations on the _compositor_
thread and we never call UpdateDynamicProperties, which means if it gets called
in testing refresh driver mode, visual results will differ from what the value
returned by the getOMTAStyle should look like. But it should be fine because we
disallow using any chrome priviledge APIs in reftests and also we will never use
the testing refresh driver mode in the reftest harness. Also in mochitests the
visual results' differences might make people confusing if the person can notice
it, but in principal getOMTAStyle() is designed to get computed animating values
so that it doesn't matter what the visual result is.

Differential Revision: https://phabricator.services.mozilla.com/D79982
2020-06-17 23:47:20 +00:00
Sylvestre Ledru acaa9649a8 Bug 1617369 - Reformat recent rust changes with rustfmt r=emilio
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D79796
2020-06-16 22:35:03 +00:00
Jeff Gilbert a97c615de2 Bug 1632249 - Support compositing out-of-process WebGL. r=handyman,lsalzman,nical,geckoview-reviewers,agi,imanol
* Majorly simplity CanvasRenderer
* Replace GLScreenBuffer with trivial GLSwapChain
* Use descriptor structs so that future SharedSurface changes aren't so painful
  to propagate
* Mortgage/strip out more OffscreenCanvas code for now

Differential Revision: https://phabricator.services.mozilla.com/D75055
2020-06-15 18:25:55 +00:00
Dzmitry Malyshau 1df0745ce1 Bug 1642495 - Use the same usage hint in WebRender for one-time reset r=gw
This should let the GL drivers to re-use the PBOs more aggressively,
and traverse the orphan list less.
Fwiw, it doesn't look like Angle differentiates between StreamDraw and DynamicDraw:
https://searchfox.org/mozilla-central/rev/598e50d2c3cd81cd616654f16af811adceb08f9f/gfx/angle/checkout/src/libANGLE/renderer/d3d/BufferD3D.cpp#65-66

Differential Revision: https://phabricator.services.mozilla.com/D78339
2020-06-13 01:38:10 +00:00
Andrew Osmond 8f69882854 Bug 1628657 - Make canvas use computed reference frame transforms. r=kvark
When a transform depends on the layout size of an element, one can see
visual distortions caused by the difference between the unsnapped size
used in the transform, and the snapped size calculated during scene
building. Ideally we could compute the transform after we snap, rather
than before. This patch adds support for a computed reference frame
which takes parameters to calculate the ideal transform dynamically.

In a future patch, we should make videos take advantage of this same
mechanism to avoid similar problems. This requires support for mirroring
and rotations.

Differential Revision: https://phabricator.services.mozilla.com/D77956
2020-06-11 20:46:05 +00:00
Dorel Luca 255f146f14 Backed out 7 changesets (bug 1632249) for Gtest perma chrash in [@ mozilla::BlockingResourceBase::CheckAcquire()]. CLOSED TREE
Backed out changeset 4ff99aab3ee8 (bug 1632249)
Backed out changeset d5b7fe789001 (bug 1632249)
Backed out changeset 64fbb616a0f3 (bug 1632249)
Backed out changeset 6f19f43e0a0b (bug 1632249)
Backed out changeset 073302d26c5e (bug 1632249)
Backed out changeset 7c94d37c446e (bug 1632249)
Backed out changeset 204b899f436d (bug 1632249)
2020-06-11 19:44:20 +03:00
sotaro c5381ed0cd Bug 1638819 - Skip SyncObjectD3D11Host::Synchronize() when RenderTextureHosts do not use ID3D11Texture2D r=jrmuizel
Simple implementation of skipping SyncObjectD3D11Host::Synchronize(). More optimization could be done in Bug 1635629.

Differential Revision: https://phabricator.services.mozilla.com/D75781
2020-06-11 07:28:30 +00:00
Jeff Gilbert cf3c8fedea Bug 1632249 - Support compositing out-of-process WebGL. r=handyman,lsalzman,nical,geckoview-reviewers,agi,imanol
* Majorly simplity CanvasRenderer
* Replace GLScreenBuffer with trivial GLSwapChain
* Use descriptor structs so that future SharedSurface changes aren't so painful
  to propagate
* Mortgage/strip out more OffscreenCanvas code for now

Differential Revision: https://phabricator.services.mozilla.com/D75055
2020-06-11 06:37:35 +00:00
Jamie Nicol 6ac8fcda94 Bug 1644732 - Don't call NotifyNotUsed() from ~RenderAndroidSurfaceTextureHostOGL(). r=sotaro
Doing so means it is called twice, which causes an assertion failure.

Differential Revision: https://phabricator.services.mozilla.com/D79127
2020-06-11 05:27:09 +00:00
Mihai Alexandru Michis 59ad7ed333 Backed out 6 changesets (bug 1632249) for causing bustages in CanvasRenderingContext2D.cpp
CLOSED TREE

Backed out changeset c93972b05d4f (bug 1632249)
Backed out changeset 04f5127c85d5 (bug 1632249)
Backed out changeset b15d91e64a25 (bug 1632249)
Backed out changeset 71ad2ed8e9ba (bug 1632249)
Backed out changeset 6e9a89ead3a5 (bug 1632249)
Backed out changeset dd00e2da3a0f (bug 1632249)
2020-06-11 02:43:35 +03:00
Jeff Gilbert 9b09e54345 Bug 1632249 - Support compositing out-of-process WebGL. r=handyman,lsalzman,nical,geckoview-reviewers,agi,imanol
* Majorly simplity CanvasRenderer
* Replace GLScreenBuffer with trivial GLSwapChain
* Use descriptor structs so that future SharedSurface changes aren't so painful
  to propagate
* Mortgage/strip out more OffscreenCanvas code for now

Differential Revision: https://phabricator.services.mozilla.com/D75055
2020-06-10 22:21:02 +00:00
Dorel Luca 7289b66d6f Backed out 4 changesets (bug 1632249) for Build bustages and mda failures. CLOSED TREE
Backed out changeset cdaa8a4e9e36 (bug 1632249)
Backed out changeset 9ff26bcc580c (bug 1632249)
Backed out changeset 16d84439756f (bug 1632249)
Backed out changeset bbfe23c61add (bug 1632249)
2020-06-09 03:19:48 +03:00
Kris Taeleman ca4c948827 Bug 1643832 - Add Pref flag to enable shader precaching at startup. r=jnicol
Differential Revision: https://phabricator.services.mozilla.com/D78580
2020-06-08 08:18:34 +00:00
Dzmitry Malyshau 59b6551dd5 Bug 1638672 - Use shaders to clear texture cache regions r=geckoview-reviewers,gw,snorp
This is a suggested workaround for an interesting visual bug that we see on
some platforms with Intel Broadwell GPUs.

Also reverts https://phabricator.services.mozilla.com/D57100

Differential Revision: https://phabricator.services.mozilla.com/D78705
2020-06-08 21:05:03 +00:00
Jeff Gilbert de6377896c Bug 1632249 - Support compositing out-of-process WebGL. r=handyman,lsalzman,nical,geckoview-reviewers,agi,imanol
* Majorly simplity CanvasRenderer
* Replace GLScreenBuffer with trivial GLSwapChain
* Use descriptor structs so that future SharedSurface changes aren't so painful
  to propagate
* Mortgage/strip out more OffscreenCanvas code for now

Differential Revision: https://phabricator.services.mozilla.com/D75055
2020-06-08 20:34:15 +00:00
sotaro 650f64603f Bug 1642839 - Implement WebRenderLayerManager::SendInvalidRegion() r=jrmuizel
When DWM is disabled, each window does not have own back buffer. They would paint directly to a buffer that was to be displayed by the video card. WM_PAINT via SendInvalidRegion() requests necessary re-paint. With it, RenderCompositorANGLE does not need to disable partial present.

Differential Revision: https://phabricator.services.mozilla.com/D77989
2020-06-05 05:03:40 +00:00
sotaro b12a00b03e Bug 1642834 - Add a comment to RenderCompositorANGLE::RequestFullRender() r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D77972
2020-06-03 22:32:10 +00:00
Bert Peers e05f202e2b Bug 1641704 - vendor tracy 0.1.1 (gfx/wr, bindings) r=gw
Differential Revision: https://phabricator.services.mozilla.com/D78100
2020-06-03 20:33:05 +00:00
sotaro 33ee2a10f6 Bug 1637497 - Disable partial present dynamically when Dwm is disabled r=jrmuizel
Do full render with WebRender when Dwn is disabled. It could be done by RenderCompositorANGLE::RequestFullRender().

Back out  Bug 1638469. It disables WebRender during starting if Dwm is disabled. But Dwm is enabled/disabled dynamically. And we do not want to disable WebRender in this case.

Differential Revision: https://phabricator.services.mozilla.com/D77221
2020-06-01 18:39:50 +00:00
Lee Salzman ff67b8251d Bug 1641671 - represent font size as f32 to avoid quantization issues. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D77367
2020-05-29 01:48:52 +00:00
Miko Mynttinen 6013e7cd95 Bug 1640457 - Discard pending WR display items if the Gecko item will be pushed as an image r=jrmuizel
If |nsDisplayItem::CreateWebRenderCommands()| returns false, the items that have been pushed to |DisplayListBuilder::pending_chunk| need to be cleared, because the item will be pushed as an image instead. This happens, for example, when nsDisplayText encounters unsupported features.

Differential Revision: https://phabricator.services.mozilla.com/D77095
2020-05-27 16:45:08 +00:00
sotaro 1e3d052869 Bug 1632357 - Use compositor window only when it is necessary r=nical
With current gecko, there are cases that compositor window is used even when it is not necessary. For example, fallback from DirectComposite with WebRender and fallback from double buffering with Compositor. With some gpu drivers, the fallbacks with compositor window causes rendering problem.

Differential Revision: https://phabricator.services.mozilla.com/D76470
2020-05-25 11:57:05 +00:00
Nicolas Silva bdabdf112f Bug 1635016 - Remove the rest of the SetTransactionLogging glue. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D74866
2020-05-18 12:11:33 +00:00
Sylvestre Ledru f69840fd80 Bug 1617369 - Reformat recent rust changes with rustfmt r=webdriver-reviewers,whimboo
# ignore-this-changeset

Depends on D76451

Differential Revision: https://phabricator.services.mozilla.com/D76663
2020-05-25 09:07:45 +00:00
Lee Salzman 9384fc8f0a Bug 1639563 - make WROTSAlloc::Grow check capacity instead of length. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D76582
2020-05-23 17:47:32 +00:00
Greg V 22c3a0e8d8 Bug 1620076 - Partial compositing (damage) with EGL_EXT_buffer_age in WebRender r=jgilbert
EGL with buffer-age requires the application to keep the front buffer
fully consistent. This means we have to draw the previous frame's
damage as well. (But we don't need to include it in the hint we're
sending to the system compositor via SwapBuffersWithDamage.)

Differential Revision: https://phabricator.services.mozilla.com/D61062
2020-05-22 18:15:13 +00:00
sotaro 2bb3ca363d Bug 1636868 - Add RenderTextureHostWrapper for GPUVideoTextureHost r=jrmuizel
By using RenderTextureHostWrapper, we could reduce re-creation of RenderDXGITextureHostOGL and RenderDXGIYCbCrTextureHostOGL.

Differential Revision: https://phabricator.services.mozilla.com/D74838
2020-05-22 19:42:38 +00:00
Lee Salzman e97b3d4035 Bug 1639563 - sanitize WR fonts. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D76360
2020-05-22 15:48:55 +00:00
Sylvestre Ledru 4ab6fe5285 Bug 1617369 - Reformat recent rust changes with rustfmt r=emilio DONTBUILD
# ignore-this-changeset

Depends on D76451

Differential Revision: https://phabricator.services.mozilla.com/D76452
2020-05-22 11:50:08 +00:00
Bogdan Tara 107fbafd77 Backed out 2 changesets (bug 1639563) for gfx related bustages CLOSED TREE
DONTBUILD
Backed out changeset b2c8de065886 (bug 1639563)
Backed out changeset 43abf0a9602a (bug 1639563)
2020-05-22 06:55:28 +03:00
Lee Salzman 91d6189dd9 Bug 1639563 - sanitize WR fonts. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D76360
2020-05-21 23:30:02 +00:00
Glenn Watson af3ddc2628 Bug 1617524 - Fix crash in get_relative_transform edge case. r=jnicol
Previously, WR would attempt to detect at the start of frame
building if the spatial node of any picture cache contained
a non-axis-aligned transform, and disable picture caching in
that edge case.

However, picture caching can't (currently) be disabled when the
native compositor is active. In this mode, picture caching was
force enabled, causing an assertion failure due to unexpected
coordinate systems when updating pictures.

This patch changes the way the detection of scroll root logic
works such that we don't consider any scroll frame inside a
reference frame to be a valid scroll root for picture caching
purposes. Thus it's not possible to create a picture cache
where the reference spatial node has a non-axis-aligned transform.

Differential Revision: https://phabricator.services.mozilla.com/D75890
2020-05-21 07:42:32 +00:00
sotaro f098f71977 Bug 1638750 - Remove unnecessary virtual from RenderTextureHost derived classes r=nical
Differential Revision: https://phabricator.services.mozilla.com/D75740
2020-05-18 13:59:44 +00:00
sotaro 2a3581f2ce Bug 1620458 - Revert part of Bug 1594303 fix r=nical
When android SurfaceTexture is rendered to WebGL, the SurfaceTexture should not be attached to GL context of WebRender.

Differential Revision: https://phabricator.services.mozilla.com/D66367
2020-05-16 00:46:28 +00:00
Glenn Watson de2845e48f Bug 1635610 - Enable per scroll root picture cache slices by default. r=jrmuizel,aosmond
Part 1 of this patch enables subpixel AA in more cases when there
are multiple picture cache slices. Because of this, we can enable
extra picture cache slices by default, as a performance win for
the general case.

Users who want to force subpixel AA in more cases, at the cost of
performance can manually set the about:config value called
gfx.webrender.quality.force-subpixel-aa-where-possible.

Differential Revision: https://phabricator.services.mozilla.com/D75465
2020-05-16 03:09:57 +00:00
Aaron Klotz 51e92c23de Bug 1637452: Part 14 - Fix JNI includes in gfx; r=gfx-reviewers,jrmuizel
In this bug we're moving away from monolithic JNI headers to class-specific
headers so that we don't have to rebuild the world every time we make a change
to a JNI interface.

Differential Revision: https://phabricator.services.mozilla.com/D75377
2020-05-15 17:05:59 +00:00
Jamie Nicol b10845210b Bug 1633432 - Don't detach SurfaceTextures from GL context on Pause(). r=sotaro,geckoview-reviewers,snorp,imanol
In bug 1470348 we started to detach all SurfaceTextures from the
current GL context in CompositorOGL::Pause(). This was required for
VR, so that when the VR presentation was entered the SurfaceTextures
could be attached to the VR context instead.

When RenderCompositorEGL was implemented for webrender, we copied the
call to detach from CompositorOGL. However, due to extra complexity in
webrender's threading model, this is causing assertion failures.

VR no longer relies upon the SurfaceTextures being detached when the
compositor is paused, as it now uses its own SurfaceTexture
set. Therefore we can remove the detach call from both
CompositorOGL::Pause and RenderCompositorEGL::Pause.

Differential Revision: https://phabricator.services.mozilla.com/D74832
2020-05-15 12:05:15 +00:00
Kartikaya Gupta c9a8fb7425 Bug 1622360 - Rename RenderRootDisplayListData. r=jrmuizel
Depends on D75125

Differential Revision: https://phabricator.services.mozilla.com/D75383
2020-05-15 00:07:34 +00:00
Kartikaya Gupta e07109f0ec Bug 1622360 - Remove the RenderRoot enum entirely, along with the feature docs. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D75125
2020-05-15 00:07:01 +00:00
Kartikaya Gupta cae38bcf26 Bug 1622360 - Remove mRenderRoot from WebRenderAPI classes. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D74951
2020-05-15 00:04:55 +00:00
Kartikaya Gupta 19ea62d2a1 Bug 1622360 - Remove render root propagation in NotifyDidSceneBuild codepath. r=jrmuizel
Depends on D74946

Differential Revision: https://phabricator.services.mozilla.com/D74947
2020-05-14 23:59:11 +00:00
Sylvestre Ledru 2271eb5b20 Bug 1617369 - Reformat recent rust changes with rustfmt r=kvark DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D75254
2020-05-14 14:19:32 +00:00
Dzmitry Malyshau ea310127f1 Bug 1637092 - Change WR capture path to point to the home folder r=Bert,webdriver-reviewers,whimboo
Point the captures to the home folder at all times.

Differential Revision: https://phabricator.services.mozilla.com/D74747
2020-05-12 13:41:31 +00:00
Glenn Watson 82367ea5d6 Bug 1636683 - Fix close buttons on Win7 + WR + external theme. r=kats
Reverts part of a change from bug 1632705 to allow close buttons
to be shown in Win7 under certain themes with WR enabled.

If it turns out that we need to support the clear rect + rounded
clip case, that can be implemented as a follow up - this is an
improvement for now though.

Differential Revision: https://phabricator.services.mozilla.com/D74752
2020-05-12 00:11:12 +00:00
sotaro 0ef8de9346 Bug 1636352 - Fix RenderThread::HandlePrepareForUse() calling r=jnicol
There could be a case that new RenderThread::PrepareForUse() and new WebRender transaction by WebRenderBridgeParent::MaybeGenerateFrame() achieve during calling UpdateAndRender().

Differential Revision: https://phabricator.services.mozilla.com/D74365
2020-05-11 20:58:51 +00:00
Kartikaya Gupta caba8fb538 Bug 1622360 - Remove render roots from APZ sampling codepath. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D74405
2020-05-11 20:08:15 +00:00
Kartikaya Gupta 6e66eea2d4 Bug 1622360 - Remove render root arguments from ScheduleRender functions. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D74404
2020-05-11 20:08:08 +00:00
Kartikaya Gupta cf2201e264 Bug 1622360 - Remove kRenderRoots. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D74403
2020-05-11 20:08:05 +00:00
Kartikaya Gupta d0cb7d8424 Bug 1622360 - Remove RenderRootArray. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D74186
2020-05-11 20:07:50 +00:00
Nicolas Silva be515a3296 Bug 1612440 - Add BlobImageHandler::create_similar. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D74297
2020-05-11 14:00:49 +00:00
Nicolas Silva ee478cb6d7 Bug 1612440 - Renamed clone_sender into create_sender. r=gw
This was split off from https://phabricator.services.mozilla.com/D71992

Depends on D74293

Differential Revision: https://phabricator.services.mozilla.com/D74296
2020-05-07 19:45:20 +00:00
Nicolas Silva f4e54a21aa Bug 1612440 - Make send_transaction take &mut self. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D74293
2020-05-11 10:27:26 +00:00
Sylvestre Ledru 45c60a761a Bug 1617369 - Reformat recent rust changes with rustfmt r=emilio
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D74530
2020-05-09 23:02:52 +00:00
Sylvestre Ledru 1929dd1ab3 Bug 1519636 - Reformat recent changes to the Google coding style r=andi
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D73347
2020-05-09 14:51:53 +00:00
Jean-Yves Avenard 912e294406 Bug 1634253 - P6. Remove MessageLoop use from gfx. r=kats,mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D73825
2020-05-08 20:20:44 +00:00
Narcis Beleuzu 58a833221c Backed out 9 changesets (bug 1634253) for bc failures on browser_bug295977_autoscroll_overflow.js . CLOSED TREE
Backed out changeset d41b75c1f7ec (bug 1634253)
Backed out changeset 5f8a1ee17b81 (bug 1634253)
Backed out changeset 43eda078b405 (bug 1634253)
Backed out changeset e98212a74709 (bug 1634253)
Backed out changeset 855e222ceb14 (bug 1634253)
Backed out changeset 9f01acdf4367 (bug 1634253)
Backed out changeset ea62cb1ec472 (bug 1634253)
Backed out changeset fa3e7588e7d6 (bug 1634253)
Backed out changeset 139e7035e736 (bug 1634253)
2020-05-08 23:09:31 +03:00
Jean-Yves Avenard f304da03ac Bug 1634253 - P6. Remove MessageLoop use from gfx. r=kats,mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D73825
2020-05-07 08:04:53 +00:00
Dorel Luca 9340fa2b2d Backed out 11 changesets (bug 1635001, bug 1634253) for Browser-chrome failures in browser_bug295977_autoscroll_overflow.js
Backed out changeset c3c27cb46db6 (bug 1635001)
Backed out changeset 6cea251e5910 (bug 1635001)
Backed out changeset 3cb0a05be7fc (bug 1635001)
Backed out changeset 1cbb2866a3ad (bug 1634253)
Backed out changeset 53fd00dcf95c (bug 1634253)
Backed out changeset e3acd9db7065 (bug 1634253)
Backed out changeset 5c0b7aa99406 (bug 1634253)
Backed out changeset dc7e17f772be (bug 1634253)
Backed out changeset 6e47af64396a (bug 1634253)
Backed out changeset 8865de9ae0ef (bug 1634253)
Backed out changeset 6fac93b596c2 (bug 1634253)
2020-05-07 11:00:04 +03:00
Jean-Yves Avenard 96d7622823 Bug 1634253 - P6. Remove MessageLoop use from gfx. r=kats,mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D73825
2020-05-07 05:03:42 +00:00
Kartikaya Gupta 9b72e95f96 Bug 1622360 - Drop the document frames counter stuff. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D73878
2020-05-05 18:15:36 +00:00
Simon Giesecke 2e6385ca34 Bug 1626570 - Improve handling of copying arrays in gfx/. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D73635
2020-05-05 12:55:27 +00:00
Glenn Watson fb839d472b Bug 1635022 - Add support for specifying blend container r=kats,Bert
Previously, WR would internally mark a parent stacking context
as requiring isolation when a stacking context with mix-blend-mode
was encountered.

However, this adds significant complexity to scene building in
WR, meaning that several decisions related to stacking context
redundancy, clip chain roots must be delayed until the stacking
context is popped.

By requiring the display list to annotate blend containers (Gecko
already has all this information available), we will be able to
simplify this scene building logic, which will unblock some
ongoing improvements to how clips are handled.

The patch introduces stacking context flags, and ports the existing
is_backdrop_root bool to be part of these flags. It also removes
an unused old field, cache_tiles.

Differential Revision: https://phabricator.services.mozilla.com/D73597
2020-05-04 20:28:44 +00:00
Glenn Watson 88eb2e5226 Bug 1632705 - Part 5 - Port some more clips to explicit rect API. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D73179
2020-04-30 12:08:54 +00:00
Glenn Watson ca78f5a8c2 Bug 1632705 - Part 4 - Port clear prims to use rounded clip rect API. r=kats
The implementation of this was previously ignoring the aRegion
parameter, so was completely broken. This is only used by the
Win7 widget code. This may fix an issue with drawing of window
close buttons on Windows 7 with WebRender enabled.

Differential Revision: https://phabricator.services.mozilla.com/D73163
2020-04-30 11:50:59 +00:00
Daniel Varga d0212aae27 Backed out changeset a8ca75f3002d (bug 1633985) on request by dev 2020-04-30 01:58:25 +03:00
Glenn Watson ab3883a1e7 Bug 1633985 - Remove unused clip parent and backface flag from push_iframe r=kats,nical
Differential Revision: https://phabricator.services.mozilla.com/D73006
2020-04-29 21:54:14 +00:00
Dorel Luca f906702a66 Backed out changeset 0a9371673354 (bug 1633985) for Webrender bustages. CLOSED TREE 2020-04-30 00:03:23 +03:00
Glenn Watson c222acf8ae Bug 1633985 - Remove unused clip parent and backface flag from push_iframe r=kats,nical
Differential Revision: https://phabricator.services.mozilla.com/D73006
2020-04-29 17:14:50 +00:00
Dzmitry Malyshau 8f221fe39d Bug 1633553 - Update dwrote to 0.11 r=jdm
Differential Revision: https://phabricator.services.mozilla.com/D72748
2020-04-27 21:47:21 +00:00
sotaro d117745eaf Bug 1633303 - Add glDebugCallback support to non shared gl context with WebRender r=gw
Bug 1632096 added the capability to shared gl context with WebRender. This bug extends the support to non shared gl context.

Differential Revision: https://phabricator.services.mozilla.com/D72579
2020-04-27 02:51:48 +00:00
Glenn Watson 63892870eb Bug 1632705 - Part 1 - Remove complex clips from scroll frame definitions. r=kats,Bert
They aren't used, so can easily be removed as the first part of
this seried of patches.

If this functionality is ever required, it can be handled by the
caller defining complex clip nodes explicitly.

Differential Revision: https://phabricator.services.mozilla.com/D72261
2020-04-24 18:29:38 +00:00
Sylvestre Ledru 7f26dcf1b6 Bug 1617369 - Reformat recent rust changes with rustfmt r=emilio
Done with:
./mach lint -l rustfmt --fix
with
rustfmt 1.4.12-stable (a828ffe 2020-03-11)

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D72527
2020-04-25 21:21:32 +00:00
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
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
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
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
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
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
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
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
Stefan Hindli 84357fecdc Backed out changeset 419be9960357 (bug 1561367) for causing wrench bustages CLOSED TREE 2020-04-20 17:22:53 +03:00
Andrew Osmond 69a83fc13a 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 12:53:03 +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
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
sotaro 5e373d876a Bug 1626142 - Fix canvas handling during resuming on Android r=jnicol
CanvasClientSharedSurface did not handle a case that CanvasClientSharedSurface was re-created, but GLScreenBuffer was not re-created. And RenderCompositorEGL::Pause() detaches all SurfaceTesxtures, but RenderAndroidSurfaceTextureHostOGL did not handle it.

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

--HG--
extra : moz-landing-system : lando
2020-04-14 14:07:30 +00:00
sotaro 7552fe3e1e Bug 1626822 - Add a way to enable WebRender without GPU process on Windows r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D69771

--HG--
extra : moz-landing-system : lando
2020-04-14 03:27:12 +00:00
Kartikaya Gupta 442f54f533 Bug 1566599 - Have the WR hit-test return all results to the caller. r=botond
No functional changes here, just plumbing to allow the caller to
access all the results instead of just the one picked out by
bindings.rs.

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

--HG--
extra : moz-landing-system : lando
2020-04-14 00:43:18 +00:00
Brindusan Cristian 2ad9b58e73 Backed out changeset d05ac327b65e (bug 1626822) for bustages at gfxPlatform.cpp. CLOSED TREE 2020-04-14 03:12:33 +03:00
sotaro fb4859cf94 Bug 1626822 - Add a way to enable WebRender without GPU process on Windows r=jrmuizel
WebRender could be used when WebRender does not use ANGLE. And there is a case that we want to use WebRender with ANGLE for testing.

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

--HG--
extra : moz-landing-system : lando
2020-04-13 23:55:08 +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
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
Kartikaya Gupta cee04b337d Bug 1622360 - Remove the sub-builder machinery. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D69844

--HG--
extra : moz-landing-system : lando
2020-04-06 20:45:14 +00:00
Sylvestre Ledru 0aa6f03cf3 Bug 1519636 - Reformat recent changes to the Google coding style r=jgilbert
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2020-04-05 13:34:58 +00:00
Botond Ballo 0db5983e81 Bug 1627482 - Fix non-unified build errors in gfx/webrender_bindings. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D69736

--HG--
extra : moz-landing-system : lando
2020-04-05 03:49:51 +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
Glenn Watson bdde050f84 Bug 1625816 - Fix rectangle display item bounds being affected by display port clip. r=nical
This can cause extra invalidations in picture caching.

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

--HG--
extra : moz-landing-system : lando
2020-04-01 10:01:26 +00:00
Kartikaya Gupta bd12f9cf60 Bug 1622360 - Remove NonDefaultRenderRootArray. r=jrmuizel
There's only one instance of this left (mSubBuilders) and that can be
easily removed as well.

Depends on D68865

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

--HG--
extra : moz-landing-system : lando
2020-04-01 13:40:13 +00:00