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

100 Коммитов

Автор SHA1 Сообщение Дата
Butkovits Atila aeb018ca75 Backed out changeset 48381173c92c (bug 1780315) for causing bug 1782764. CLOSED TREE 2022-08-03 13:43:39 +03:00
Timothy Nikkel 5f9393c35d Bug 1780315. Use a timer to make sure all profiler screenshots get submitted. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D152232
2022-08-02 11:14:17 +00:00
Brad Werth 6c7a45e39b Bug 1731136 Part 1: Extend compositor to manage backdrop surfaces. r=gw
This is all scaffolding that will be used by later parts of this patch
series.

Differential Revision: https://phabricator.services.mozilla.com/D128130
2022-06-01 19:40:02 +00:00
Molnar Sandor 307fd4a744 Backed out 5 changesets (bug 1731136) for causing reftest failures in layout/reftests/bugs/299136-1.html CLOSED TREE
Backed out changeset d2a56d51c65b (bug 1731136)
Backed out changeset a24467137e9b (bug 1731136)
Backed out changeset e127e41e12da (bug 1731136)
Backed out changeset 7dfdcb74d1c1 (bug 1731136)
Backed out changeset 6b5626a7b82d (bug 1731136)
2022-06-01 04:12:55 +03:00
Brad Werth 5455eef7f6 Bug 1731136 Part 1: Extend compositor to manage backdrop surfaces. r=gw
This is all scaffolding that will be used by later parts of this patch
series.

Differential Revision: https://phabricator.services.mozilla.com/D128130
2022-05-31 22:21:14 +00:00
criss 59b9e1210a Backed out 4 changesets (bug 1731136) for causing Bug 1771465 . CLOSED TREE
Backed out changeset c333a19d8712 (bug 1731136)
Backed out changeset 6b5b4b5eb1e9 (bug 1731136)
Backed out changeset 7afa3f4b5a85 (bug 1731136)
Backed out changeset b408a3230170 (bug 1731136)
2022-05-27 17:39:43 +03:00
Brad Werth 4af362a7f6 Bug 1731136 Part 1: Extend compositor to manage backdrop surfaces. r=gw
This is all scaffolding that will be used by later parts of this patch
series.

Differential Revision: https://phabricator.services.mozilla.com/D128130
2022-05-26 15:24:12 +00:00
sotaro 5477d7dc1d Bug 1742440 - Add debug capability to check window visibility state by overlay r=gfx-reviewers,nical
It is helpful if window visibility state could be checked by debug overlay.
For now, it works only on Windows with compositor.

Differential Revision: https://phabricator.services.mozilla.com/D131807
2021-11-25 11:33:46 +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
Glenn Watson f459eaca0d Bug 1712871 - Move max_update_rects into CompositorCapabilities r=lsalzman,gfx-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D115954
2021-05-26 20:09:58 +00:00
Robert Mader 68fa6c04b1 Bug 1707943 - webrender_bindings: Fix warnings and apply suggestions form static analysis, r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D113603
2021-04-28 12:33:55 +00:00
sotaro 6386e4b519 Bug 1673342 - Add Support of software WebRender with CompositorOGL on Android and Linux r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D106234
2021-03-01 13:45:38 +00:00
Lee Salzman f2c57b81f4 Bug 1690216 - Report whether to redraw on invalidation to WR. r=mattwoodrow
This requires us to plumb CompositorCapabilities to support the extra field.
This is complicated by the fact that since it is a Rust struct, it has no
default constructor that can pass through to C++ via bindings, so every
one of our RenderCompositors was forced to manually initialize fields. To
get around this brittle footgun, instead the structure is initialized on
the Rust side, and RenderCompositor's are encouraged to only change fields
that actually diverge from the defaults as passed in via pointer.

Finally, we can then do what we need to do, which is just to send the
ForceRedraw message that needs to happen based on what we know about
CompositorCapabilities.

Differential Revision: https://phabricator.services.mozilla.com/D106246
2021-02-24 14:15:02 +00:00
Andreea Pavel 4d15e7e3f1 Backed out changeset 45b36995cfd6 (bug 1690216) for build bustages at rules.mk on a CLOSED TREE 2021-02-24 12:03:14 +02:00
Lee Salzman e746523892 Bug 1690216 - Report whether to redraw on invalidation to WR. r=mattwoodrow
This requires us to plumb CompositorCapabilities to support the extra field.
This is complicated by the fact that since it is a Rust struct, it has no
default constructor that can pass through to C++ via bindings, so every
one of our RenderCompositors was forced to manually initialize fields. To
get around this brittle footgun, instead the structure is initialized on
the Rust side, and RenderCompositor's are encouraged to only change fields
that actually diverge from the defaults as passed in via pointer.

