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

2600 Коммитов

Автор SHA1 Сообщение Дата
Brad Werth 535968891d Bug 1885446 Part 2: Make ConvertImage do colorSpace conversion. r=jgilbert
This uses existing gl math to do colorSpace conversion between
predefined DOM colorSpaces (sRGB and Display P3). It does not yet
accurately read the inbound colorSpace of the image -- it just assumes
it is sRGB.

Differential Revision: https://phabricator.services.mozilla.com/D218362
2024-09-10 23:27:57 +00:00
sotaro a2adf2790f Bug 1916566 - Add GL_EXT_semaphore and GL_EXT_semaphore_fd support to GLContext r=gfx-reviewers,nical
GL_EXT_semaphore and GL_EXT_semaphore_fd are used to import Vulkan semaphores into OpenGL from POSIX file descriptor external handles.

Differential Revision: https://phabricator.services.mozilla.com/D220978
2024-09-10 07:12:33 +00:00
Jamie Nicol c979eb3890 Bug 1913568 - Add texture transform support to GLReadTexImageHelper. r=gfx-reviewers,nical
Add the capability to transform the texture coordinates when reading
from a texture, similar to existing support in GLBlitHelper and
CompositorOGL.

This patch doesn't change any behaviour, but this capability will be
made use of by a later patch in this series.

Differential Revision: https://phabricator.services.mozilla.com/D220580
2024-09-09 14:06:26 +00:00
Iulian Moraru e53fc69e92 Backed out 3 changesets (bug 1913568) for causing multiple wrench build bustages related to normalized_uvs. CLOSED TREE
Backed out changeset 08890d5674ad (bug 1913568)
Backed out changeset 4aaa0e9d0a6f (bug 1913568)
Backed out changeset b6f9d83c6da0 (bug 1913568)
2024-09-09 13:14:14 +03:00
Jamie Nicol 7d2db6b03a Bug 1913568 - Add texture transform support to GLReadTexImageHelper. r=gfx-reviewers,nical
Add the capability to transform the texture coordinates when reading
from a texture, similar to existing support in GLBlitHelper and
CompositorOGL.

This patch doesn't change any behaviour, but this capability will be
made use of by a later patch in this series.

Differential Revision: https://phabricator.services.mozilla.com/D220580
2024-09-09 09:10:23 +00:00
Jamie Nicol 82b8533096 Bug 1912211 - Handle SurfaceTexture transform in GLBlitHelper. r=gfx-reviewers,bradwerth
Android SurfaceTextures provide a transform that should be applied to
texture coordinates when rendering. Usually this is simply a y-flip,
but not always. While we handle the transform correctly in our regular
rendering path, GLBlitHelper (used for example when using a video as a
webgl texture) currently hard-codes a y-flip. This patch replaces the
hardcoded y-flip with the provided transform.

Differential Revision: https://phabricator.services.mozilla.com/D218834
2024-08-20 18:04:47 +00:00
sotaro b9a796eeb7 Bug 1912368 - Use GpuProcessTextureId in D3D11TextureData if compositor device is used r=gfx-reviewers,lsalzman
With NVIDIA GPU, original ID3D11Texture2D created by compositor device and ID3D11Texture2D opened from shared handle compositor device seemed to work differently. The original ID3D11Texture2D seemed to work well with STR of Bug 1911237 with NVIDIA GPU.

Then if  ID3D11Texture2D is created by compositor device, it seems better to use GpuProcessTextureId instead of shared handle.

Differential Revision: https://phabricator.services.mozilla.com/D218903
2024-08-14 11:02:38 +00:00
Kelsey Gilbert ac869dce06 Bug 1911920 - Always apply TF ops in ColorProfileConversionDesc. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D218698
2024-08-08 00:52:48 +00:00
Kelsey Gilbert 560b6d6898 Bug 1911920 - Gtest for ColorProfileConversionDesc between Srgb and Displayp3. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D218697
2024-08-08 00:52:48 +00:00
Tom Ritter ca7ffe0a4f Bug 1899874: Plumb forceSoftwareRendering down the stack. r=jgilbert
willReadFrequently already implies this; however that can't
be enabled on Windows. We can use our own attribute to control
the value as it plumbs into the depths of Canvas2D and WebGL

