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

173 Коммитов

Автор SHA1 Сообщение Дата
sotaro 2f26b6d07c Bug 1811456 - Fix srcOrigin of Android SurfaceTexture Blit r=gfx-reviewers,jnicol
It is short term fix. Using SurfaceTexture.getTransform() is long term fix.

Differential Revision: https://phabricator.services.mozilla.com/D168933
2023-02-06 11:23:38 +00:00
Kelsey Gilbert 6d120d162b Bug 1805626 - Query vert attrib buffer binding directly. r=gfx-reviewers,lsalzman
Previously we were querying the current ARRAY_BUFFER_BINDING, which
would fail if you did:
```
BindBuffer(ARRAY_BUFFER, a)
VertexAttribPointer(...)
BindBuffer(ARRAY_BUFFER, b)
```
We would assume we should call VeretxAttribPointer again with `b` bound,
when we need to bind `a` instead.

Unfortunately, this is hard to test, and we only hit this on drivers
where we don't use VAOs, which are rare now.

Differential Revision: https://phabricator.services.mozilla.com/D164744
2022-12-14 23:08:41 +00:00
Butkovits Atila 14c4666a5f Backed out changeset 0a2985a48339 (bug 1769747) for causing gl failures. 2022-10-05 01:38:13 +03:00
Kelsey Gilbert 5e0abe1b97 Bug 1769747 - Support non-RGBA video-to-texture fastpath. r=gfx-reviewers,nical
Also scale back some asserts from debug-fatal to just warnings, because
I kept hitting them during testing because of our poor surface lifetime
handling.

Differential Revision: https://phabricator.services.mozilla.com/D157993
2022-10-04 20:31:42 +00:00
Kelsey Gilbert a32dfd5297 Bug 1785925 - Add LUT and Colorspace support to GLBlitHelper. r=lsalzman,media-playback-reviewers,alwu
This code was originally developed in bug 1771374, but here we omit the
DCLayerTree changes for later.

Differential Revision: https://phabricator.services.mozilla.com/D155027
2022-09-13 17:40:43 +00:00
Marian-Vasile Laza 7ec7dec6f1 Backed out changeset f1e6746037f7 (bug 1785925) for causing reftest failures on DCLayerTree.cpp. CLOSED TREE 2022-09-06 23:35:51 +03:00
Kelsey Gilbert 24a9bc97bb Bug 1785925 - Add LUT and Colorspace support to GLBlitHelper. r=lsalzman,media-playback-reviewers,alwu
This code was originally developed in bug 1771374, but here we omit the
DCLayerTree changes for later.

Differential Revision: https://phabricator.services.mozilla.com/D155027
2022-09-06 18:36:34 +00:00
Cristian Tuns 3d56a1da28 Backed out changeset b14b975aa6d7 (bug 1785925) for causing build bustages on GLBlitHelper.cpp CLOSED TREE 2022-09-02 20:12:33 -04:00
Kelsey Gilbert 75cccdd5cb Bug 1785925 - Add LUT and Colorspace support to GLBlitHelper. r=lsalzman,media-playback-reviewers,alwu
This code was originally developed in bug 1771374, but here we omit the
DCLayerTree changes for later.

Differential Revision: https://phabricator.services.mozilla.com/D155027
2022-09-02 22:15:58 +00:00
alwu efe35b01d5 Bug 1771011 - part2 : wrap media engine's dcomp handle, and use it on our gfx pipeline in the GPU process.r=jolin,sotaro
In this patch, we ask the media engine to return a handle for shareable
dcomp surface, which will then be packaged into a new texture data type
and being shared with the GPU process via the video bridge.

DcompSurfaceImage is the image which contains the handle texture data,
which doesn't support being accessed in the content process. When the
compositor uploads the image to the GPU process, the corresponding
texture host will be created.

