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

1841 Коммитов

Автор SHA1 Сообщение Дата
Simon Giesecke dce1e48caf Bug 1613985 - Use default for equivalent-to-default constructors/destructors in gfx. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D65288

--HG--
extra : moz-landing-system : lando
2020-03-04 15:39:20 +00:00
Martin Stransky 4f58cf3e36 Bug 1617553 [Wayland] Use GL texture format instead of surface one for GL texture source, r=sotaro
Differential Revision: https://phabricator.services.mozilla.com/D63836

--HG--
extra : moz-landing-system : lando
2020-02-24 12:12:33 +00:00
Martin Stransky 2d00d46613 Bug 1616590 [Wayland] Fix GL compositor to composite correctly NV12 textures generated by ffmpeg, r=sotaro
- Enable GL_TEXTURE_RECTANGLE_ARB only when the extension is supported
- Switch Green and Alpha colors in NV12 shader when compositing on Wayland. Is's because vaExportSurfaceHandle() exports UV plane in DRM_FORMAT_GR88 format so we have to use R and G channels and not R and A as we have now.

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

--HG--
extra : moz-landing-system : lando
2020-02-20 14:08:25 +00:00
Martin Stransky 905e0e97e8 Bug 1614568 [Wayland] Implement fence sync to dmabuf surfaces for WebGL rendering, r=jgilbert
Use ANDROID_native_fence_sync to synchronize WebGL renderin. It's similar to KHR_fence_sync
but it the fence can be exported to file descriptor and shared among processes so we can create
the fence by WebGL producer and then wait in renderer.

Use glFinish() as a fallback when ANDROID_native_fence_sync is not available.

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

--HG--
extra : moz-landing-system : lando
2020-02-19 15:13:28 +00:00
Martin Stransky 0c0169aabe Bug 1613364 [Wayland] Update gfx code to derived WaylandDMABufSurfaceRGBA class, r=sotaro
WaylandDMABufSurface/WaylandDMABufSurfaceRGBA uses textures interface instead of EGLImages so we need
to update gfx code accordingly:

- rename CreateEGLImage() -> CreateTexture()
- rename ReleaseEGLImage() -> ReleaseTextures()
- rename GetGLTexture() -> GetTexture()
- rename WaylandDMABufSurface::CreateDMABufSurface() to WaylandDMABufSurfaceRGBA::CreateDMABufSurface()

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

--HG--
extra : moz-landing-system : lando
2020-02-12 22:35:02 +00:00
Martin Stransky 5cef4a77a7 Bug 1613364 [Wayland] Update WaylandDMABUFTextureHostOGL and WaylandDMABUFTextureClientOGL to work with NV12 format, r=sotaro
- Update WaylandDMABUFTextureClientOGL to work with WaylandDMABufSurfaceRGBA which is used for GL/WebRender compositor
  with dmabuf texture backend.
- Update WaylandDMABUFTextureHostOGL to work with both RGBA and NV12 surface formats.
- Use GLTextureSource instead of EGLImageTextureSource as we need to store more than one texture there with NV12
  and pass the textures there by CreateTextureSourceForPlane().
- Implement NV12 related function by WaylandDMABUFTextureHostOGL (color space, color range, sub-textures num).
- Add NV12 implementation to PushResourceUpdates()/PushDisplayItems() for WebRender.

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

--HG--
extra : moz-landing-system : lando
2020-02-12 22:34:59 +00:00
Martin Stransky 7e18aeed6a Bug 1613358 [Wayland] Implement WaylandDMABUFSurfaceImage dmabuf image, r=sotaro
Implement WaylandDMABUFSurfaceImage which is backed by dma buf memory on Wayland and it holds
decoded video images produced by ffmpeg va-api decoder.

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

--HG--
extra : moz-landing-system : lando
2020-02-06 15:15:02 +00:00
Brindusan Cristian 443b32771a Backed out changeset 6381c1f2aedc (bug 1613358) for build bustages at GLBlitHelper.cpp. CLOSED TREE 2020-02-06 16:15:27 +02:00
Martin Stransky f6d5f48d74 Bug 1613358 [Wayland] Implement WaylandDMABUFSurfaceImage dmabuf image, r=sotaro
Implement WaylandDMABUFSurfaceImage which is backed by dma buf memory on Wayland and it holds
decoded video images produced by ffmpeg va-api decoder.

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

