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

91 Коммитов

Автор SHA1 Сообщение Дата
Glenn Watson 8efc792cc9 Bug 1620147 - Fix virtual surface coords being outside bounds. r=Bert,sotaro
This adds support for tracking and invalidating tiles based on a
movable virtual offset.

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

--HG--
extra : moz-landing-system : lando
2020-03-10 02:17:35 +00:00
Emilio Cobos Álvarez 5b006d907b Bug 1616395 - Unbust windows build in a CLOSED TREE.
MANUAL PUSH: minor bustage fix.
2020-02-19 20:36:27 +01:00
Emilio Cobos Álvarez d18caaa054 Bug 1616395 - Remove FfiVec. r=jrmuizel
Use ThinVec instead, which is compatible with nsTArray, and makes stuff much
harder to misuse.

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

--HG--
extra : moz-landing-system : lando
2020-02-19 18:34:51 +00:00
sotaro fd1ef47bde Bug 1615946 - Log error when RenderCompositorANGLE::MaybeReadback() takes long time r=nical
Differential Revision: https://phabricator.services.mozilla.com/D63039

--HG--
extra : moz-landing-system : lando
2020-02-17 14:39:31 +00:00
Glenn Watson 31585fc1e6 Bug 1608717 - Support per-tile clip (valid) region for native compositor implementations. r=sotaro,mstange
For Draw (non-native) and CA modes, we include the per-tile
valid rect in the clip rect from the surface.

For DC (non-virtual) mode, a per-tile clip rect is set on the
visual for each tile, separate from the overall clip rect that
is set on the surface visual.

For DC (virtual) mode, the Trim API is used to remove pixels
in the virtual tile area that are outside the valid / clipped
region.

Note: Although the valid rect is now applied in the native
compositors, it's currently only based on the overall picture
cache bounding rect. Thus, with this patch there isn't any
noticeable performance improvement. Once this lands and is
working correctly, the follow up patch to calculate a smaller
valid region per-tile is a small amount of work.

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

--HG--
extra : moz-landing-system : lando
2020-02-12 04:27:15 +00:00
Jeff Muizelaar 3dd8739d15 Bug 1613485. Add a new COMPOSITE_SWAP_TIME metric. r=aosmond
This should help us narrow down the regression in COMPOSITE_TIME

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

--HG--
extra : moz-landing-system : lando
2020-02-06 19:49:25 +00:00
sotaro aa001195aa Bug 1612665 - Backout Bug 1596630 r=nical
SyncObjectD3D11Host::Synchronize() calling in RenderCompositorANGLE::BeginFrame() is still necessary for D3D11DXVA2Manager::CopyToImage(). Then backout Bug 1596630.

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

--HG--
extra : moz-landing-system : lando
2020-02-05 09:39:28 +00:00
sotaro 56b30bd8c4 Bug 1602643 - Disable WebRender compositor dinamically for async screenshot r=gw
Differential Revision: https://phabricator.services.mozilla.com/D59658

--HG--
extra : moz-landing-system : lando
2020-01-23 23:52:05 +00:00
Mihai Alexandru Michis d8a8849254 Backed out changeset f3b490c076d6 (bug 1602643) for causing bustages regarding CompositorKindChanged
CLOSED TREE
2020-01-23 16:27:33 +02:00
sotaro 7afb826ef9 Bug 1602643 - Disable WebRender compositor dinamically for async screenshot r=gw
Differential Revision: https://phabricator.services.mozilla.com/D59658

--HG--
extra : moz-landing-system : lando
2020-01-23 04:37:28 +00:00
sotaro 9226c571f4 Bug 1605963 - Do not create SwapChain when OS compositor is used on Windows r=gw
Differential Revision: https://phabricator.services.mozilla.com/D58232

