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

2316 Коммитов

Автор SHA1 Сообщение Дата
Lee Salzman 988104567f Bug 1689245 - replace CompositorWidget::ClearBeforePaint with GetTransparentRegion. r=mattwoodrow CLOSED TREE
ClearBeforePaint put the responsibility of clearing the current frame's DrawTarget
onto the widget. This doesn't compose well with WR RenderCompositor that may do
their own internal clearing. Instead, replace this with a GetTransparentRegion API
that can be used by RenderCompositors to limit where they clear so that they are
now fully responsible for clearing.

Differential Revision: https://phabricator.services.mozilla.com/D103253
2021-01-28 09:12:40 +00:00
Lee Salzman aa6576ccde Bug 1689245 - implement GL_ARB_clear_texture extension for SWGL. r=mattwoodrow
GL_ARB_clear_texture implements some useful GL entry-points for clears
that can clear arbitrary sub-rects of the screen without having to latch
or disturb GL state. This refactors the glClear implementation to be in
terms of the provided glClearTexSubImage extension which is far more
flexible.

This further allows us to reuse clearing primitives in RenderCompositorSWGL
without having to use more expensive DrawTarget versions.

Differential Revision: https://phabricator.services.mozilla.com/D103252
2021-01-28 08:35:34 +00:00
smolnar 27de9a114b Backed out 2 changesets (bug 1689245) for causing merge conflicts.
Backed out changeset 56cb5f428fb5 (bug 1689245)
Backed out changeset b1303a0086cd (bug 1689245)
2021-01-28 12:02:57 +02:00
Lee Salzman b2bd266cde Bug 1689245 - replace CompositorWidget::ClearBeforePaint with GetTransparentRegion. r=mattwoodrow
ClearBeforePaint put the responsibility of clearing the current frame's DrawTarget
onto the widget. This doesn't compose well with WR RenderCompositor that may do
their own internal clearing. Instead, replace this with a GetTransparentRegion API
that can be used by RenderCompositors to limit where they clear so that they are
now fully responsible for clearing.

Differential Revision: https://phabricator.services.mozilla.com/D103253
2021-01-28 09:12:40 +00:00
Lee Salzman 3d319c55f8 Bug 1689245 - implement GL_ARB_clear_texture extension for SWGL. r=mattwoodrow
GL_ARB_clear_texture implements some useful GL entry-points for clears
that can clear arbitrary sub-rects of the screen without having to latch
or disturb GL state. This refactors the glClear implementation to be in
terms of the provided glClearTexSubImage extension which is far more
flexible.

This further allows us to reuse clearing primitives in RenderCompositorSWGL
without having to use more expensive DrawTarget versions.

Differential Revision: https://phabricator.services.mozilla.com/D103252
2021-01-28 08:35:34 +00:00
smolnar 79d2008ba0 Backed out 2 changesets (bug 1689245) for causing failures in CompositorWidget. CLOSED TREE
Backed out changeset 60ad4f4b141d (bug 1689245)
Backed out changeset 778ecad5812e (bug 1689245)
2021-01-28 10:25:13 +02:00
Lee Salzman 6f71c89411 Bug 1689245 - replace CompositorWidget::ClearBeforePaint with GetTransparentRegion. r=mattwoodrow
ClearBeforePaint put the responsibility of clearing the current frame's DrawTarget
onto the widget. This doesn't compose well with WR RenderCompositor that may do
their own internal clearing. Instead, replace this with a GetTransparentRegion API
that can be used by RenderCompositors to limit where they clear so that they are
now fully responsible for clearing.

Differential Revision: https://phabricator.services.mozilla.com/D103253
2021-01-28 05:35:55 +00:00
Lee Salzman 271d12aca9 Bug 1689245 - implement GL_ARB_clear_texture extension for SWGL. r=mattwoodrow
GL_ARB_clear_texture implements some useful GL entry-points for clears
that can clear arbitrary sub-rects of the screen without having to latch
or disturb GL state. This refactors the glClear implementation to be in
terms of the provided glClearTexSubImage extension which is far more
flexible.

This further allows us to reuse clearing primitives in RenderCompositorSWGL
without having to use more expensive DrawTarget versions.

Differential Revision: https://phabricator.services.mozilla.com/D103252
2021-01-28 05:36:36 +00:00
Matt Woodrow 2a0c7c976f Bug 1687124 - Pass tile valid rect into invalidate_tile, so that this is available in time for begin_compositing. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D102667
2021-01-27 03:17:41 +00:00
Matt Woodrow 05e2b31dac Bug 1687124 - Make RenderCompositorSWGL clear the non-opaque dirty areas. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D102666
2021-01-27 03:17:29 +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 5cbbfdc99f Bug 1687124 - Pass tile valid rect into invalidate_tile, so that this is available in time for begin_compositing. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D102667
2021-01-27 00:48:06 +00:00
Matt Woodrow 7700b29cec Bug 1687124 - Make RenderCompositorSWGL clear the non-opaque dirty areas. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D102666
2021-01-26 07:03:00 +00: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
Andrew Osmond a750b3733f Bug 1680759 - Enable EGL robustness with WebRender on Linux. r=jgilbert
This patch enables EGL robustness with WebRender. It also tries harder
to get RBAB, favouring KHR+RBAB over EXT-RBAB, as testing with Intel and
NVIDIA Mesa drivers on Ubuntu suggests we can get KHR+RBAB but not
EXT+RBAB. It also adds support for requesting NVIDIA specific resets via
EGL_NV_robustness_video_memory_purge.

