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

2528 Коммитов

Автор SHA1 Сообщение Дата
Markus Stange bbac1f4919 Bug 1717889 - Make sure we don't call NextSurfaceAsFramebuffer on zero-sized native layers. r=mkaply
Differential Revision: https://phabricator.services.mozilla.com/D119676
2021-07-16 15:20:17 +00:00
Alexandru Michis fbd939b860 Backed out 2 changesets (bug 1720804) for causing bustages.
CLOSED TREE

Backed out changeset 5278e88c6d34 (bug 1720804)
Backed out changeset 1acb4ed79b6b (bug 1720804)
2021-07-16 18:10:11 +03:00
Miko Mynttinen ffc501ddc9 Bug 1720804 - Part 1: Move majority of the display list code inside mozilla namespace r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D120041
2021-07-16 14:36:34 +00:00
Tom Ritter 1b9b6b72db Bug 1666222: Cut over a ton of NowUnfuzzed calls -> Now 4/5 r=smaug,extension-reviewers,zombie
With Fuzzyfox removed, Now() does what NowUnfuzzed() did.

Differential Revision: https://phabricator.services.mozilla.com/D119639
2021-07-14 18:18:17 +00:00
Robert Mader ab2349d790 Bug 1718570 - Implement full partial damage support, r=gfx-reviewers,aosmond,jnicol
This becomes possible as a side effect of making sure that the current
buffer content is always completely valid, by blitting from the
previous buffer, analogous to
`NativeLayerCA::HandlePartialUpdate` and
`WindowSurfaceWaylandMB::HandlePartialUpdate`.

Apart from reducing overpaint, this improves correctness is many
situations, avoiding glitches.

Note: the approach here may not be optimal concerning efficiency yet
and improvements are planed after further refactoring.

Depends on D118925

Differential Revision: https://phabricator.services.mozilla.com/D119015
2021-07-14 10:05:08 +00:00
Nicolas Silva 6a1d26379e Bug 1719297 - Address uninitialized value warning (valgrind) in HitTestInfoManager. r=gfx-reviewers,bradwerth
Differential Revision: https://phabricator.services.mozilla.com/D119186
2021-07-13 11:32:33 +00:00
Jamie Nicol 790229886f Bug 1719367 - Hook up default clear color to RenderCompositorLayersSWGL. r=sotaro
Fenix makes use of the default clear color by setting it to a dark
color when the dark theme is enabled to avoid white flashes while
pages are loading. In bug 1663732 we hooked this functionality up to
webrender, however, it was only used by the draw compositor. Now with
software webrender on Android, we sometimes use
RenderCompositorLayersSWGL rather than the draw compositor, and users
are therefore experiencing white flashes during page loads.

This adds a clear_color argument to StartCompositing(), which
RenderCompositorLayersSWGL uses to set the CompositorOGL's clear
color. This patch also makes Renderer::clear_color not an Option
type, as we only ever used it in Some form, and that simplifies the
FFI.

Differential Revision: https://phabricator.services.mozilla.com/D119272
2021-07-08 11:46:37 +00:00
Sandor Molnar 53b20ea46f Backed out changeset b5ad7d43bc54 (bug 1719367) for causing build bustages. CLOSED TREE 2021-07-08 12:28:55 +03:00
Jamie Nicol 8ee6c18a77 Bug 1719367 - Hook up default clear color to RenderCompositorLayersSWGL. r=sotaro
Fenix makes use of the default clear color by setting it to a dark
color when the dark theme is enabled to avoid white flashes while
pages are loading. In bug 1663732 we hooked this functionality up to
webrender, however, it was only used by the draw compositor. Now with
software webrender on Android, we sometimes use
RenderCompositorLayersSWGL rather than the draw compositor, and users
are therefore experiencing white flashes during page loads.

This adds a clear_color argument to StartCompositing(), which
RenderCompositorLayersSWGL uses to set the CompositorOGL's clear
color. This patch also makes Renderer::clear_color not an Option
type, as we only ever used it in Some form, and that simplifies the
FFI.

Differential Revision: https://phabricator.services.mozilla.com/D119272
2021-07-08 09:01:28 +00:00
Jamie Nicol c848d251a0 Bug 1670622 - Ensure GL context is current prior to webrender initialization. r=gfx-reviewers,jgilbert
We sometimes see webrender renderer initialization failing due to an
invalid max texture size being reported. The logcat shows that there
is no current GL context, and as a result glGet returns 0 when
querying the max texture size. This occurs after the
AndroidSharedBlitGL context has been destroyed on the renderer thread,
leaving no context as current.