--HG--
extra : moz-landing-system : lando
2020-01-05 19:10:12 +00:00
Glenn Watson 3aa1137e6f Bug 1604684 - Make opacity a compositor surface property rather than a tile property. r=sotaro
This will allow use of the DirectComposition virtual surface API. If
it turns out that some pages recreate surfaces a lot due to opacity
changing, we can add some extra logic to avoid recreating surfaces
as often, and making use of per-tile opacity in some cases.

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

--HG--
extra : moz-landing-system : lando
2020-01-06 20:11:21 +00:00
Glenn Watson 3aeeba2db2 Bug 1604383 - Refactor the Compositor trait to allow support for DC virtual surface API. r=mstange,sotaro
Differential Revision: https://phabricator.services.mozilla.com/D57415

--HG--
extra : moz-landing-system : lando
2019-12-17 21:44:03 +00:00
sotaro a5ce70d85a Bug 1604380 - Disable partial present when picture caching is disabled r=gw
Partial present does not work when WR picture caching is disabled.

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

--HG--
extra : moz-landing-system : lando
2019-12-17 05:05:30 +00:00
sotaro c61720a7d0 Bug 1603676 - Move picture caching check for WR compositor to Feature::WEBRENDER_COMPOSITOR check r=gw
about:support could have an information that WR compositor is disabled by disabling picture caching.

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

--HG--
extra : moz-landing-system : lando
2019-12-16 03:50:31 +00:00
Glenn Watson 2a3fc4613c Bug 1603207 - Only enable native compositor if picture caching enabled. r=sotaro
Differential Revision: https://phabricator.services.mozilla.com/D56817

--HG--
extra : moz-landing-system : lando
2019-12-12 00:08:38 +00:00
sotaro 111038667c Bug 1602511 - Blacklist webrender compositor on Intel HD 520 r=gw
Differential Revision: https://phabricator.services.mozilla.com/D56535

--HG--
extra : moz-landing-system : lando
2019-12-10 19:16:13 +00:00
sotaro 6c36181d45 Bug 1601862 - Suppress false alarm log r=nical
Differential Revision: https://phabricator.services.mozilla.com/D56150

--HG--
extra : moz-landing-system : lando
2019-12-10 01:10:23 +00:00
Csoregi Natalia e216498233 Backed out changeset 519be451c283 (bug 1601862) for bustage on RenderCompositorANGLE.cpp. CLOSED TREE 2019-12-09 03:43:33 +02:00
sotaro 2213a5357e Bug 1601862 - Suppress false alarm log r=nical
Differential Revision: https://phabricator.services.mozilla.com/D56150

--HG--
extra : moz-landing-system : lando
2019-12-06 13:04:44 +00:00
sotaro d5a300b92b Bug 1599887 - Update frame is when WR rendering is skipped r=nical
wr::WebRenderPipelineInfo needs to be handled even when WR rendering does not happen.

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

--HG--
extra : moz-landing-system : lando
2019-12-06 13:06:21 +00:00
sotaro 9171fb9fcf Bug 1600533 - Rename WaitForPreviousPresentQuery() r=gw
Differential Revision: https://phabricator.services.mozilla.com/D55403

--HG--
extra : moz-landing-system : lando
2019-12-02 10:41:57 +00:00
sotaro 00f9b4efee Bug 1585619 - Add option of using PrintWindow() for taking snapshot of DirectComposition r=gw
Differential Revision: https://phabricator.services.mozilla.com/D47894

--HG--
extra : moz-landing-system : lando
2019-11-30 03:14:58 +00:00
sotaro 6c701a41a3 Bug 1596630 - Remove mSyncObject->Synchronize() in RenderCompositorANGLE::BeginFrame() r=nical
mSyncObject->Synchronize() was necessary to handle a case that D3D Texture was created on main thread of content process and the Texture does not have a keyed mutex. But with WebRender, the situation does not happen often. Further the Synchronize() is sometimes very slow. Therefore it is better to remove it from RenderCompositorANGLE::BeginFrame().

Canvas 2d does not use keyed mutex yet. Then the change adds keyed mutex usage for the canvas 2d.