Differential Revision: https://phabricator.services.mozilla.com/D212178
2024-08-07 00:31:45 +00:00
Jamie Nicol 29aa4769f1 Bug 1898238 - Use SharedSurface_EGLImage for out-of-process webgl and accelerated canvas on Android. r=sotaro,jgilbert
Adds a pref wegb.enable-egl-image which is true by default. When
enabled, we use EGL images as the preferred texture type for
out-of-process webgl and accelerated canvas on Android. In-process
webgl will never attempt to use EGL images, regardless of the value of
the pref, as we are unable to send EGL images cross-process.

Differential Revision: https://phabricator.services.mozilla.com/D211293
2024-07-22 20:23:39 +00:00
Jamie Nicol 34ec60f7ff Bug 1898238 - Make SharedSurface_EGLImage and (Render)EGLImageTextureHost work. r=sotaro,jgilbert
SharedSurface_EGLImage has mostly avoided bitrotting. However, it now
sometimes gets destructed after the GLContext has been lost, resulting
in a crash when attempting to clean up its resources. To avoid this,
we hold a weak reference to the EglDisplay, and use that to clean up
rather than the GLContext.

To support rendering with SWGL, EGLImageTextureHost ensures the
correct preferCompositorSurface, supportsExternalCompositing, and
imageType values are sent to webrender. RenderEGLImageTextureHost now
implements RenderTextureHostSWGL, as well as the new
CreateTextureSource() function, and EGLImageTextureSource is
initialized with a GL context reference so that it may actually work.

Additionally we use eglWaitSync() rather than eglClientWaitSync()
where available for improved performance. And we ensure that we bind
the EGL images' textures to GL_TEXTURE_2D rather than
GL_TEXTURE_EXTERNAL when running on the Android emulator to work
around the buggy implementation in some emulator versions.

Differential Revision: https://phabricator.services.mozilla.com/D211291
2024-07-22 20:23:38 +00:00
Iulian Moraru dcd19dd9aa Backed out 5 changesets (bug 1898238) for causing non unified build bustages on RenderEGLImageTextureHost.cpp. CLOSED TREE
Backed out changeset ae8e94c8f819 (bug 1898238)
Backed out changeset 549abd685d11 (bug 1898238)
Backed out changeset 6359e558d765 (bug 1898238)
Backed out changeset 332c668a15bc (bug 1898238)
Backed out changeset 19fa8d4af66f (bug 1898238)
2024-07-22 20:27:45 +03:00
Jamie Nicol 43b7e8a94e Bug 1898238 - Use SharedSurface_EGLImage for out-of-process webgl and accelerated canvas on Android. r=sotaro,jgilbert
Adds a pref wegb.enable-egl-image which is true by default. When
enabled, we use EGL images as the preferred texture type for
out-of-process webgl and accelerated canvas on Android. In-process
webgl will never attempt to use EGL images, regardless of the value of
the pref, as we are unable to send EGL images cross-process.

Differential Revision: https://phabricator.services.mozilla.com/D211293
2024-07-22 16:02:34 +00:00
Jamie Nicol 7b9f68f783 Bug 1898238 - Make SharedSurface_EGLImage and (Render)EGLImageTextureHost work. r=sotaro,jgilbert
SharedSurface_EGLImage has mostly avoided bitrotting. However, it now
sometimes gets destructed after the GLContext has been lost, resulting
in a crash when attempting to clean up its resources. To avoid this,
we hold a weak reference to the EglDisplay, and use that to clean up
rather than the GLContext.