The render texture host will be created by that texture host, and it
will be used in DCLayerTree. In DCLayerTree, we create a new type of
surface for our dcomp handle. DCSurfaceHandle will ask the render
texture host to reconstruct the surface by the handle shared from the
remote process (the handle is actually duplicated to the parent process
first due to the sandbox policy, and then be duplicated to the GPU
process later)

DCSurfaceHandle will attach that surface to its visual in order to
display the video frame directly. In the whole process, it's not
possible for Gecko to access any decoded video data which is protected by the
media engine itself.

Depends on D149941

Differential Revision: https://phabricator.services.mozilla.com/D151019
2022-08-13 23:48:07 +00:00
Iulian Moraru 27d760c7c2 Backed out 9 changesets (bug 1771374) for causing mochitest-webgl failures. CLOSED TREE
Backed out changeset ded977dd1896 (bug 1771374)
Backed out changeset adeb8b7d48f9 (bug 1771374)
Backed out changeset 7767340872c5 (bug 1771374)
Backed out changeset 33282b4ffaae (bug 1771374)
Backed out changeset 75db498cd0e7 (bug 1771374)
Backed out changeset 70035903ea37 (bug 1771374)
Backed out changeset 7c7de0fb66e1 (bug 1771374)
Backed out changeset 615df05e016f (bug 1771374)
Backed out changeset ac3411d21928 (bug 1771374)
2022-08-02 03:38:09 +03:00
Kelsey Gilbert 5108ab70bf Bug 1771374 - Create swapchain with premult-alpha if hasAlpha. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D152445
2022-08-01 19:49:28 +00:00
Kelsey Gilbert 0bd05e8c5c Bug 1771374 - Fix build and lint warnings. r=gfx-reviewers,aosmond
Differential Revision: https://phabricator.services.mozilla.com/D150620
2022-08-01 19:49:27 +00:00
Kelsey Gilbert fa6e66aedd Bug 1771374 - Support display-p3 output via DirectComposition on Windows. r=sotaro,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D150275
2022-08-01 19:49:26 +00:00
Nicolas Silva 73a5fa066e Bug 1780803 - Avoid uninitialized enum in error path. r=gfx-reviewers,jgilbert
Addresses a coverity warning. The problem looks very benign but the work around is simple and it's good to keep the volume static analysis warnings in check.

Differential Revision: https://phabricator.services.mozilla.com/D152525
2022-07-28 13:45:14 +00:00
Narcis Beleuzu a9e7761934 Backed out 4 changesets (bug 1771374) for causing Google docs and maps rendering regressions. a=backout
Backed out changeset 9c65411d1843 (bug 1771374)
Backed out changeset 9f5cf953fcc8 (bug 1771374)
Backed out changeset 8b39f60971e4 (bug 1771374)
Backed out changeset ef52a6c462b6 (bug 1771374)
2022-07-14 00:43:56 +03:00
Kelsey Gilbert f35027d825 Bug 1771374 - Fix build and lint warnings. r=gfx-reviewers,aosmond
Differential Revision: https://phabricator.services.mozilla.com/D150620
2022-07-12 23:55:51 +00:00
Kelsey Gilbert 8eb05ff04b Bug 1771374 - Support display-p3 output via DirectComposition on Windows. r=sotaro,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D150275
2022-07-12 23:55:50 +00:00
Kelsey Gilbert 4f87812c0f Bug 1778232 - ImageFormat::s/CAIRO_SURFACE/MOZ2D_SURFACE/. r=jrmuizel
Also remove comment that says it can't be off-main-thread.