--HG--
extra : moz-landing-system : lando
2020-02-06 12:10:57 +00:00
Martin Stransky c8f1770150 Bug 1613052 [Wayland] Don't release textures at WaylandDMABUFTextureHostOGL as they're owned by texture source, r=sotaro
Depends on D61547

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

--HG--
extra : moz-landing-system : lando
2020-02-05 08:31:08 +00:00
Martin Stransky 849ffb22b3 Bug 1586696 [Wayland] Use wayland dmabuf as WebGL backend, r=jgilbert
- Create new SharedSurfaceType called EGLSurfaceDMABUF
- Implement EGLSurfaceDMABUF by SharedSurfaceDMABUF which is backed by WaylandDMABufSurface.
  It can be used by Wayland/EGL WebGL backend.
- It's disabled by default, can be enabled by widget.wayland_dmabuf_webgl.enabled pref.

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

--HG--
extra : moz-landing-system : lando
2020-02-05 06:32:25 +00:00
Greg V 2befd54d63 Bug 1484812 - Use SwapBuffersWithDamage on EGL platforms (Wayland/Android) r=jnicol,mstange,jgilbert
EGL_KHR_swap_buffers_with_damage (or EGL_EXT_swap_buffers_with_damage)
is an EGL extension that allows the application to inform the display
server (system compositor) which areas of the window have changed.

This commit implements support for that extension in the layers compositor.
The layers compositor always renders the whole frame, so we're only getting
the benefit of not redrawing unchanged areas *in the system compositor*,
not actually doing partial invalidation/compositing,
but that makes the implementation simpler (no need to track buffer age).

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

--HG--
extra : moz-landing-system : lando
2020-01-30 10:46:54 +00:00
Sylvestre Ledru cc2040bf21 Bug 1605934 - Use nested namespaces r=sg
Done with:
./mach static-analysis check --checks="-*, modernize-concat-nested-namespaces" --fix .
and then clang-format on the files

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

--HG--
extra : moz-landing-system : lando
2020-01-18 13:48:34 +00:00
Dorel Luca 506e65bcab Backed out changeset bbb39655cf71 (bug 1605934) for build bustage in widget/gtk/mozwayland/mozwayland.c 2020-01-18 15:39:55 +02:00
Sylvestre Ledru 6689a37527 Bug 1605934 - Use nested namespaces r=sg
Done with:
./mach static-analysis check --checks="-*, modernize-concat-nested-namespaces" --fix .
and then clang-format on the files

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

--HG--
extra : moz-landing-system : lando
2020-01-18 13:16:39 +00:00
sotaro 271d83b87e Bug 1605906 - Add Pause/Resume handling to CompositorOGL for Wayland r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D58210

--HG--
extra : moz-landing-system : lando
2019-12-25 12:01:54 +00:00
Markus Stange 0f70058b6f Bug 1592044 - Reduce the frequency of IOSurface and framebuffer creation and destruction with the help of a surface pool. r=jgilbert
There are multiple SurfacePools: Main thread painting and the non-WebRender compositors create a new pool per window, and WebRender creates one shared pool across all windows. The non-WebRender users set the pool size limit to zero, i.e. no recycling across paints. This preserves the pre-existing behavior.
WebRender's pool size is configurable with the gfx.webrender.compositor.surface-pool-size pref.
Every window holds on to a SurfacePoolHandle. A SurfacePoolHandle has an owning reference to the pool, via a surface pool wrapper. Once all handles are gone, the surface pool goes away, too.
The SurfacePool holds on to IOSurfaces and MozFramebuffers. Both are created on demand, independently, but are associated with each other.
A given NativeLayer uses only one surface pool handle during its lifetime. The native layer no longer influences which GLContext its framebuffers are created for; the GL context is now managed by the surface pool handle.
As a result, a NativeLayer can no longer change which GLContext its framebuffers are created by.
So in the future, if we ever need to migrate a window frome one GLContext to another, we will need to recreate the NativeLayers inside it. I think that's ok.

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