D3D11DXVA2Manager still uses the Synchronize(). In this case, the Synchronize() is manually called in D3D11DXVA2Manager::CopyToImage(). Then RenderCompositorANGLE still needs to create SyncObjectHost.

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

--HG--
extra : moz-landing-system : lando
2019-11-18 09:49:15 +00:00
sotaro 22a4932c7e Bug 1595703 - Remove DXGI_USAGE_SHADER_INPUT usage r=gw
DXGI_USAGE_SHADER_INPUT is not necessary with current WebRender.

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

--HG--
extra : moz-landing-system : lando
2019-11-12 19:15:39 +00:00
sotaro e3f85dc709 Bug 1595027 - Disable partial present when SwapChain uses alpha r=nical
During high contrast mode, alpha is used by SwapChain. In this case, IDXGISwapChain1::Present1() shows nothing with compositor window. To address the problem, we disable the Present1() usage when alpha is used.

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

--HG--
extra : moz-landing-system : lando
2019-11-12 22:13:41 +00:00
sotaro 127c0ad209 Bug 1592510 - Make partial updates with WebRender OS compositor work on Windows r=gw
Differential Revision: https://phabricator.services.mozilla.com/D51984

--HG--
extra : moz-landing-system : lando
2019-11-07 00:57:23 +00:00
sotaro b9dc0622aa Bug 1593383 - Force full rendering to external target r=nical,gw
LayerManagerComposite and LayerManagerMLGPU do full rendering for taking a snapshot. Then WR also does  full rendering for taking a snapshot.

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

--HG--
extra : moz-landing-system : lando
2019-11-05 09:06:59 +00:00
Bob Owen 32869c5f76 Bug 1589718: Add a RenderedFrameId to RenderCompositor and use it to control release of textures. r=sotaro
This replaces mUpdatesCount in AsyncImagePipelineManager, which was really how
many times NotifyPipelinesUpdated was called with aRender == true. I think this
makes the release logic clearer as it is more explicit.
It also changes things for RenderCompositorANGLE, so that we check to see if
any other frames have completed even if we don't want to wait for them.

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

--HG--
extra : moz-landing-system : lando
2019-11-04 16:15:20 +00:00
sotaro 34a65d16bb Bug 1575159 - Implement partial invalidation on Windows r=gw
Partial present for WR is off by default.

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

--HG--
extra : moz-landing-system : lando
2019-11-03 10:57:03 +00:00
sotaro 253cc9eb1e Bug 1573710 - Trigger composite after SetParent() r=Gankro
The patch permits to resize compositor window's size after ::SetParent() call to prevent a conflict between ::SetParent() and ::SetWindowPos(). Then it triggers a composite after SetParent() call to resize compositor window correctly.

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

--HG--
extra : moz-landing-system : lando
2019-11-01 11:01:34 +00:00
sotaro 4404c0826a Bug 1591004 - First pass of OS compositor implementation on Windows r=gw
This implementation is off by default (behind gfx.webrender.compositor) until various bugs and inefficiencies are fixed.

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

--HG--
extra : moz-landing-system : lando
2019-10-31 11:59:17 +00:00
Markus Stange f2c9430255 Bug 1591523 - Move existing NativeLayer management into RenderCompositorOGL. r=sotaro
Differential Revision: https://phabricator.services.mozilla.com/D50724

--HG--
extra : moz-landing-system : lando
2019-10-29 20:50:33 +00:00
Bogdan Tara f866fef3ad Backed out 3 changesets (bug 1591523) for bustages complaining about RenderCompositorOGL.cpp CLOSED TREE
Backed out changeset 407f051e14db (bug 1591523)
Backed out changeset b4c8080dae86 (bug 1591523)
Backed out changeset abb627bc4f75 (bug 1591523)
2019-10-29 22:00:05 +02:00
Markus Stange 4631463725 Bug 1591523 - Move existing NativeLayer management into RenderCompositorOGL. r=sotaro
Differential Revision: https://phabricator.services.mozilla.com/D50724