Differential Revision: https://phabricator.services.mozilla.com/D102971
2021-01-26 02:25:08 +00:00
sotaro 726fe3fae9 Bug 1687889 - Add more error handling of FLIP_SEQUENTIAL r=nical
When CompositorHwnd does not exist, FLIP_SEQUENTIAL could not be used, since it could cause a problem like Bug 1435995. For example, CompositorHwnd creation could be failed on Win7.

Differential Revision: https://phabricator.services.mozilla.com/D102531
2021-01-25 22:11:51 +00:00
stransky 0c7400ee46 Bug 1674473 [Linux] SW-WR Clear background when painting popup windows, r=lsalzman
Clear alpha from buffer before painting transparent windows by SW Webrender to avoid rendering artifacts.

Differential Revision: https://phabricator.services.mozilla.com/D102189
2021-01-20 21:11:48 +00:00
Jeff Muizelaar 061b4b0ee9 Bug 1687856 - Remove unneeded Cargo.lock. r=kvark
I believe this was unintentionally added in bug 1637092.

Differential Revision: https://phabricator.services.mozilla.com/D102521
2021-01-21 15:41:03 +00:00
Lee Salzman 8f06a347bd Bug 1687265 - clear out old SWGL framebuffer after frame ends. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D102493
2021-01-21 00:42:11 +00:00
sotaro d99c416a10 Bug 1684412 - Pass only valid rests to Present1() r=nical
Empty rect causes error on Present1().

Differential Revision: https://phabricator.services.mozilla.com/D101557
2021-01-20 22:28:50 +00:00
sotaro eab83ab323 Bug 1686848 - Add fallback handling of FLIP_SEQUENTIAL init failure r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D101856
2021-01-16 22:28:06 +00:00
Sylvestre Ledru d4d28b7263 Bug 1617369 - Reformat recent rust changes with rustfmt r=emilio
Updated with rustfmt 1.4.18-stable (8157a3f 2020-07-15)

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D100935
2021-01-16 15:36:39 +00:00
sotaro f20d0b5b46 Bug 1686860 - Relax version check for CreateSwapChainForHwnd() in RenderCompositorANGLE::CreateSwapChain() r=jrmuizel
The change is related to  Bug 1686805.

Differential Revision: https://phabricator.services.mozilla.com/D101863
2021-01-15 03:08:27 +00:00
Barret Rennie 2d384c7f0e Bug 1683217 - Require non-zero window size for profiler screenshots in WebRender r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D101685
2021-01-14 22:18:54 +00:00
Alexis Beingessner 4dd35ffb42 Bug 1686158 - make max_bands atomic. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D101653
2021-01-14 01:20:12 +00:00
Jamie Nicol 3591b6e8cb Bug 1685563 - Store non-subpixel-AA glyphs in R8 texture rather than BGRA8. r=lsalzman
Add a new texture type alpha8_glyphs to the texture cache and store
alpha glyphs in it. Because the opengl texture format is R8 but the
shader requires to read the texture's alpha channel, we must swizzle
the components. We cannot rely on texture swizzling due to driver
bugs, so add the necessary code to the shader to do so manually.

Differential Revision: https://phabricator.services.mozilla.com/D101643
2021-01-13 22:51:07 +00:00
Lee Salzman 1de55e6b04 Bug 1676762 - don't directly map DT in RenderCompositorSWGL when buffering is requested. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D101533
2021-01-13 03:49:53 +00:00
Lee Salzman 19f0da9579 Bug 1686363 - offset source and dest rectangles for partial surfaces in RenderCompositorSWGL. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D101521
2021-01-13 02:01:50 +00:00
Lee Salzman e2aaaf0c12 Bug 1686363 - handle case in RenderCompositorSWGL where DT is size of window. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D101513
2021-01-13 00:04:16 +00:00
Matt Woodrow 13d9ff3426 Bug 1679585 - Ensure we always set an overlap for invalidated tiles. r=lsalzman
In rare cases, WR can invalidate a tile, but still compute a dirty rect that doesn't intersect that tile.
flush_composites expects all updated tiles to have recorded at least one overlap (for itself), so we set this manually (as we in the normal path after the early return).

Differential Revision: https://phabricator.services.mozilla.com/D101427
2021-01-12 21:33:25 +00:00
Brad Werth 3e6d3530c3 Bug 1685046: Hoist release asserts in RenderCompositorNativeOGL::Bind to crash earlier. r=jrmuizel
This change spreads the release asserts to functions that are invoked by other
callers, potentially increasing the cases where the assert will fail. This is
being done intentionally; we want additional information on the reasons for
the crashes.