--HG--
extra : moz-landing-system : lando
2019-12-18 21:01:51 +00:00
sotaro 8cbdbb0cb2 Bug 1601531 - Tag image descriptors with PREFER_COMPOSITOR_SURFACE where appropriate r=gw
Differential Revision: https://phabricator.services.mozilla.com/D55922

--HG--
extra : moz-landing-system : lando
2019-12-06 06:53:57 +00:00
Martin Stransky a731b16af1 Bug 1599016 [Wayland] Don't use GL_TEXTURE_EXTERNAL_OES textures with DMA BUF backend, r=sotaro
Differential Revision: https://phabricator.services.mozilla.com/D54690

--HG--
extra : moz-landing-system : lando
2019-11-26 11:15:48 +00:00
Markus Stange 32299e9f70 Bug 1597585 - Remove GLManager, which is now unused. r=mattwoodrow
Depends on D53772

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

--HG--
extra : moz-landing-system : lando
2019-11-20 23:22:20 +00:00
Markus Stange ca8c744c5d Bug 1596248 - Don't treat CompositorOGL coordinates differently in offscreen GL contexts. r=jgilbert
This code was trying to not render things upside down when rendering to offscreen contexts.
But this code path was never used and it wasn't fully working.
I would like to make our compositor contexts go through GLContextProviderCGL::CreateHeadless,
which creates an "offscreen" GLContext, so now this broken code is kicking in. Let's remove it.

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

--HG--
extra : moz-landing-system : lando
2019-11-19 03:11:58 +00:00
Markus Stange 3faf29b5c5 Bug 1592150 - Remove CurrentSurfaceInvalidRegion(). Callers now always just repaint the update region that they supplied. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D51761

--HG--
extra : moz-landing-system : lando
2019-11-19 03:11:26 +00:00
Markus Stange 8b245c092f Bug 1576390 - Remove the prefs gfx.core-animation.enabled and gfx.compositor.glcontext.opaque, and all the code needed to support it. r=mattwoodrow,spohl
Differential Revision: https://phabricator.services.mozilla.com/D52739

--HG--
extra : moz-landing-system : lando
2019-11-13 19:07:37 +00:00
Markus Stange ba013d0f42 Bug 1594950 - Change NextSurface APIs to accept a dirty region, and remove the public method InvalidateRegionThroughoutSwapchain. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D50878

--HG--
extra : moz-landing-system : lando
2019-11-13 18:55:18 +00:00
Cosmin Sabou 1d71e9f510 Backed out 4 changesets (bug 1594950) for turning bug 1405083 into permafail.
Backed out changeset 684a87e91d94 (bug 1594950)
Backed out changeset adea6912c3a3 (bug 1594950)
Backed out changeset aea7108204e9 (bug 1594950)
Backed out changeset 15baea8520de (bug 1594950)
2019-11-13 06:44:24 +02:00
Markus Stange 2db4b324b7 Bug 1594950 - Change NextSurface APIs to accept a dirty region, and remove the public method InvalidateRegionThroughoutSwapchain. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D50878

--HG--
extra : moz-landing-system : lando
2019-11-12 19:50:26 +00:00
Martin Stransky eca6f5db8f Bug 1583731 - [Wayland] Implement RenderWaylandDMABUFTextureHostOGL based on WaylandDMABUFSurface, r=sotaro
Depends on D49263

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

--HG--
extra : moz-landing-system : lando
2019-10-17 11:28:56 +00:00
Martin Stransky 5a403b0cdd Bug 1587008 - [Wayland] Set EGL window size at CompositorOGL::BeginFrame, r=sotaro
wl_egl_window size must exactly march GL rendering pipeline setting.

Compositor and widget can have different window sizes during window resize when widget
is resized faster than layout can render. Firefox window is rendered misplaced then
and it's "jumping" as layout size is behind toolkit size.

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

--HG--
extra : moz-landing-system : lando
2019-10-15 19:25:28 +00:00
Dorel Luca 518c1a81eb Backed out 2 changesets (bug 1587008) for build bustage on src/widget/gtk/GtkCompositorWidget.cpp. CLOSED TREE
Backed out changeset 9e610c4628e1 (bug 1587008)
Backed out changeset afc6499c8f1f (bug 1587008)