To support rendering with SWGL, EGLImageTextureHost ensures the
correct preferCompositorSurface, supportsExternalCompositing, and
imageType values are sent to webrender. RenderEGLImageTextureHost now
implements RenderTextureHostSWGL, as well as the new
CreateTextureSource() function, and EGLImageTextureSource is
initialized with a GL context reference so that it may actually work.

Additionally we use eglWaitSync() rather than eglClientWaitSync()
where available for improved performance. And we ensure that we bind
the EGL images' textures to GL_TEXTURE_2D rather than
GL_TEXTURE_EXTERNAL when running on the Android emulator to work
around the buggy implementation in some emulator versions.

Differential Revision: https://phabricator.services.mozilla.com/D211291
2024-07-22 16:02:33 +00:00
Kelsey Gilbert 19b0fabe6e Bug 1885032 - Support EXT_depth_clamp in webgl. r=gfx-reviewers,webidl,lsalzman,smaug
Differential Revision: https://phabricator.services.mozilla.com/D215713
2024-07-17 21:12:23 +00:00
Sylvestre Ledru 45030f6970 Bug 1519636 - Reformat recent changes to the Google coding style r=emilio,necko-reviewers,geckoview-reviewers,application-update-reviewers,media-playback-reviewers,devtools-reviewers,anti-tracking-reviewers,profiler-reviewers,win-reviewers,migration-reviewers,padenot,mconley,nchevobbe,kershaw,gstoll,mstange,bytesized,m_kato
This new version of clang 17 also slightly changed the formatting.

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D215914
2024-07-17 11:15:31 +00:00
Cristian Tuns eea96fab49 Backed out 2 changesets (bug 1899874) It is crashing the browser on windows and linux, Bug 1906687. CLOSED TREE
Backed out changeset cd0e7d18bbff (bug 1899874)
Backed out changeset 347c3fe4a18f (bug 1899874)
2024-07-09 17:48:05 -04:00
Sandor Molnar ec6b342b5a Backed out changeset 8609f288794c (bug 1885032) for causing mochitest failures @ test_2_conformance__extensions__ext-depth-clamp.html CLOSED TREE 2024-07-04 21:46:19 +03:00
Kelsey Gilbert 8a3d560a42 Bug 1885032 - Support EXT_depth_clamp in webgl. r=gfx-reviewers,webidl,lsalzman,smaug
Differential Revision: https://phabricator.services.mozilla.com/D215713
2024-07-04 17:47:25 +00:00
Tom Ritter 7e7bbeb6f3 Bug 1899874: Plumb forceSoftwareRendering down the stack. r=jgilbert
willReadFrequently already implies this; however that can't
be enabled on Windows. We can use our own attribute to control
the value as it plumbs into the depths of Canvas2D and WebGL

Differential Revision: https://phabricator.services.mozilla.com/D212178
2024-07-03 08:29:51 +00:00
Stanca Serban 62913847b9 Backed out 20 changesets (bug 1900828, bug 1900863, bug 1902359, bug 1901771, bug 1902671, bug 1901291, bug 1902003, bug 1901799, bug 1897271, bug 1901260, bug 1899874, bug 1903609, bug 1902086, bug 1902364) for causing multiple failures. CLOSED TREE
Backed out changeset 93cd1edda657 (bug 1900828)
Backed out changeset 693209b2919f (bug 1899874)
Backed out changeset b73df6e562de (bug 1899874)
Backed out changeset a93ca984ca88 (bug 1903609)
Backed out changeset 8303598ec6b0 (bug 1903609)
Backed out changeset e3a3c98b34fd (bug 1903609)
Backed out changeset 962fe23bb97a (bug 1903609)
Backed out changeset 00f2e924c9f2 (bug 1903609)
Backed out changeset 0ade4bbe618d (bug 1901291)
Backed out changeset a13f96530518 (bug 1901260)
Backed out changeset 510bc857cdf4 (bug 1902671)
Backed out changeset 754801e10b4b (bug 1902364)
Backed out changeset 7dc2bd362cb9 (bug 1902359)
Backed out changeset 502943b3d954 (bug 1902086)
Backed out changeset 1368337eb6d5 (bug 1902086)
Backed out changeset 0add6564e69b (bug 1902003)
Backed out changeset 929d9508ad19 (bug 1901799)
Backed out changeset 5baeea7c14f6 (bug 1901771)
Backed out changeset 8cf0f72c6a98 (bug 1897271)
Backed out changeset f32d78084462 (bug 1900863)
2024-06-25 16:08:06 +03:00
Tom Ritter 1b5953dddc Bug 1899874: Plumb forceSoftwareRendering down the stack. r=jgilbert
willReadFrequently already implies this; however that can't
be enabled on Windows. We can use our own attribute to control
the value as it plumbs into the depths of Canvas2D and WebGL