Finally, we can then do what we need to do, which is just to send the
ForceRedraw message that needs to happen based on what we know about
CompositorCapabilities.

Differential Revision: https://phabricator.services.mozilla.com/D106246
2021-02-24 09:18:33 +00:00
Matt Woodrow eb7fe574cb Bug 1687124 - Make SwCompositor compute the set of opaque rectangles, and forward this to the RenderCompositor. r=gw,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D102665
2021-01-27 03:17:16 +00:00
Bogdan Tara 5eded5baf9 Backed out 3 changesets (bug 1687124) for webrender_bindings related failure CLOSED TREE
Backed out changeset 8832f33fa266 (bug 1687124)
Backed out changeset 27de9357456e (bug 1687124)
Backed out changeset b9ca229672d5 (bug 1687124)
2021-01-27 04:04:10 +02:00
Matt Woodrow 1875a8e5ab Bug 1687124 - Make SwCompositor compute the set of opaque rectangles, and forward this to the RenderCompositor. r=gw,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D102665
2021-01-26 06:53:05 +00:00
Lee Salzman 8bee9f98ac Bug 1679215 - add support for StartCompositing hook to RenderCompositor. r=mattwoodrow
We need to be able to delay instantiation of the drawing region until after we have the
dirty rects from start_compositing. This was currently not routed to RenderCompositor,
which is required to do this. Further, SwCompositor needs to always keep track of the
RenderCompositor that it is associated with regardless of whether or not it is a native
compositor so that this hook can be properly engaged.

Differential Revision: https://phabricator.services.mozilla.com/D100974
2021-01-10 23:26:23 +00:00
sotaro 06a65d02a0 Bug 1685241 - Disable WebRender rendering when RenderCompositorEGL is paused r=nical
Crash could happen with WebRender rendering when RenderCompositorEGL is not ready for rendering. With the change, RenderCompositorEGL::BeginFrame() is not called when RenderCompositorEGL is not ready.

Differential Revision: https://phabricator.services.mozilla.com/D100871
2021-01-07 10:23:30 +00:00
Andi-Bogdan Postelnicu 7b246e293f Bug 1683551 - Make `gfx` buildable outside of `unified-build` environment. r=sg,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D100209
2021-01-04 14:20:17 +00:00
sotaro 9cba7102e4 Bug 1681869 - Add screenshots and frame recording support to RenderCompositorD3D11SWGL r=mstange
Implementation mimics RenderCompositorNative and uses Compositor screenshot handling.

Differential Revision: https://phabricator.services.mozilla.com/D99418
2020-12-11 21:41:45 +00:00
Andrew Osmond 45b5262f91 Bug 1632698 - Better handle device resets when we don't have a GPU process. r=sotaro,kvark,nical
Aside from on Windows, we do not appear to handle device resets properly
without the GPU process. This patch adds in the necessary plumbing to
handle the device reset properly. It also ensures that whenever we check
for a device reset reason, we handle all of the reasons (e.g. not just
the NV video memory purge reset reason) to ensure they are not lost, and
handles them all consistently in the same manner.

It also tracks the number of device resets for thresholding purposes
with an in process compositor. While it will only disable WebRender on
Linux at this time, it will put a note in the critical log if the
threshold was exceeded on all platforms. This may prove useful in
evaluating whether or not we should do the same everywhere.

Differential Revision: https://phabricator.services.mozilla.com/D98705
2020-12-07 20:36:11 +00:00
Matt Woodrow 979882e86f Bug 1673983 - Add RenderTextureHostSWGL support to D3D11 RenderTextureHosts. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D95799
2020-11-06 00:01:36 +00:00
Narcis Beleuzu 37bd723824 Backed out 4 changesets (bug 1673983) for linting failure on moz.build CLOSED TREE
Backed out changeset f408fc890ba1 (bug 1673983)
Backed out changeset 49ae9de85ab9 (bug 1673983)
Backed out changeset 91d8f0f829fd (bug 1673983)
Backed out changeset 91cb8ee8ddd8 (bug 1673983)
2020-11-06 00:10:34 +02:00
Matt Woodrow 489a752d51 Bug 1673983 - Add RenderTextureHostSWGL support to D3D11 RenderTextureHosts. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D95799
2020-11-05 20:18:13 +00:00
smolnar 625b8a74be Backed out 4 changesets (bug 1673983) for causing build bustages in RenderCompositorD3D11SWGL. CLOSED TREE
Backed out changeset 134e621d0902 (bug 1673983)
Backed out changeset 81601a02d9b7 (bug 1673983)
Backed out changeset 72d4bf5b093e (bug 1673983)
Backed out changeset 99b2e5c55a25 (bug 1673983)
2020-11-05 11:40:36 +02:00
Matt Woodrow b8c9f1b675 Bug 1673983 - Add RenderTextureHostSWGL support to D3D11 RenderTextureHosts. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D95799
2020-11-05 09:15:05 +00:00
Matt Woodrow 726340ba67 Bug 1674878 - Expose more detailed WR backend information to TextureFactoryIdentifier. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D95588
2020-11-03 18:24:43 +00:00
Matt Woodrow 324654797b Bug 1666055 - Disable buffer textures as external compositor surfaces on MacOS. r=lsalzman
When using the native RenderCompositor+SWGL on MacOS, we don't support passing buffer textures directly to the compositor.