Differential Revision: https://phabricator.services.mozilla.com/D151087
2022-07-06 07:46:17 +00:00
smolnar 3fa084ce2f Backed out 3 changesets (bug 1771374) for causing build bustage in gfx/gl/gtest/TestColorspaces.cpp CLOSED TREE
Backed out changeset 4d01f260c43a (bug 1771374)
Backed out changeset fc62679f0a6c (bug 1771374)
Backed out changeset f4f12470f8b7 (bug 1771374)
2022-06-30 21:19:17 +03:00
Kelsey Gilbert ec0b1e1d29 Bug 1771374 - Fix lint warnings. r=gfx-reviewers,aosmond
Differential Revision: https://phabricator.services.mozilla.com/D150620
2022-06-30 17:56:27 +00:00
Kelsey Gilbert bb48a57a8a Bug 1771374 - Support display-p3 output via DirectComposition on Windows. r=sotaro,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D150275
2022-06-30 17:56:26 +00:00
criss d5ece910a9 Backed out 3 changesets (bug 1771374) for causing bustages on Colorspaces.h. CLOSED TREE
Backed out changeset 498c27656dc3 (bug 1771374)
Backed out changeset 6f97bc39643f (bug 1771374)
Backed out changeset b4fdb70808b6 (bug 1771374)
2022-06-30 05:28:11 +03:00
Kelsey Gilbert 8fdac7788a Bug 1771374 - Fix lint warnings. r=gfx-reviewers,aosmond
Differential Revision: https://phabricator.services.mozilla.com/D150620
2022-06-29 23:38:23 +00:00
Kelsey Gilbert c4f86e2e33 Bug 1771374 - Support display-p3 output via DirectComposition on Windows. r=sotaro,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D150275
2022-06-29 23:38:22 +00:00
criss efb5f18b59 Backed out 3 changesets (bug 1771374) for causing build bustages on GLBlitHelper.cpp. CLOSED TREE
Backed out changeset 71d40a0a3c9c (bug 1771374)
Backed out changeset 6a42df6834fe (bug 1771374)
Backed out changeset be888d0fd0bf (bug 1771374)
2022-06-30 01:12:46 +03:00
Kelsey Gilbert 7cf061700c Bug 1771374 - Fix lint warnings. r=gfx-reviewers,aosmond
Differential Revision: https://phabricator.services.mozilla.com/D150620
2022-06-29 21:48:53 +00:00
Kelsey Gilbert bad5d9146c Bug 1771374 - Support display-p3 output via DirectComposition on Windows. r=sotaro,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D150275
2022-06-29 21:48:52 +00:00
Kelsey Gilbert c6b76d3b9a Bug 1776465 - GLBlitHelper link failure should go down link failure branch. r=gfx-reviewers,lsalzman
Also, no reason not to complete iteration across uTex[012], as opposed
to breaking early once we hit the first one that isn't present.
A shader with e.g. uTex1 but not uTex0 is weird, but there's no reason
for it not to work.

Differential Revision: https://phabricator.services.mozilla.com/D150270
2022-06-24 18:29:58 +00:00
stransky b292c031de Bug 1770560 [Linux] Implement GLBlitHelper::Blit(DMABufSurface* surface,...) to blit DMABufSurface directly r=sotaro,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D146989
2022-06-06 13:31:03 +00:00
Kelsey Gilbert 2bd9efd83a Bug 1770235 - DrawBlitProg::Draw non-vao path must restore vaa0's buffer. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D146844
2022-05-19 23:00:33 +00:00
Kelsey Gilbert 5362a1dd62 Bug 1449575 - Don't attempt ColorMask elision in WebGL. r=gfx-reviewers,aosmond
* Always use DoColorMask(u32?, u8) in webgl code.
* Handle OES_draw_buffers_indexed ColorMaski in GLBlitHelper.