This patch adds a call to MakeCurrent() for the renderer's OpenGL
context prior to renderer initialzation. This means we successfully
query the texture size and avoid the initialization error.

Differential Revision: https://phabricator.services.mozilla.com/D119334
2021-07-08 08:59:49 +00:00
sotaro 1dbe2952b1 Bug 1718497 - Copy opaque tile instead of premultiplied blending r=lsalzman
Copy tiles data when tiles are opaque instead of blending them.

RenderCompositorLayersSWGL always blends tiles as premultiplied tiles. But it could not handle clear tiles and caused Bug 1718497. The problem does not happen with RenderCompositorSWGL. It copies tile data when tile is opaque. Then, RenderCompositorSWGL handles clear tiles correctly.

Differential Revision: https://phabricator.services.mozilla.com/D118953
2021-07-05 00:08:07 +00:00
Jeff Muizelaar 416aaca8c8 Bug 1718334 - RELEASE_ASSERT the last map succeeded. r=jgilbert
The RELEASE_ASSERT below is failing so this will help
us narrow down which Map() call it might be.

Differential Revision: https://phabricator.services.mozilla.com/D118866
2021-06-25 20:56:14 +00:00
Jeff Gilbert afdbf9538b Bug 1459526 - Handle full-range video in Webrender. r=gw,lsalzman
+ Begin to add video tests to ensure we ratchet towards correctness.
+ Test rec709 x (yuv420p, yuv420p10, gbrp) x (tv, pc) x codecs.
+ Just mark fuzziness for now. Better would be e.g. 16_127_233 'bad
  references'.

Differential Revision: https://phabricator.services.mozilla.com/D115298
2021-06-25 19:16:22 +00:00
Robert Mader 26c93593a4 Bug 1646135 - Set draw buffer after eglMakeCurrent when using desktop GL,r=gfx-reviewers,lsalzman
Original patch by Erik Kurzinger: D118304

The following is currently not well-defined by the EGL specification:

 1. Create context.
 2. Make it current with no default framebuffer (as a surface-less context, ie bind EGL_NO_SURFACE for both surfaces)
 3. Make it current with a default framebuffer (ie with some draw/read surfaces)

After Step #3 what is the current draw buffer state? is it GL_NONE or GL_BACK?

With Mesa's EGL implementation, the answer is GL_BACK, and WebRender's EGL
backend currently assumes this behavior. However with the proprietary NVIDIA
driver the answer is actually GL_NONE, meaning any rendering done after step #3
will be lost.

As a fix, Firefox can simple call glDrawBuffer after making a surface current
to set the draw buffer appropriately, either to GL_BACK for a double-buffered
surface or to GL_FRONT for single-buffered. As mentioned above, this is
redundant on Mesa, but should also be harmless.

Differential Revision: https://phabricator.services.mozilla.com/D118743
2021-06-25 15:29:29 +00:00
Brindusan Cristian 4920fc0ffd Backed out changeset 717b4a7cc264 (bug 1646135) as requested by rmader for causing a regression.
CLOSED TREE
2021-06-25 18:19:50 +03:00
Robert Mader 3f85e626d8 Bug 1646135 - Set draw buffer after eglMakeCurrent on Wayland and X11,r=gfx-reviewers,lsalzman
Original patch by Erik Kurzinger: D118304

The following is currently not well-defined by the EGL specification:

 1. Create context.
 2. Make it current with no default framebuffer (as a surface-less context, ie bind EGL_NO_SURFACE for both surfaces)
 3. Make it current with a default framebuffer (ie with some draw/read surfaces)

After Step #3 what is the current draw buffer state? is it GL_NONE or GL_BACK?

With Mesa's EGL implementation, the answer is GL_BACK, and WebRender's EGL
backend currently assumes this behavior. However with the proprietary NVIDIA
driver the answer is actually GL_NONE, meaning any rendering done after step #3
will be lost.

As a fix, Firefox can simple call glDrawBuffer after making a surface current
to set the draw buffer appropriately, either to GL_BACK for a double-buffered
surface or to GL_FRONT for single-buffered. As mentioned above, this is
redundant on Mesa, but should also be harmless.