Differential Revision: https://phabricator.services.mozilla.com/D212178
2024-06-25 11:53:33 +00:00
Jamie Nicol 3dcab39a55 Bug 1903810 - Leak EGLDisplays on all Samsung Xclipse GPUs. r=gfx-reviewers,nical
In bug 1868825 we encountered crashes on a specific device when
calling eglTerminate. As a workaround, we avoided calling eglTerminate
and instead deliberately leaked the EGLDisplay. As we had only
encountered this crash on a specific device, we limited the workaround
to just that device.

We are now seeing the same crash on a range of devices, all with
Samsung Xclipse GPUs. This patch therefore makes us leak the
EGLDisplays on all devices with an Xclipse GPU.

As the GPU model is not available in EglDisplay code, we instead set a
flag on the EglDisplay object when the GLContext is initialized. Prior
to terminating the display we check whether this flag has been set.
Terminating a display which has not had a context created does not
reproduce the crash, so this is sufficient.

Differential Revision: https://phabricator.services.mozilla.com/D214539
2024-06-21 20:24:47 +00:00
sotaro ab1698b5e4 Bug 1901928 - Remvoe D3D11YCbCrImage class r=gfx-reviewers,lsalzman
D3D11YCbCrImage class is no longer used.

But DXGIYCbCrTextureAllocationHelper and D3D11YCbCrRecycleAllocator in D3D11YCbCrImage.h are still used.

Differential Revision: https://phabricator.services.mozilla.com/D213383
2024-06-12 16:40:32 +00:00
Lee Salzman 16ec378645 Bug 1894929 - Disable gl::SwapChain's internal pooling when RemoteTextureMap is used. r=jnicol,gfx-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D210864
2024-05-20 18:21:15 +00:00
Kelsey Gilbert 401c6844d9 Bug 1885447 - Tonemap/color-manage webgl sdr/wcg output into Display profile as pre-compositor post-process. r=gfx-reviewers,webidl,smaug,ahale
Differential Revision: https://phabricator.services.mozilla.com/D207651
2024-05-06 23:36:51 +00:00
Stanca Serban d76e7b6344 Backed out changeset 995596d4362c (bug 1885447) for causing build bustages in AutoMappable.h. CLOSED TREE 2024-04-23 22:19:00 +03:00
Kelsey Gilbert 3ea25df251 Bug 1885447 - Tonemap/color-manage webgl sdr/wcg output into Display profile as pre-compositor post-process. r=gfx-reviewers,webidl,smaug,ahale
Differential Revision: https://phabricator.services.mozilla.com/D207651
2024-04-23 16:54:05 +00:00
Sylvestre Ledru 21f973ed5c Bug 1519636 - Reformat recent changes to the Google coding style r=emilio,media-playback-reviewers,padenot
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D207867
2024-04-22 16:00:09 +00:00
Brad Werth 8e3acc45f5 Bug 1764201 Part 3: Remove screen info stuff from gfxPlatform. r=jgilbert,geckoview-reviewers
The gfxPlatform::GetScreen* methods have always been redundant. Removing
them in favor of ScreenManager or nsDeviceContext methods will
discourage future code authors from adding more redundancy in
gfxPlatform.