Differential Revision: https://phabricator.services.mozilla.com/D141543
2022-03-24 19:39:06 +00:00
Lee Salzman 6f0be8c19f Bug 1757067 - Explicitly specify chroma subsampling scheme for YCbCr data. r=jgilbert,jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D139656
2022-03-10 09:24:15 +00:00
smolnar 97f77f8381 Backed out changeset 36c6350bc7d1 (bug 1757067) for causing build bustages in gfx/gl/GLBlitHelperD3D.cpp CLOSED TREE 2022-03-10 10:10:10 +02:00
Lee Salzman a664a6d305 Bug 1757067 - Explicitly specify chroma subsampling scheme for YCbCr data. r=jgilbert,jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D139656
2022-03-10 07:48:53 +00:00
sotaro 33ec38c192 Bug 1757698 - Add D3D11TextureIMFSampleImage and array index handling to D3D11TextureData r=jgilbert,gfx-reviewers,jrmuizel
This is a preparation of Bug 1723207.

D3D11TextureIMFSampleImage is used for storing ID3D11Texture2D of IMFSample. Array index handling is added, since there are cases that hardware decoder uses array texture. D3D11TextureIMFSampleImage is expected to be used in GPU process.

Differential Revision: https://phabricator.services.mozilla.com/D140017
2022-03-03 02:30:28 +00:00
Lee Salzman 46a74c07ea Bug 1755780 - Support CopyToSwapChain on WebGLContext. r=jgilbert
For use within accelerated Canvas2D, it is expedient to have a variant of Present
that explicitly acknowledges that there is a copy from a supplied WebGL framebuffer
into the swap chain back buffer, as is usually the case when remoting, so that it
can be relied upon for format conversions or other concerns. This allows Present
to remain simple and assume rendering happened directly to the back buffer, without
need of a copy.

This backs out some of the earlier changes to Present in 1754130 in favor of
separating the new copy behavior into an explicit CopyToSwapChain interface,
which supports a format swizzle that is useful for converting between Canvas2D
and WebGL swap chain formats. The behavior of CopyToSwapChain, as noted,
assumes that there is a supplied WebGL framebuffer that must be copied to the
swap chain back buffer before any compositing should occur.

Differential Revision: https://phabricator.services.mozilla.com/D138954
2022-02-21 17:33:09 +00:00
sotaro 7a437cab43 Bug 1736793 - Add SurfaceTexture support to GLBlitHelper::BlitSdToFramebuffer() r=jgilbert,gfx-reviewers
Blit support of android SurfaceTexture was removed by Bug 1640607.

Differential Revision: https://phabricator.services.mozilla.com/D128992
2022-01-19 02:13:48 +00:00
Kelsey Gilbert c3603037db Bug 1746111 - (Re)serialize WebRTC frame SurfaceDescriptorBuffers for convert-and-upload on WebGLParent. r=gfx-reviewers,nika,lsalzman
Also generally de-inline (WebGLParent::TexImage not DispatchCommand)
TexImage(SurfaceDescriptor).

Differential Revision: https://phabricator.services.mozilla.com/D132851
2021-12-15 01:54:21 +00:00
Emilio Cobos Álvarez 459155ff4c Bug 1712588 Implement DMABufSurface::GetAsSourceSurface. r=sotaro,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D116411
2021-07-15 16:19:51 +00:00
Brad Werth e4fe1123e7 Bug 1685183 Part 1: Make MacIOSurface always use 1.0 scale, and update callsites. r=jgilbert
This change makes callsites that use SurfaceDescriptor structures to ignore
scale factors. All surfaces are 1.0 scale, no matter what.

Differential Revision: https://phabricator.services.mozilla.com/D101213
2021-04-08 16:42:06 +00:00
Butkovits Atila 1557f3a480 Backed out 3 changesets (bug 1685183) for causing build bustages. CLOSED TREE
Backed out changeset bef089a9a5fa (bug 1685183)
Backed out changeset d9e2699b32c6 (bug 1685183)
Backed out changeset 083f895fddd9 (bug 1685183)
2021-04-08 06:48:02 +03:00
Brad Werth acdd1a887d Bug 1685183 Part 1: Make MacIOSurface always use 1.0 scale, and update callsites. r=jgilbert
This change makes callsites that use SurfaceDescriptor structures to ignore
scale factors. All surfaces are 1.0 scale, no matter what.