--HG--
extra : moz-landing-system : lando
2019-10-29 19:25:29 +00:00
Narcis Beleuzu a64dcc0c07 Backed out changeset 7a4cf3982659 (bug 1573710) for mda failures on test_getUserMedia_basicScreenshare. CLOSED TREE 2019-10-29 11:28:09 +02:00
sotaro 16784c5201 Bug 1573710 - Trigger composite after SetParent() r=Gankro
The patch permits to resize compositor window's size after ::SetParent() call to prevent a conflict between ::SetParent() and ::SetWindowPos(). Then it triggers a composite after SetParent() call to resize compositor window correctly.

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

--HG--
extra : moz-landing-system : lando
2019-10-28 21:33:40 +00:00
sotaro 61f09c1667 Bug 1588019 - Add option of enabling highlighting redraw regions of DCompositionVisual r=nical
Differential Revision: https://phabricator.services.mozilla.com/D48937

--HG--
extra : moz-landing-system : lando
2019-10-14 12:55:01 +00:00
sotaro 2df9cdb3b4 Bug 1587695 - Fix redundant SwapChain re-creation r=nical
Since Bug 1570879, SwapChain is created with alpha at first, then the SwapChain is typically re-created at first RenderCompositorANGLE::BeginFrame() calle, since non Glass window is common since Windows 10. The re-creation is redundant.

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

--HG--
extra : moz-landing-system : lando
2019-10-10 08:58:00 +00:00
sotaro fb4696fe6d Bug 1570879 - Fix high contrast theme handling with DirectComposition and WebRender r=nical
When high contrast mode is enabled, title bar is drawn as transparent and on-client area rendering by DWM is shown. But when compositor window in GPU process is used, the on-client area rendering was not shown. To address the proboem, window needs to be cleard as transparent and SwapChain of compositor window needs to be DXGI_ALPHA_MODE_PREMULTIPLIED.

WinCompositorWidget::mTransparencyMode is changed to atomic, since it is accessed from compositor thread and render thread.

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

--HG--
extra : moz-landing-system : lando
2019-10-08 10:07:47 +00:00
thomasmo ab2f648351 Bug 1581855:Part 2 - Present VR output to VR Host r=kip,jrmuizel,sotaro,bryce
This change is a continuation of Part 1 (Bug 1570128), where the 2D content rendered by Firefox for Firefox Reality on Desktop is marshalled through VRHost so that it can be presented in a VR environment.
A new class, FxrOutputHandler, is created to manage creating a sharable texture, sharing it through VRShMem, and updating it when content updates. This class updates content with both WebRender and conventional rendering output.
This initial iteration of FxrOutputHandler does not have synchronization between reading and writing this shared texture across processes. A subsequent fix (Bug 1581881) is pending, which will reuse WebVR code to manage writing to and reading from a pool of textures.
This also presents issues with rendering protected media, so an additional class, FxrWindowManager, is created to manage all windows created for Firefox Reality on Desktop so that it can inform whether or not protected media can be presented.
The automated manual tests in vrhosttest.cpp now show the real shared texture handle rather than a fake value, which shows that marshaling succeeded.

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

--HG--
extra : moz-landing-system : lando
2019-09-26 12:50:44 +00:00
Ciure Andrei f4b3bef121 Backed out changeset 70f93c9956fc (bug 1581855) for Windows MinGW build bustages CLOSED TREE 2019-09-26 06:42:46 +03:00
thomasmo f054c8db61 Bug 1581855:Part 2 - Present VR output to VR Host r=kip,jrmuizel,sotaro,bryce
This change is a continuation of Part 1 (Bug 1570128), where the 2D content rendered by Firefox for Firefox Reality on Desktop is marshalled through VRHost so that it can be presented in a VR environment.
A new class, FxrOutputHandler, is created to manage creating a sharable texture, sharing it through VRShMem, and updating it when content updates. This class updates content with both WebRender and conventional rendering output.
This initial iteration of FxrOutputHandler does not have synchronization between reading and writing this shared texture across processes. A subsequent fix (Bug 1581881) is pending, which will reuse WebVR code to manage writing to and reading from a pool of textures.
This also presents issues with rendering protected media, so an additional class, FxrWindowManager, is created to manage all windows created for Firefox Reality on Desktop so that it can inform whether or not protected media can be presented.
The automated manual tests in vrhosttest.cpp now show the real shared texture handle rather than a fake value, which shows that marshaling succeeded.

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