Differential Revision: https://phabricator.services.mozilla.com/D118743
2021-06-25 12:34:27 +00:00
Brindusan Cristian 3b52a2bfa1 Backed out changeset e5d0803d80dd (bug 1646135) for causing mochitest-plain crashes.
CLOSED TREE
2021-06-25 15:07:31 +03:00
Robert Mader dc15197dd2 Bug 1646135 - Set draw buffer after eglMakeCurrent on Wayland and X11,r=gfx-reviewers,lsalzman
Original patch by Erik Kurzinger: D118304

The following is currently not well-defined by the EGL specification:

 1. Create context.
 2. Make it current with no default framebuffer (as a surface-less context, ie bind EGL_NO_SURFACE for both surfaces)
 3. Make it current with a default framebuffer (ie with some draw/read surfaces)

After Step #3 what is the current draw buffer state? is it GL_NONE or GL_BACK?

With Mesa's EGL implementation, the answer is GL_BACK, and WebRender's EGL
backend currently assumes this behavior. However with the proprietary NVIDIA
driver the answer is actually GL_NONE, meaning any rendering done after step #3
will be lost.

As a fix, Firefox can simple call glDrawBuffer after making a surface current
to set the draw buffer appropriately, either to GL_BACK for a double-buffered
surface or to GL_FRONT for single-buffered. As mentioned above, this is
redundant on Mesa, but should also be harmless.

Differential Revision: https://phabricator.services.mozilla.com/D118743
2021-06-25 11:22:11 +00:00
Iulian Moraru 1a8cb02555 Backed out changeset 10a229d128c0 (bug 1459526) for causing reftest failures on short.mp4.lastframe.html. CLOSED TREE 2021-06-25 06:34:36 +03:00
Jeff Gilbert 5c14187731 Bug 1459526 - Handle full-range video in Webrender. r=gw,lsalzman
+ Begin to add video tests to ensure we ratchet towards correctness.
+ Test rec709 x (yuv420p, yuv420p10, gbrp) x (tv, pc) x codecs.
+ Just mark fuzziness for now. Better would be e.g. 16_127_233 'bad
  references'.

Differential Revision: https://phabricator.services.mozilla.com/D115298
2021-06-24 23:43:31 +00:00
Jeff Muizelaar af3807e72a Bug 1717966 - MOZ_RELEASE_ASSERT that we succesfully have a buffer. r=mattwoodrow
If we've failed we're going to crash anyways so might as well
do it sooner and more descriptively.

Differential Revision: https://phabricator.services.mozilla.com/D118665
2021-06-24 00:39:18 +00:00
Jeff Muizelaar 9516b71d67 Bug 1717737 - Probe mapped data to ensure it's writable. r=mattwoodrow
In bug 1717519 we're seeing access violations when writing
to the destination with SWGL. This does some early writes
to try to catch the problem earlier.

Differential Revision: https://phabricator.services.mozilla.com/D118556
2021-06-23 02:33:20 +00:00
Glenn Watson 7f78f859a7 Bug 1716933 - Remove DefineClip API from WR public API r=gfx-reviewers,jrmuizel
This will allow simplifying some of the internal clip handling
during scene building.

Differential Revision: https://phabricator.services.mozilla.com/D118127
2021-06-20 22:26:54 +00:00
Glenn Watson 4f5a747e61 Bug 1716925 - Remove use of DefineClip in ClipManager r=gfx-reviewers,jrmuizel
This removes the last use of DefineClip from Gecko, which will
allow removing and simplifying a lot of the clip handing code
during scene building in WR.

Differential Revision: https://phabricator.services.mozilla.com/D118121
2021-06-20 22:26:53 +00:00
Alexandru Michis 3477ca89c8 Backed out changeset f7016db57a2e (bug 1459526) for causing reftest failures.
CLOSED TREE
2021-06-18 07:49:06 +03:00
Jeff Gilbert 920429087b Bug 1459526 - Handle full-range video in Webrender. r=gw,lsalzman
+ Begin to add video tests to ensure we ratchet towards correctness.
+ Test rec709 x (yuv420p, yuv420p10, gbrp) x (tv, pc) x codecs.
+ Just mark fuzziness for now. Better would be e.g. 16_127_233 'bad
  references'.