Differential Revision: https://phabricator.services.mozilla.com/D101063
2021-01-11 15:49:09 +00:00
Lee Salzman 50180b37c8 Bug 1679215 - limit SWGL compositing to dirty region. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D101256
2021-01-10 23:27:01 +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
Matt Woodrow 1af68ae8c4 Bug 1685437 - Add multiple texture methods to RenderCompositorD3D11SWGL. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D100972
2021-01-10 22:49:39 +00:00
Jim Blandy 692a10e624 Bug 1681610: Use thicker borders when faking rounded rectangles. r=gw
`DisplayListBuilder::PushRoundedRect`, used for unordered list bullets and the
like, draws rounded rectangles as ordinary rectangles with rounded borders that
have a radius of half the rectangle. Unfortunately, this leads to tiny white
dots at the center of the bullet under some magnifications. I haven't diagnosed
why - perhaps there's something somewhere that snaps borders outward.

Increasing the thickness of the borders to (an impossible) 60% of the width of
the rectangle makes the problem go away. If this kludge doesn't work, we could
add a rectangle covering the center.

Differential Revision: https://phabricator.services.mozilla.com/D100753
2021-01-09 19:55:03 +00:00
sotaro cc894cd938 Bug 1685356 - Do not try to create EGLSurface when ANativeWindow size is too big r=nical
When ANativeWindow size is too big, EGLSurface creation could fail. And it should not happen on normal use case. But the error situation happens during org.mozilla.geckoview.test.ScreenshotTest.giantScreenshot.

Differential Revision: https://phabricator.services.mozilla.com/D101128
2021-01-08 10:59:17 +00:00
Dzmitry Malyshau 093ed43459 Bug 1675615 - Move WR shading module into the renderer r=nical
Differential Revision: https://phabricator.services.mozilla.com/D100941
2021-01-07 16:29:55 +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
Sylvestre Ledru b58ddc19df Bug 1519636 - Reformat recent changes to the Google coding style r=andi
Updated with Debian clang-format version 11.0.1-1

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D100934
2021-01-06 17:17:23 +00:00
sotaro c1ea187aa6 Bug 1685253 - Fix error handling of RenderCompositorEGL::Resume() r=nical
Changed as to return false when resume fails.

Differential Revision: https://phabricator.services.mozilla.com/D100872
2021-01-06 12:12:42 +00:00
sotaro eee67f5e4d Bug 1683988 - Do not pass unnecessary objects for software WebRender r=nical
Differential Revision: https://phabricator.services.mozilla.com/D100375
2021-01-04 09:29:38 +00:00
sotaro 6b0b8a1249 Bug 1681756 - Fix return of RenderCompositorANGLE::GetBufferSize() r=nical
I missed to read a review comment of D100220.

Differential Revision: https://phabricator.services.mozilla.com/D100456
2021-01-04 09:47:29 +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 8ba200bf20 Bug 1682753 - Add device reset handling to RenderCompositorD3D11SWGL r=aosmond
Implementation is borrowed from RenderCompositorANGLE::IsContextLost().

Differential Revision: https://phabricator.services.mozilla.com/D100376
2020-12-24 16:35:56 +00:00
Jeff Muizelaar e6dad53841 Bug 1683966. Add some more objc autorelease pools. r=mstange
This isn't very systematic as I'm not sure the best approach for that
yet. That being said, this captures the bulk of the autoreleases without
that happen without a pool.

Differential Revision: https://phabricator.services.mozilla.com/D100363
2020-12-23 04:02:43 +00:00
sotaro 896fb71c16 Bug 1681756 - Make RenderCompositorANGLE::GetBufferSize() to be positive with native compositor r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D100220
2020-12-21 23:40:59 +00:00
sotaro 213161e79e Bug 1683606 - Avoid crash by using ID3D11Texture2D that uses obsoleted ID3D11Device r=mattwoodrow
Usage of ID3D11Texture2D that uses obsoleted ID3D11Device caused crash.

Differential Revision: https://phabricator.services.mozilla.com/D100225
2020-12-21 23:40:14 +00:00
Sylvestre Ledru 00977921cb Bug 1617369 - Reformat recent rust changes with rustfmt r=emilio DONTBUILD
Updated with rustfmt 1.4.24-stable (eb894d5 2020-11-05)

# ignore-this-changeset

Depends on D100230

Differential Revision: https://phabricator.services.mozilla.com/D100231
2020-12-21 12:15:49 +00:00
sotaro 7c2f93d578 Bug 1683268 - Fix redundant ID3D11Device::OpenSharedResource() calls r=nical
When ID3D11Texture2Ds are already opened, we do not need to call the OpenSharedResource().

Differential Revision: https://phabricator.services.mozilla.com/D100099
2020-12-18 23:06:03 +00:00