Differential Revision: https://phabricator.services.mozilla.com/D203672
2024-03-22 00:55:48 +00:00
stransky bb252b6267 Bug 1882779 [Linux] Always create offscreen rendering surface if we're missing native rendering window r=lsalzman,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D204066
2024-03-21 15:14:17 +00:00
Sandor Molnar 9c939cb9a0 Backed out 7 changesets (bug 1882779) for causing perma mda failures @ test_getUserMedia_basicScreenshare.html
Backed out changeset c7d6f5ba608c (bug 1882779)
Backed out changeset d343fe633520 (bug 1882779)
Backed out changeset dcc81c544c72 (bug 1882779)
Backed out changeset f36a7bafc019 (bug 1882779)
Backed out changeset c621729acdc4 (bug 1882779)
Backed out changeset 5692d5a1b237 (bug 1882779)
Backed out changeset ae204d74a9f7 (bug 1882779)
2024-03-19 16:51:55 +02:00
stransky 3a3c585b8a Bug 1882779 [Linux] Always create offscreen rendering surface if we're missing native rendering window r=lsalzman,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D204066
2024-03-19 12:15:46 +00:00
Mike Hommey c70ca80cfd Bug 1884836 - Base graphics support for iOS. r=gfx-reviewers,bradwerth
Original work by Nika Layzell and Ted Mielczarek.

Of note:
- GLdouble and GLclampd are not defined in the iPhoneOS SDK opengl
  headers.
- GL_CONTEXT_PROVIDER_DEFAULT was defined too early for
  GLContextProviderEAGL to be used as intended.
- GLContextProviderEAGL::CreateForCompositorWidget was aligned with
  GLContextProviderCGL::CreateForCompositorWidget. There is a ton of
  overlap between both, but sharing more code was left out of scope.
- MacIOSurface::BindTexImage and
  SurfacePoolCA::LockedPool::GetFramebufferForSurface were left
  unimplemented.
- RootSnapshotter is disabled.

Differential Revision: https://phabricator.services.mozilla.com/D204323
2024-03-15 01:28:27 +00:00
Stanca Serban 25baf2ac1a Backed out 2 changesets (bug 1884836) for causing mochitests failures in test_2_conformance__textures__misc__texture-corner-case-videos.html. CLOSED TREE
Backed out changeset 56bbc2a419e8 (bug 1884836)
Backed out changeset cc464f6e2cfb (bug 1884836)
2024-03-15 01:59:29 +02:00
Narcis Beleuzu 189b74c192 Bug 1884836 - Fix bustage on SharedSurfaceIO.cpp . r=glandium 2024-03-14 23:46:05 +02:00
Mike Hommey a58d54f79b Bug 1884836 - Base graphics support for iOS. r=gfx-reviewers,bradwerth
Original work by Nika Layzell and Ted Mielczarek.

Of note:
- GLdouble and GLclampd are not defined in the iPhoneOS SDK opengl
  headers.
- GL_CONTEXT_PROVIDER_DEFAULT was defined too early for
  GLContextProviderEAGL to be used as intended.
- GLContextProviderEAGL::CreateForCompositorWidget was aligned with
  GLContextProviderCGL::CreateForCompositorWidget. There is a ton of
  overlap between both, but sharing more code was left out of scope.
- MacIOSurface::BindTexImage and
  SurfacePoolCA::LockedPool::GetFramebufferForSurface were left
  unimplemented.
- RootSnapshotter is disabled.