Differential Revision: https://phabricator.services.mozilla.com/D115298
2021-06-17 23:43:34 +00:00
Robert Mader 79cba7d9ea Bug 1713686 - Disbale redraw_on_invalidation in RenderCompositorSWGL on Wayland, r=lsalzman,gfx-reviewers
This was introduced in D106246. Most likely it is only necessary
on uncomposited legacy desktops. So on Linux only enable it for X11,
leaving out Wayland.

Removing it makes `RenderCompositorSWGL` behave (more) equally to
`RenderCompositorOGLSWGL`, massively reducing overpaint on certain
websites like testufo.com and improving frame rates on many low-end
devices.

Differential Revision: https://phabricator.services.mozilla.com/D118192
2021-06-17 19:50:59 +00:00
Csoregi Natalia 7543c5e82b Backed out changeset fb2f9cfe820d (bug 1716579) for valgrind bustage. CLOSED TREE 2021-06-17 19:40:08 +03:00
Jeff Muizelaar fc208a231c Bug 1712367. Avoid TexSubImage ES slow path. r=jgilbert,sotaro
Instead of drawing updates into the correct spot in the destination
DataSourceSurface we just use it as scratch space and always
draw in the top-left with stride = bpp*width.

We add a dstOffset to the upload functions to support using
a subsurface.

Differential Revision: https://phabricator.services.mozilla.com/D116501
2021-06-17 13:24:05 +00:00
Nicolas Silva 7dc5b1ba84 Bug 1716579 - Minimize memory usage of windows that haven't been rendered for a long time. r=gfx-reviewers,bradwerth
Differential Revision: https://phabricator.services.mozilla.com/D117918
2021-06-17 12:42:02 +00:00
Andi-Bogdan Postelnicu d844b7a2dd Bug 1617369 - Reformat recent rust changes with rustfmt r=necko-reviewers,webdriver-reviewers,kvark
Updated with rustfmt 1.4.36-stable (7de6968 2021-02-07)

Differential Revision: https://phabricator.services.mozilla.com/D117906
2021-06-17 11:00:22 +00:00
Butkovits Atila 367d829107 Backed out changeset 318f32313091 (bug 1459526) for causing wrench bustages. CLOSED TREE 2021-06-17 04:45:11 +03:00
Jeff Gilbert 72024fcc23 Bug 1459526 - Handle full-range video in Webrender. r=gw,lsalzman
+ Begin to add video tests to ensure we ratchet towards correctness.
+ Test rec709 x (yuv420p, yuv420p10, gbrp) x (tv, pc) x codecs.
+ Just mark fuzziness for now. Better would be e.g. 16_127_233 'bad
  references'.

Differential Revision: https://phabricator.services.mozilla.com/D115298
2021-06-17 01:12:18 +00:00
sotaro d2f29f94be Bug 1715953 - Add flush DrawTarget r=lsalzman,gfx-reviewers
Needs to call flush DrawTarget to apply pending updates.

Differential Revision: https://phabricator.services.mozilla.com/D117628
2021-06-14 22:34:49 +00:00
Glenn Watson 786dd59014 Bug 1715935 - Add experimental low quality pinch-zoom mode. r=gfx-reviewers,kvark
Building on previous patches, this adds a preference to enable
a low quality pinch-zoom mode that reuses cached tiles where
possible.

It doesn't currently redraw at the higher quality scale at the
end of a pinch-zoom, and there are some sampling artifacts in some
cases. However, it should be enough to do some performance testing
on low and devices and see if it helps.

Differential Revision: https://phabricator.services.mozilla.com/D117497
2021-06-14 20:40:21 +00:00
Nicolas Silva 2be01aafa4 Bug 1711648 - Move LayoutRect to the Box2D representation. r=jrmuizel.
Differential Revision: https://phabricator.services.mozilla.com/D117293
2021-06-11 13:33:10 +00:00
Andrew Osmond 805d9ce3e3 Bug 1715902 - Refuse WebRender on Linux if backed by software driver. r=jrmuizel
Reject software rasterizers on Linux (except Software WebRender) when
trying to create full WebRender, unless WebRender was force enabled.

Differential Revision: https://phabricator.services.mozilla.com/D117534
2021-06-11 13:15:17 +00:00
Alexandru Michis b9be72a526 Backed out 6 changesets (bug 1711648) for causing crashes in FrameBuilder.
CLOSED TREE