--HG--
extra : rebase_source : 3c3cc17ada4079f279809cae1ece2e226fde5acf
extra : histedit_source : c7f61dbede0eda8ea3b0a1dfa5c67f8650f4ca81
2019-10-15 19:10:32 +03:00
Martin Stransky bfddf50156 Bug 1587008 - [Wayland] Set EGL window size at CompositorOGL::BeginFrame, r=sotaro
wl_egl_window size must exactly march GL rendering pipeline setting.

Compositor and widget can have different window sizes during window resize when widget
is resized faster than layout can render. Firefox window is rendered misplaced then
and it's "jumping" as layout size is behind toolkit size.

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

--HG--
extra : moz-landing-system : lando
2019-10-15 13:12:13 +00:00
Markus Stange d76e9ba35f Bug 1586627 - Work around a bug in AppleIntelHD3000GraphicsGLDriver in CompositorOGL. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D49050

--HG--
extra : moz-landing-system : lando
2019-10-15 02:14:50 +00:00
Sylvestre Ledru 63ab1f2c5b Bug 1577236 - clang-10: Fix -Wimplicit-int-float-conversion warnings in gfx/ r=nical
The change has been reverted involuntary by bug 1574745

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

--HG--
extra : moz-landing-system : lando
2019-10-01 13:05:43 +00:00
Martin Stransky d3e64dee66 Bug 1578380 - [Wayland] Use WaylandDMABUF texure backend on Wayland when DMABuf is enabled, r=sotaro
Depends on D46840

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

--HG--
extra : moz-landing-system : lando
2019-09-24 11:06:39 +00:00
Martin Stransky ca30adf76e Bug 1578380 - [Wayland] Implement WaylandDMABUFTextureHostOGL, r=sotaro
WaylandDMABufSurface is used as a backend for WaylandDMABUFTextureHostOGL.
Pixel data of WaylandDMABufSurface are located at GPU memory and are
binded from WaylandDMABUFTextureClientOGL.

WaylandDMABufSurface can be binded as EGLImage so EGLImageTextureSource is used.

Depends on D46836

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

--HG--
extra : moz-landing-system : lando
2019-09-24 11:05:36 +00:00
Martin Stransky 8fb3c364ae Bug 1578380 - [Wayland] Implement WaylandDMABUFTextureClientOGL, r=sotaro
WaylandDMABufSurface is used as a backend for WaylandDMABUFTextureClientOGL.
Pixel data of WaylandDMABufSurface are located at GPU memory and can be
shared by processes.

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

--HG--
extra : moz-landing-system : lando
2019-09-24 11:05:14 +00:00
Oana Pop Rus a22fdc5e79 Backed out 8 changesets (bug 1578380) for causing build bustages in ContentClient.cpp on a CLOSED TREE
Backed out changeset 28c2e884d20a (bug 1578380)
Backed out changeset 373c4563e9fd (bug 1578380)
Backed out changeset 3fdbc241d63a (bug 1578380)
Backed out changeset 754865b2810f (bug 1578380)
Backed out changeset b80b7e186f02 (bug 1578380)
Backed out changeset 3a8abb5d7a43 (bug 1578380)
Backed out changeset 2b52c3d15b7b (bug 1578380)
Backed out changeset ca57727c3aad (bug 1578380)
2019-09-24 13:06:55 +03:00
Martin Stransky e968a933f9 Bug 1578380 - [Wayland] Use WaylandDMABUF texure backend on Wayland when DMABuf is enabled, r=sotaro
Depends on D46840

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

--HG--
extra : moz-landing-system : lando
2019-09-24 09:10:11 +00:00
Martin Stransky 204c7a601e Bug 1578380 - [Wayland] Implement WaylandDMABUFTextureHostOGL, r=sotaro
WaylandDMABufSurface is used as a backend for WaylandDMABUFTextureHostOGL.
Pixel data of WaylandDMABufSurface are located at GPU memory and are
binded from WaylandDMABUFTextureClientOGL.

