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

188 Коммитов

Автор SHA1 Сообщение Дата
sotaro 954c16acec Bug 1805209 - Use RemoteTexture for WebGPU r=gfx-reviewers,lsalzman
WebGPU uses CompositableInProcessManager to push TextureHost directly from WebGPUParent to WebRender. But CompositableInProcessManager plumbing has a problem and caused Bug 1805209.

gecko already has a similar mechanism, called RemoteTextureMap. It is used in oop WebGL. If WebGPU uses RemoteTextureMap instead of CompositableInProcessManager, both WebGPU and oop WebGL use same mechanism.

WebGPUParent pushes a new texture to RemoteTextureMap. The RemoteTextureMap notifies the pushed texture to WebRenderImageHost.

Before the change, only one TextureHost is used for one swap chain. With the change, multiple TextureHosts are used for one swap chain with recycling.

The changes are followings.

- Use RemoteTextureMap instead of CompositableInProcessManager.
- Use RemoteTextureOwnerId instead of CompositableHandle.
- Use WebRenderCanvasData instead of WebRenderInProcessImageData.
- Add remote texture pushed callback functionality to RemoteTextureMap. With it, RemoteTextureMap notifies a new pushed remote texture to WebRenderImageHost.
- Remove CompositableInProcessManager.

Differential Revision: https://phabricator.services.mozilla.com/D164890
2022-12-23 20:41:02 +00:00
sotaro 525fcfea38 Bug 1781740 - Split RemoteTexture to RemoteTextureHostWrapper and actual remote texture's TextureHost r=gfx-reviewers,lsalzman
Preparation of Bug 1776885.

RemoteTextureMap is simplified. It expects that pref webgl.out-of-process.async-present.force-sync is true. Additional async remote texture ipc handling is going to be added at Bug 1776885.

- RemoteTextureHostWrapper wraps TextureHost of remote texture. It expose remote texture to WebRender. It notifies end of WebRender usage to the wrapped remote texture's TextureHost.
- Remote texture's TextureHost is created on WebGL ipc thread during pushing to RemoteTextureMap . End of usage of the remote texture is decided by using compositable ref of remote texture's TextureHost. The compositable ref is updated with holding RemoteTextureMap::mMutex.

Differential Revision: https://phabricator.services.mozilla.com/D152845
2022-09-07 00:58:34 +00:00
sotaro a807c798e9 Bug 1712486 - Add async front buffer posting for out-of-process WebGL r=jgilbert,lsalzman,gfx-reviewers
The async front buffer posting is going to be enabled by another bug.

Async IPC was added for async front buffer posting for out-of-process WebGL.
Client does not use TextureClient for storing SurfaceDescriptor.
It works basically same way as to in-process WebGL around nsDisplayCanvas, WebRenderCanvasData, WebRenderCommandBuilder and WebRenderBridgeParent.
SharedSurfaces of SurfaceDescriptorD3D10 are kept alive during their usage. It is for keeping a shread handle valid.
Copied data buffers of SharedShurface_Basics are kept alive during their usage. It is for keeping RenderBufferTextureHost valid.

Differential Revision: https://phabricator.services.mozilla.com/D150197
2022-06-29 09:32:29 +00:00
Norisz Fay f70f5a4b0f Backed out changeset af98fb4ff148 (bug 1712486) for causing build bustages on LayersSurfaces CLOSED TREE 2022-06-29 09:06:45 +03:00
sotaro 8a8d04cce2 Bug 1712486 - Add async front buffer posting for out-of-process WebGL r=jgilbert,lsalzman,gfx-reviewers
The async front buffer posting is going to be enabled by another bug.

Async IPC was added for async front buffer posting for out-of-process WebGL.
Client does not use TextureClient for storing SurfaceDescriptor.
It works basically same way as to in-process WebGL around nsDisplayCanvas, WebRenderCanvasData, WebRenderCommandBuilder and WebRenderBridgeParent.
SharedSurfaces of SurfaceDescriptorD3D10 are kept alive during their usage. It is for keeping a shread handle valid.
Copied data buffers of SharedShurface_Basics are kept alive during their usage. It is for keeping RenderBufferTextureHost valid.