Differential Revision: https://phabricator.services.mozilla.com/D204323
2024-03-14 20:56:50 +00:00
Mike Hommey 139ad31eee Bug 1884012 - Fall back to the warning-silencer case everywhere in SurfaceFactory::Create. r=gfx-reviewers,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D203839
2024-03-07 00:53:05 +00:00
Mike Hommey 284211b72b Bug 1883508 - Fix build errors in GLContextProviderEAGL.mm. r=gfx-reviewers,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D203524
2024-03-06 04:59:54 +00:00
Steve Fink c19b37f030 Bug 1790873 - Send a full line at a time to printf_stderr in GLContext.cpp r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D166850
2024-02-28 18:15:03 +00:00
Cosmin Sabou 3077e1076d Backed out changeset 10faf99bbe8f (bug 1880016) as request by sotaro. 2024-02-13 18:13:04 +02:00
sotaro 2414d5152e Bug 1880016 - Make RenderDXGITextureHost::SyncObjectNeeded() return false when ID3D11Texture2D is created by compositor device r=gfx-reviewers,lsalzman
By default, hardware video decoder uses compositor device for D3D11Device. In this case, mSyncObject->Synchronize() in RenderCompositorANGLE::BeginFrame() is not necessary.

When ID3D11Texture2D is created by compositor device, the Synchronize() is not necessary.

Differential Revision: https://phabricator.services.mozilla.com/D201693
2024-02-13 15:12:28 +00:00
Jeff Muizelaar 239afc7998 Bug 1877726. Revert "Bug 1664063 - Ensure we consistently handle all errors from IDXGIKeyedMutex::AcquireSync.".
This reverts commit e25a5f344af32bdd689500bae7b4f24f205ba9f0.

We believe bug 1664063 was causing to hit some broken device reset
handling code.

Differential Revision: https://phabricator.services.mozilla.com/D201658
2024-02-13 04:25:35 +00:00
Jeff Muizelaar ef806ed481 Bug 1879105. Generalize SamsungXclipse920 workaround to all Xclipse GPUs. r=gfx-reviewers,nical
We have reports of the same flickering that we were seeing on
Xclipse920 GPUs on Xclipse940. For now, let's just enable the workaround
on all Xclipse GPUs.

Differential Revision: https://phabricator.services.mozilla.com/D200944
2024-02-07 15:59:04 +00:00
Kelsey Gilbert fc79a725c9 Bug 1877341 - Reset GLContext TLS current-context caching when calling library MakeCurrent symbols. r=gfx-reviewers,ahale
Differential Revision: https://phabricator.services.mozilla.com/D199947
2024-02-01 18:44:20 +00:00
sotaro 5eabf27101 Bug 1817617 - Wait ID3D11Query of D3D11Texture2D copy complete just before blitting for video overlay with non Intel GPUs r=media-playback-reviewers,padenot
Normally when D3D11Texture2D is copied by ID3D11DeviceContext::CopySubresourceRegion() with compositor device, WebRender does not need to wait copy complete, since WebRender also uses compositor device.

But with Non-intel GPUs(like NDIVIA), there is a case that the copy complete need to be wait explicitly even with compositor device

mSyncObject->Synchronize() could not be used with compositor device.

Wait of the query is not called in D3D11DXVA2Manager::CopyToImage(), since the wait could take long time. Then the Wait of the query is deferred to just before blitting for video overlay.

Differential Revision: https://phabricator.services.mozilla.com/D200041
2024-02-01 10:28:32 +00:00
Sandor Molnar 26c16e2b65 Backed out changeset 30f4e9c2f11e (bug 1877341) for causing build bustages at gfx/gl/GLLibraryEGL.h CLOSED TREE 2024-01-31 21:29:48 +02:00
Kelsey Gilbert 12fa277cdd Bug 1877341 - Reset GLContext TLS current-context caching when calling library MakeCurrent symbols. r=gfx-reviewers,ahale
Differential Revision: https://phabricator.services.mozilla.com/D199947
2024-01-31 19:00:53 +00:00
Kelsey Gilbert 8a90064236 Bug 1873507 - Replace ScopedXFree<GLXFBConfig> with MakeScopeExit. r=gfx-reviewers,aosmond
Differential Revision: https://phabricator.services.mozilla.com/D198089
2024-01-25 23:10:26 +00:00