WaylandDMABufSurface can be binded as EGLImage so EGLImageTextureSource is used.

Depends on D46836

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

--HG--
extra : moz-landing-system : lando
2019-09-24 09:09:28 +00:00
Martin Stransky 491e19bd05 Bug 1578380 - [Wayland] Implement WaylandDMABUFTextureClientOGL, r=sotaro
WaylandDMABufSurface is used as a backend for WaylandDMABUFTextureClientOGL.
Pixel data of WaylandDMABufSurface are located at GPU memory and can be
shared by processes.

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

--HG--
extra : moz-landing-system : lando
2019-09-24 09:09:11 +00:00
Eric Rahm c5497a628a Bug 1577916 - Remove using namespace std from gfx/layers r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D44285

--HG--
extra : moz-landing-system : lando
2019-09-02 17:38:31 +00:00
Coroiu Cristina 7b22710544 Backed out changeset 6e0fb526633d (bug 1577916) for build bustage at gfx/layers/composite/TextRenderer.cpp on a CLOSED TREE 2019-09-02 20:15:28 +03:00
Eric Rahm bb149919a3 Bug 1577916 - Remove using namespace std from gfx/layers r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D44285

--HG--
extra : moz-landing-system : lando
2019-09-02 16:53:17 +00:00
Markus Stange 1ae94e638a Bug 1578100 - Respect the clip when calculating the number of pixels to fill. r=mattwoodrow
This makes the fill rate numbers which are displayed in the FPS overlay a lot more reasonable.
It also requires the TransformAndClipBounds fix from bug 1578045 for correct numbers.

Depends on D44337

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

--HG--
extra : moz-landing-system : lando
2019-09-02 00:40:06 +00:00
Markus Stange 9a8cc12a55 Bug 1578099 - Use NativeLayer::NextSurfaceAsFramebuffer in CompositorOGL and remove #ifdefs. r=mattwoodrow
CompositingRenderTargetOGL objects are no longer reused between frames. They are
recreated each frame around a reused framebuffer. This lets us remove the
SetOrigin method again, because we specify the right render target origin on
creation.

Depends on D44328

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

--HG--
extra : moz-landing-system : lando
2019-09-01 22:48:36 +00:00
Markus Stange df38e03696 Bug 1578099 - Tweak CompositingRenderTargetOGL initialization flow. r=mattwoodrow
Depends on D44327

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

--HG--
extra : moz-landing-system : lando
2019-09-01 22:45:20 +00:00
Markus Stange c64f3440ff Bug 1578099 - Change CompositingRenderTargetOGL creation API. r=mattwoodrow
Depends on D44326

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

--HG--
extra : moz-landing-system : lando
2019-09-01 22:42:19 +00:00
Markus Stange 2fccca3dcc Bug 1574745 - Maintain a full window render target when rendering to native layers with CompositorOGL. r=mattwoodrow
This makes profiler screenshots and frame recording work again, when native
layers are used. The copying is a bit unfortunate. Maybe we can combine this
copy with the first downscaling step in the future. Or for frame recording,
which doesn't use downscaling, we could readback the layers individually and
reassemble them in CPU memory. But both of those solutions are more complex
than this.

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

--HG--
extra : moz-landing-system : lando
2019-08-30 19:52:40 +00:00
Markus Stange b2ce563f4b Bug 1574745 - Change BlitFrameBufferToFrameBuffer to take rects instead of sizes. r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D43876

--HG--
extra : moz-landing-system : lando
2019-08-31 01:30:53 +00:00
Markus Stange 611b0edd41 Bug 1574745 - Add BeginFrameForNativeLayers() and Begin/EndRenderingToNativeLayer. r=mattwoodrow
This will let us render into multiple layers within one compositor frame.

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

--HG--
extra : moz-landing-system : lando
2019-08-30 21:37:55 +00:00
Markus Stange 603b907093 Bug 1574745 - Add BeginFrameForTarget and replace Set/ClearTargetContext. r=mattwoodrow
This removes any *TargetContext methods from the Compositor interface and moves
 mTarget tracking into the compositor implementations.

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

--HG--
extra : moz-landing-system : lando
2019-08-30 19:51:59 +00:00