Differential Revision: https://phabricator.services.mozilla.com/D150197
2022-06-29 05:05:47 +00:00
Nika Layzell c8c4669312 Bug 1734739 - Part 2: Stop requiring the OtherPid to create Endpoint, r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D128219
2021-11-24 17:56:00 +00:00
sotaro 1b44e05e92 Bug 1741784 - Remove unused code around CompositableHost r=gfx-reviewers,nical
Differential Revision: https://phabricator.services.mozilla.com/D131466
2021-11-19 07:41:29 +00:00
Narcis Beleuzu ce6ad351e2 Backed out changeset 12736f9bf7b5 (bug 1741784) for compositor leakchecks. CLOSED TREE 2021-11-18 18:07:09 +02:00
sotaro 2dc3b69cde Bug 1741784 - Remove unused code around CompositableHost r=gfx-reviewers,nical
Differential Revision: https://phabricator.services.mozilla.com/D131466
2021-11-18 14:16:35 +00:00
Matt Woodrow 115faf8e91 Bug 1730055 - Remove unused Effect types. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D125135
2021-09-22 05:27:20 +00:00
Tetsuharu Ohzeki 26d69b10cf Bug 1729817 - Remove unused WebRenderImageHost::PrintInfo(). r=gfx-reviewers,mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D125018
2021-09-09 15:46:20 +00:00
Tetsuharu Ohzeki 0eff170956 Bug 1729816 - part 2: Remove unused CompositableHost::BumpFlashCounter(). r=gfx-reviewers,mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D125004
2021-09-09 02:02:11 +00:00
Matt Woodrow 7960f3b11b Bug 1727684 - Remove ContentHost/ImageHost. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D123881
2021-08-28 03:54:23 +00:00
Matt Woodrow d93d452a96 Bug 1727672 - Remove LayerManagerComposite. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D123708
2021-08-26 04:59:57 +00:00
sotaro ec2350cffb Bug 1557105 - Handle non-webrender widget case during enabling WebRender at ImageBridge r=nical
ImageBridgeChild has only one global TextureFactoryIdentifier. When WebRender is enabled, it is used for both WebRender widget and non-WebRender(BasicCompositor) widget. WebRenderImageHost and ImageHost are incompatible and WebRenderTextureHost does not permit to be consumed on compositor thread. Then it does not work well for non-WebRender widget. To address the problem at ImageContainer, ImageContainer needs to know a connected widget type. It is not easy in some cases like WebRTC. Then host side could address the problem easier.

CompositableParentManager::FindCompositable() is changed to permit transform from WebRenderImageHost to ImageHost if it is necessary when WebRenderImageHost belongs to ImageBridge.

WebRenderTextureHost is changed to permit to consume wrapped TextureHost on compositor thread. If the wrapped TextureHost is BufferTextureHost, it is possible to comsume the TextureHost on compositor and on RenderThread, since they are memory buffer or shared memory buffer. WebRTC code always create BufferTextureHost for video frame. Then it works.

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

--HG--
extra : moz-landing-system : lando
2019-06-10 12:36:14 +00:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Jean-Yves Avenard 70040ff272 Bug 1245400 - P3. Report number of frames dropped by compositor back to VideoSink. r=nical
We report the number of frames dropped by the compositor because they were too late through:
ImageComposite -> ImageHost -> CompositableTransactionParent -> ImageBridgeParent -> IPDL -> ImageBridgeChild -> ImageContainerListener -> ImageContainer -> VideoSink

Differential Revision: https://phabricator.services.mozilla.com/D2177
2018-08-22 17:26:36 +02:00
Jean-Yves Avenard a0a2549c82 Bug 1245400 - P2. Keep track of frames that should have been painted but didn't. r=nical, r=mattwoodrow
We can't rely on the FrameID continuity to determine if a frame has been dropped due to timing or not.
The reason being that the VideoSink will not send to the compositor frames it knows as being late already (causing a discontinuity in the frames IDs), and count them as being dropped.
If we were to look at discontinuity on the compositor we would account for those frames twice.

FramesID will also increase non-linearly if a frame isn't painted because it's not visible (either out of the visible tree or in a hidden tab).

What we can measure however, is when a frame should have been painted but didn't because it was too late by looking at the value returned by ImageComposite::ChooseImageIndex() or when a new set of images is being received by the ImageComposite.
Any images found in the earlier array but never returned must have been dropped due to timing.

Looking at the index continuity greatly simplify the logic as we no longer need to worry if a video is hidden or not, or be part of a layer that is itself hidden as neither SetImages will be called then, nor ChooseImage

For now, we only account for those frames dropped, and do not report them yet.

Differential Revision: https://phabricator.services.mozilla.com/D2176
2018-08-22 17:26:36 +02:00
Hiroyuki Ikezoe 0020eaf1a1 Bug 1479234 - Fix the header for gfx::Glyph. r=kats
MozReview-Commit-ID: I0ukIwuxv7z