Differential Revision: https://phabricator.services.mozilla.com/D93179
2020-10-14 07:56:47 +00:00
Jamie Nicol 7adec85b80 Bug 1575765 - Implement KHR_partial_update for webrender. r=sotaro,jgilbert
KHR_partial_update allows us to avoid rerendering the entire
backbuffer every frame, and instead only render what has changed on
the current frame, as well as the difference between the current
backbuffer and the current frontbuffer. It works similarily to
EXT_buffer_age, which we already support, with the additional
requirement that we must call eglSetDamageRegion each frame before
rendering to the backbuffer.

Modify GLContextEGL::GetBufferAge() so that it queries the age if
either EXT_buffer_age or KHR_partial_update are available. This will
now automatically be queried by webrender through the
PartialPresentCompositor trait. Add a new function to that trait,
set_buffer_damage_region(), whose RenderCompositorEGL implementation
calls eglSetDamageRegion(). Call this from composite_simple(), once
the damage rect has been calculated but before rendering to the
backbuffer.

Additionally, change both RenderCompositorEGL and
RenderCompositorOGL's implementations of
ShouldDrawPreviousPartialPresentRegions() to unconditionally return
true, rather than checking for the existence of EXT_buffer_age (or
adding a new check for KHR_partial_update). The lack of these
extensions does not mean that webrender is able to skip rendering
previous frames' damage. Rather the opposite, it means we cannot
render *only* the previous frames' damage, and must instead always
render the entire buffer.

Differential Revision: https://phabricator.services.mozilla.com/D91203
2020-10-02 10:23:56 +00:00
Jamie Nicol 5d407f06e0 Bug 1656533 - Handle buffer ages other than 2 for EGL_EXT_buffer_age. r=sotaro,gw
Add a trait PartialPresentCompositor with a function get_buffer_age(),
and allow gecko to pass an implementation to webrender during
initialization. This allows webrender to query the age of the current
backbuffer during compositing.

Make webrender track the previous 2 frame's dirty rects, rather than
just the previous 1 frame's, allowing it to calculate the total damage
rect for buffer ages of up to 3. If the age is greater than 3, treat
the entire buffer as invalid. Also handle special cases of ages 0 and
1, 0 meaning the entire buffer is invalid, and 1 meaning the entire
buffer is valid. Make gecko stop requesting a full render for buffer
ages other than 2, as webrender can now handle these cases itself.

Differential Revision: https://phabricator.services.mozilla.com/D91202
2020-10-02 10:23:49 +00:00
Razvan Maries 63b41aa30f Backed out 3 changesets (bug 1656533, bug 1575765) for WebRender bustages. CLOSED TREE
Backed out changeset 84c31fd9ff82 (bug 1575765)
Backed out changeset 48c1532d1d9d (bug 1575765)
Backed out changeset ed9075d9319b (bug 1656533)
2020-10-02 12:51:55 +03:00
Jamie Nicol 5b8c7d826e Bug 1575765 - Implement KHR_partial_update for webrender. r=sotaro,jgilbert
KHR_partial_update allows us to avoid rerendering the entire
backbuffer every frame, and instead only render what has changed on
the current frame, as well as the difference between the current
backbuffer and the current frontbuffer. It works similarily to
EXT_buffer_age, which we already support, with the additional
requirement that we must call eglSetDamageRegion each frame before
rendering to the backbuffer.

Modify GLContextEGL::GetBufferAge() so that it queries the age if
either EXT_buffer_age or KHR_partial_update are available. This will
now automatically be queried by webrender through the
PartialPresentCompositor trait. Add a new function to that trait,
set_buffer_damage_region(), whose RenderCompositorEGL implementation
calls eglSetDamageRegion(). Call this from composite_simple(), once
the damage rect has been calculated but before rendering to the
backbuffer.

Additionally, change both RenderCompositorEGL and
RenderCompositorOGL's implementations of
ShouldDrawPreviousPartialPresentRegions() to unconditionally return
true, rather than checking for the existence of EXT_buffer_age (or
adding a new check for KHR_partial_update). The lack of these
extensions does not mean that webrender is able to skip rendering
previous frames' damage. Rather the opposite, it means we cannot
render *only* the previous frames' damage, and must instead always
render the entire buffer.