Backed out changeset 0384828b36cc (bug 1711648)
Backed out changeset 15d8e0d681ef (bug 1711648)
Backed out changeset b27d8421ebc5 (bug 1711648)
Backed out changeset 12da58f4ac4f (bug 1711648)
Backed out changeset 1d4c0b685f0e (bug 1711648)
Backed out changeset 367235e897e3 (bug 1711648)
2021-06-10 18:28:27 +03:00
Nicolas Silva 69c80ddaa7 Bug 1711648 - Move LayoutRect to the Box2D representation. r=jrmuizel.
Differential Revision: https://phabricator.services.mozilla.com/D117293
2021-06-10 13:07:34 +00:00
Marian-Vasile Laza 5dc1a42e67 Backed out 6 changesets (bug 1711648) for causing build bustages.
CLOSED TREE

Backed out changeset a803c960b909 (bug 1711648)
Backed out changeset d07c38d536c5 (bug 1711648)
Backed out changeset 823b75fc8c3c (bug 1711648)
Backed out changeset 602a2bcc5e29 (bug 1711648)
Backed out changeset 99ce7c7e458d (bug 1711648)
Backed out changeset bdbc65799b8a (bug 1711648)
2021-06-10 12:25:48 +03:00
Nicolas Silva 6cdbec834a Bug 1711648 - Move LayoutRect to the Box2D representation. r=jrmuizel.
Differential Revision: https://phabricator.services.mozilla.com/D117293
2021-06-10 08:08:07 +00:00
Nazım Can Altınova 9c536ede95 Bug 1690624 - Replace the old profiler thread registration FFIs with the new API in webrender r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D116516
2021-06-09 11:22:55 +00:00
Nazım Can Altınova 5bcc4d95af Bug 1690624 - Add profiler rust API for thread registration/unregistration r=gerald,emilio
Differential Revision: https://phabricator.services.mozilla.com/D116515
2021-06-09 11:22:55 +00:00
Robert Mader 1dbe34f5cc Bug 1711244 - Register native layers for GDK frame callbacks,
Analogous to D102835 we need to make GDK aware of opaque surfaces
so frame callbacks get emitted for these surfaces as well. Otherwise
GDK may get stuck waiting on callbacks when used on compositors
that don't emit callbacks for occluded surfaces (which is explicitly
encouraged by the Wayland spec).

GDK runs on the main thread, so we need to dispatch these action
to the main thread as well.

Differential Revision: https://phabricator.services.mozilla.com/D116747
2021-06-03 17:42:29 +00:00
Narcis Beleuzu 1c1dfcf888 Backed out changeset 37aeebaea4bb (bug 1711244) for clang bustages on NativeLayerWayland.cpp . CLOSED TREE 2021-06-03 20:11:32 +03:00
Robert Mader f7b6df5c89 Bug 1711244 - Register native layers for GDK frame callbacks,
Analogous to D102835 we need to make GDK aware of opaque surfaces
so frame callbacks get emitted for these surfaces as well. Otherwise
GDK may get stuck waiting on callbacks when used on compositors
that don't emit callbacks for occluded surfaces (which is explicitly
encouraged by the Wayland spec).

GDK runs on the main thread, so we need to dispatch these action
to the main thread as well.

Differential Revision: https://phabricator.services.mozilla.com/D116722
2021-06-03 14:46:48 +00:00
Jeff Muizelaar 6826ec4fff Bug 1713486. Fix per context swgl memory reporting. r=lsalzman
This passes the swgl context down from the renderer
instead of using the current context. This ensures
we report all of the contexts and don't double report.

Differential Revision: https://phabricator.services.mozilla.com/D116474
2021-06-02 15:40:46 +00:00
Nicolas Silva fd03e01f61 Bug 1711648 - Move all device rects to the Box2D representations. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D116401
2021-06-02 12:47:03 +00:00
Nicolas Silva be0eb5fbfc Bug 1711648 - Update euclid to 0.22.6. r=gfx-reviewers,jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D116266
2021-06-02 12:47:02 +00:00
Csoregi Natalia fb7cb8d3fc Backed out changeset 1e39147271cc (bug 1713486) for webrender bustage on webrender\src\device\gl.rs. CLOSED TREE 2021-06-02 16:08:43 +03:00