Differential Revision: https://phabricator.services.mozilla.com/D101213
2021-04-08 01:39:04 +00:00
David Parks 9032efe20c Bug 1682030 - Remove NPAPI plugin async rendering support r=bas,jgilbert,ipc-reviewers,mccr8
Removes async (windowless) NPAPI plugin rendering methods used to render a plugin to an offscreen surface in the GPU process.  None of this code is used since we have removed all NPAPI plugin support.

Differential Revision: https://phabricator.services.mozilla.com/D107152
2021-04-06 19:28:16 +00:00
Csoregi Natalia d68661e2cc Backed out 24 changesets (bug 1682030) for bustage on ProcessHangMonitor.cpp and nsCOMPtr.h. CLOSED TREE
Backed out changeset 5b1644096477 (bug 1682030)
Backed out changeset 35ae60eea3c7 (bug 1682030)
Backed out changeset 3eca76a6d639 (bug 1682030)
Backed out changeset 259c45447ad9 (bug 1682030)
Backed out changeset de9222dc8c31 (bug 1682030)
Backed out changeset 2986c7e14349 (bug 1682030)
Backed out changeset 6af3410bdb93 (bug 1682030)
Backed out changeset 42b0621c2927 (bug 1682030)
Backed out changeset 366e3e371858 (bug 1682030)
Backed out changeset 9adb2865adea (bug 1682030)
Backed out changeset 6af6af3bc03a (bug 1682030)
Backed out changeset da94a91b35ae (bug 1682030)
Backed out changeset 9143da258d0e (bug 1682030)
Backed out changeset 5e20d06952ba (bug 1682030)
Backed out changeset 6253d7e1ce7d (bug 1682030)
Backed out changeset 0e06ddeea3e2 (bug 1682030)
Backed out changeset 9c58d57c9e44 (bug 1682030)
Backed out changeset e90edd89430e (bug 1682030)
Backed out changeset 5861b8166b10 (bug 1682030)
Backed out changeset b4b88cdc7993 (bug 1682030)
Backed out changeset b80054e9805c (bug 1682030)
Backed out changeset 580d857674c0 (bug 1682030)
Backed out changeset a9cdf93c2662 (bug 1682030)
Backed out changeset 9c9c8b4998e2 (bug 1682030)
2021-04-06 03:54:12 +03:00
David Parks bd753c5ff6 Bug 1682030 - Remove NPAPI plugin async rendering support r=bas,jgilbert,ipc-reviewers,mccr8
Removes async (windowless) NPAPI plugin rendering methods used to render a plugin to an offscreen surface in the GPU process.  None of this code is used since we have removed all NPAPI plugin support.

Differential Revision: https://phabricator.services.mozilla.com/D107152
2021-04-05 23:48:40 +00:00
Jeff Gilbert 6776a9971c Bug 1678989 - Handle blitting kCVPixelFormatType_422YpCbCr8_yuvs. r=lsalzman
Also more gracefully handle dropped frames for async texture uploads.
If frame is missing, clear to [0.2, 0, 0.2, 1].
Fixing this is a larger change, so defer for now.

Differential Revision: https://phabricator.services.mozilla.com/D109983
2021-04-01 22:58:05 +00:00
Jeff Gilbert f4699b02fe Bug 1687438 - Bail if null iosurf for GLBlitHelper::BlitImage. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D102373
2021-01-20 01:49:32 +00:00
Sylvestre Ledru 912aeb9ab5 Bug 1519636 - Reformat recent changes to the Google coding style r=andi
Updated with clang-format version 11.0.1 (taskcluster-B6bdwSKDRF-luRQWXBuzpA)

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D102084
2021-01-18 16:50:16 +00:00
Jeff Gilbert a8926ffa47 Bug 1640607 - Send SurfaceDescriptors for GPU blitting for video-to-webgl. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D101061
2021-01-14 01:23:06 +00:00