Differential Revision: https://phabricator.services.mozilla.com/D91203
2020-10-02 08:38:29 +00:00
Jamie Nicol 2bccc84f56 Bug 1656533 - Handle buffer ages other than 2 for EGL_EXT_buffer_age. r=sotaro,gw
Add a trait PartialPresentCompositor with a function get_buffer_age(),
and allow gecko to pass an implementation to webrender during
initialization. This allows webrender to query the age of the current
backbuffer during compositing.

Make webrender track the previous 2 frame's dirty rects, rather than
just the previous 1 frame's, allowing it to calculate the total damage
rect for buffer ages of up to 3. If the age is greater than 3, treat
the entire buffer as invalid. Also handle special cases of ages 0 and
1, 0 meaning the entire buffer is invalid, and 1 meaning the entire
buffer is valid. Make gecko stop requesting a full render for buffer
ages other than 2, as webrender can now handle these cases itself.

Differential Revision: https://phabricator.services.mozilla.com/D91202
2020-10-02 09:04:09 +00:00
Markus Stange bbb8d6b5a2 Bug 1664049 - Allow capturing recorded frames from NativeLayerSnapshotter. r=mattwoodrow
This makes the recording API work in the macOS + WR compositor configuration.

Differential Revision: https://phabricator.services.mozilla.com/D89868
2020-09-18 01:26:32 +00:00
Andrew Osmond a9c24fabba Bug 1664560 - Expose yet more WebRender initialization failure error messages to telemetry. r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D89966
2020-09-11 22:40:40 +00:00
sotaro 64acea96e5 Bug 1658684 - Add android Fence handling to WebRender r=nical
Release fence is delivered from RenderCompositorEGL to WebRenderImageHost via AsyncImagePipelineManager. And the fence is sent to client side by ImageBridgeParent.

Differential Revision: https://phabricator.services.mozilla.com/D88158
2020-09-02 14:21:36 +00:00
Markus Stange 035e844287 Bug 1592031 - Use NativeLayerSnapshotter to capture profiler screenshots with WebRender on macOS. r=mattwoodrow
Depends on D59158

Differential Revision: https://phabricator.services.mozilla.com/D86880
2020-08-27 04:00:57 +00:00
Narcis Beleuzu c259d84931 Backed out 4 changesets (bug 1658856, bug 1592031) for bustages on ScreenshotGrabber.h . CLOSED TREE
Backed out changeset 6d54a1050bbd (bug 1658856)
Backed out changeset 19145f742503 (bug 1592031)
Backed out changeset 5db68a6a5bc2 (bug 1592031)
Backed out changeset 925e3b179b9b (bug 1592031)
2020-08-22 02:06:39 +03:00
Markus Stange 66928a1e5b Bug 1592031 - Use NativeLayerSnapshotter to capture profiler screenshots with WebRender on macOS. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D86880
2020-08-21 22:33:41 +00:00
Matt Woodrow a250b4d7a3 Bug 1656818 - Move decision to flip WebRender readback closer to the source, and make it correct for SWGL. r=lsalzman,geckoview-reviewers,snorp
Differential Revision: https://phabricator.services.mozilla.com/D86892
2020-08-14 18:40:09 +00:00
Csoregi Natalia 8896454838 Backed out 4 changesets (bug 1656817, bug 1656818, bug 1658858) for bustage on RendererOGL.cpp. CLOSED TREE
Backed out changeset 9c8e4ec4e47c (bug 1656818)
Backed out changeset 92252cfd26de (bug 1656818)
Backed out changeset 1bebb79150d6 (bug 1656817)
Backed out changeset e1becb3a2fb5 (bug 1658858)
2020-08-14 00:25:44 +03:00
Matt Woodrow 65e227f6dd Bug 1656818 - Move decision to flip WebRender readback closer to the source, and make it correct for SWGL. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D86892
2020-08-13 20:43:35 +00:00
Matt Woodrow 8cc57f6b55 Bug 1657428 - Use correct interpolation mode for native compositing layers. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D86090
2020-08-06 21:14:45 +00:00
Matt Woodrow 87db131e32 Bug 1653048 - Add support for external images in the wr::Compositor API, and implement it for MacOS IOSurfaces. r=mstange,gw
Differential Revision: https://phabricator.services.mozilla.com/D84638
2020-08-04 01:19:59 +00:00
Matt Woodrow 01b5738a5d Bug 1653166 - Add transforms to WebRender Compositor API. r=gw,mstange,sotaro
Differential Revision: https://phabricator.services.mozilla.com/D84328
2020-08-04 01:19:59 +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