--HG--
extra : moz-landing-system : lando
2019-09-26 01:18:58 +00:00
sotaro 5182120673 Bug 1582371 - Add DCLayerTree class r=nical
Preparation work for adding DirectComposition support. It does not add a new functionality.

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

--HG--
extra : moz-landing-system : lando
2019-09-19 18:15:11 +00:00
sotaro 1b54393769 Bug 1582011 - Reduce IDCompositionDevice::Commit calls r=nical
IDCompositionDevice::Commit needs to be called when there is an update to DirectComposition. RenderCompositorANGLE updates DirectComposition only during initialization. Then it is not necessary to call the function in EndFrame().

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

--HG--
extra : moz-landing-system : lando
2019-09-18 08:00:44 +00:00
sotaro 45201fa9a1 Bug 1578605 - Remove workaround of Bug 1569881 r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D44592

--HG--
extra : moz-landing-system : lando
2019-09-04 02:40:27 +00:00
sotaro 6ad6dcbc80 Bug 1576087 - Split EGLSurface creation from RenderCompositorANGLE::ResizeBufferIfNeeded() r=nical
Differential Revision: https://phabricator.services.mozilla.com/D43212

--HG--
extra : moz-landing-system : lando
2019-09-03 12:36:09 +00:00
Markus Stange e0e54098e9 Bug 1574592 - Move NativeLayer management out of nsChildView and into LayerManagerComposite and RendererOGL. r=mattwoodrow
It looks like a big patch but it's mostly just moved code, with some duplication:
 - Layer creation and destruction moves to LayerManagerComposite and RendererOGL.
 - BasicCompositor IOSurface setup code moves to BasicCompositor.cpp.
 - OpenGL IOSurface setup code moves to CompositorOGL and RenderCompositorOGL.

The duplication is a bit unfortunate but the LayerManagerComposite code will
diverge from the WebRender code soon.

BeginFrame gets a new argument aNativeLayer. This argument will go away again
over the course of this patch queue. But for now, BeginFrame is the best place
to do the layer setup because it's a very close place to PreRender which is
where that code was previously.

I wasn't able to think of a nice way to give CompositorOGL and BasicCompositor
platform-specific behavior without #ifdefs. So now LayerManagerComposite uses
the "cross-platform" NativeLayer interface, but CompositorOGL and
BasicCompositor use NativeLayerCA because they actually need the IOSurface, and
they do that in #ifdef'd code.
Luckily, NativeLayerCA.h can be included in both .cpp files and in .mm files.

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

--HG--
extra : moz-landing-system : lando
2019-08-25 17:43:42 +00:00
sotaro 8ea107367c Bug 1569881 - Short term workaround for Intel GPU r=jrmuizel
When Windows version is mort than 1903 and GPU is intel GPU, it could cause flickering with DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL. See Bug 1556634. As a short term workaround, use DXGI_ALPHA_MODE_PREMULTIPLIED instead of DXGI_ALPHA_MODE_IGNORE at SwapChain.

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

--HG--
extra : moz-landing-system : lando
2019-08-13 22:17:47 +00:00
sotaro 8f7c96a032 Bug 1567347 - Add option of using DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL without DirectComposition r=nical
Differential Revision: https://phabricator.services.mozilla.com/D38588

--HG--
extra : moz-landing-system : lando
2019-07-19 09:26:03 +00:00