--HG--
extra : rebase_source : 74c7ad6a43520c3ba5ce96cbd2b13dedd6aaaa22
2018-07-31 06:13:15 +09:00
Coroiu Cristina 7634333ced Backed out 4 changesets (bug 1479234) for build bustage at build/src/gfx/vr/ipc/VRLayerChild.cpp on a CLOSED TREE
Backed out changeset 6ecc1666f571 (bug 1479234)
Backed out changeset c3bab1bc97cf (bug 1479234)
Backed out changeset c8c2625a33ba (bug 1479234)
Backed out changeset 2ffc8e9d5686 (bug 1479234)
2018-07-31 00:32:04 +03:00
Hiroyuki Ikezoe 272dc9b637 Bug 1479234 - Fix the header for gfx::Glyph. r=kats
MozReview-Commit-ID: I0ukIwuxv7z

--HG--
extra : rebase_source : 74c7ad6a43520c3ba5ce96cbd2b13dedd6aaaa22
2018-07-31 06:13:15 +09:00
David Anderson c9d035c90f Don't hardcode ContentHostTexture in PaintedLayerMLGPU. (bug 1420674 part 1, r=rhunt)
--HG--
extra : rebase_source : 625dbec58f01ba1f2d42fde0c048c2373b5c5674
2017-11-29 21:12:24 -08:00
Csoregi Natalia 8a2bcaea6d Backed out 5 changesets (bug 1420674) for Build Bustage. r=backout on a CLOSED TREE
Backed out changeset 89e84473d524 (bug 1420674)
Backed out changeset 22e1aa958dd2 (bug 1420674)
Backed out changeset 7f416f3bbacd (bug 1420674)
Backed out changeset 5af1da25ee57 (bug 1420674)
Backed out changeset eeb25dc98529 (bug 1420674)
2017-11-29 06:03:31 +02:00
David Anderson af51bf9ed7 Don't hardcode ContentHostTexture in PaintedLayerMLGPU. (bug 1420674 part 1, r=rhunt) 2017-11-28 18:34:58 -08:00
Daniel Holbert 126bd9e1a4 Bug 1412427 part 8: (automated patch) Switch a bunch of C++ files in gfx to use our standard mode lines. r=jrmuizel
This patch was generated automatically by the "modeline.py" script, available
here: https://github.com/amccreight/moz-source-tools/blob/master/modeline.py

For every file that is modified in this patch, the changes are as follows:
 (1) The patch changes the file to use the exact C++ mode lines from the
     Mozilla coding style guide, available here:
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style#Mode_Line

 (2) The patch deletes any blank lines between the mode line & the MPL
     boilerplate comment.

 (3) If the file previously had the mode lines and MPL boilerplate in a
     single contiguous C++ comment, then the patch splits them into
     separate C++ comments, to match the boilerplate in the coding style.

MozReview-Commit-ID: 77D61xpSmIl

--HG--
extra : rebase_source : c6162fa3cf539a07177a19838324bf368faa162b
2017-10-27 16:10:06 -07:00
sotaro a773ee4276 Bug 1354411 - Rebuild CompositorSessions if WebRender is disabled r=kats
When WebRender creation is failed, WebRender is disabled in gecko. There is a case that WebRenderBridgeParents exist when WebRender is disabled. To handle this, gecko needs to rebuild all CompositorSessions.

There is also a problem related to gfxVars::UseWebRender on compositor thread. If e10s is enabled, but no-gpu process(default on linux and mac), gfxVars::UseWebRender change is soon notified by compositor thread tasks. If WebRender creation failure happens at 2nd WebRender creation, several WebRenderBridgeParents for 1st WebRender could exist. IPC messages from WebRenderLayerManager are normally async, then there is a chance that the WebRenderBridgeParents receive the messages after the gfxVars::UseWebRender change. Further the gfxVars::UseWebRender change in content process could be delayed than WebRenderBridgeParents, then content process does not have a way to stop sending PWebRenderBridge IPC until the change of gfxVars::UseWebRender is received. WebRenderBridgeParent related tasks handle the message, but some tasks are done based on gfxVars::UseWebRender. At this time, gfxVars::UseWebRender returned false on compositor thread, then it cause unexpected result for WebRenderBridgeParent and WebRender. To addres this inconsistent situation, WebRenderBridgeParent related tasks on compositor thread stop to use gfxVars::UseWebRender.
2017-08-04 14:36:41 +09:00
David Anderson d1eec3b0e9 Don't require a Compositor to track async compositable ownership. (bug 1365879 part 13, r=mattwoodrow) 2017-06-20 01:17:20 -07:00
David Anderson e9660f0e6c Allow safe downcasting to ContentTextureHost and ImageHost. (bug 1365879 part 5, r=mattwoodrow) 2017-06-20 01:17:16 -07:00
David Anderson 8217a1b1a7 Attach Compositables to TextureSourceProviders instead of Compositors. (bug 1343814 part 5, r=mattwoodrow) 2017-03-21 20:32:56 -07:00
David Anderson 3f1c4ac214 Propagate the compositor through CompositableHost::Composite. (bug 1343814 part 4, r=mattwoodrow) 2017-03-21 20:32:55 -07:00
sotaro 1d710a54ef Bug 1343764 - Add ExternalBuffer handling r=nical 2017-03-07 19:37:28 +09:00
David Anderson efe562eabb Move composition time from Compositor to HostLayerManager. (bug 1339688 part 1, r=mattwoodrow) 2017-02-15 19:03:20 -08:00
David Anderson d2703c8176 Remove Composer2D remnants. (bug 1339353, r=kats) 2017-02-14 12:29:39 -08:00
Matt Woodrow 450185804e Bug 1325227 - Part 1: Remove synchronous transaction replies since they don't return any data we didn't already have. r=nical
MozReview-Commit-ID: 2HIbk65L7zR
2016-12-06 13:34:54 -10:00
sotaro 21e27083d4 Bug 1336024 - Split Image selection logic from ImageHost r=nical
--HG--
rename : gfx/layers/composite/ImageHost.cpp => gfx/layers/composite/ImageComposite.cpp
rename : gfx/layers/composite/ImageHost.h => gfx/layers/composite/ImageComposite.h
2017-02-07 17:07:00 +09:00
Kartikaya Gupta bf7599ac75 Merge m-c to graphics
MozReview-Commit-ID: 8BjfShvh5gp
2017-02-03 10:39:57 -05:00
sotaro 647d847ae8 Bug 1335680 - Remove UseOverlaySource r=nical 2017-02-03 10:11:27 +09:00
Kartikaya Gupta b66c471aef Merge m-c to graphics
MozReview-Commit-ID: LyU2woFOt7O
2017-01-18 13:48:56 -05:00
David Anderson 22504df44c Fix ImageBridgeChild memory tracking errors on shutdown. (bug 1323957 part 6, r=mattwoodrow)
--HG--
extra : rebase_source : 58a8df18d964cbe1b216cc7e8dbceb39760e632e
2017-01-17 18:47:07 -08:00
David Anderson 3d7a9b6ee1 Remove PCompositable. (bug 1323957 part 5, r=mattwoodrow)
--HG--
extra : rebase_source : 8b2a3826a08b14065d8ef3474eddc38d592a4f82
2017-01-17 18:47:07 -08:00
David Anderson 065c15518d Link Compositables via IDs instead of actors. (bug 1323957 part 4, r=mattwoodrow)
--HG--
extra : rebase_source : 1c4d789471a188c12bc9450c63ebaecc1b55c122
2017-01-17 18:47:06 -08:00
David Anderson 89d48ae344 Use CompositableHandle in ImageNotification. (bug 1323957 part 3, r=mattwoodrow)
--HG--
extra : rebase_source : 2e5b108e68c2774f61776481ad9c4fa558923e38
2017-01-17 18:47:06 -08:00
Kartikaya Gupta 7d2382b3c3 Merge m-c to graphics
MozReview-Commit-ID: 74RpKOFNVx4
2017-01-05 09:28:19 -05:00
Kartikaya Gupta 53a1603866 Revert tree back to commit 8a362f5c65fb. r=fix-messy-tree
MozReview-Commit-ID: 8ewcbgQsay9
2016-12-22 10:38:58 -05:00
JerryShih b1e2dfd641 Bug 1321144 - add WebRender TextureHost related classes. r=sotaro?
Add TextureSourceWebRenderOGL for WR GL composition.
Use BindTextureSource/UnbindTextureSource() to provide the TextureSource for WR external image rendering. Currently,only ImageHost supports these functions.

MozReview-Commit-ID: d5EvPUmlpq
2016-12-22 17:22:37 +08:00
David Anderson 944e8cc055 Use async compositable IDs for image composite notifications. (bug 1325784 part 4, r=nical) 2017-01-04 10:19:30 -05:00
David Anderson e8efc823bc Move CompositableMap into ImageBridge. (bug 1325784 part 2, r=nical) 2017-01-04 10:19:29 -05:00
Kartikaya Gupta 694703aee5 Merge m-c to graphics
MozReview-Commit-ID: 4IBPvJvxXEM
2016-12-15 10:15:36 -05:00
sotaro a450a2754f Bug 1317935 - Use GetCompositeUntilTime() to trigger next composition r=nical? 2016-11-24 15:48:01 +09:00
Miko Mynttinen c0b2cd5b45 Bug 1274673 - Use binary space partitioning for sorting/drawing layers - Part 3: Use BSPTree for layer sorting r=jrmuizel,mattwoodrow
MozReview-Commit-ID: 3Hy4IRDFgaP

--HG--
extra : rebase_source : ec31672ba66a81537cd21356466c8774023edd60
2016-12-06 13:39:01 -10:00