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
We already snap the complex clip rects during scene building, taking
into account any necessary transforms and device pixel scaling. Just
like normal clips, we shouldn't round in layout space.
Differential Revision: https://phabricator.services.mozilla.com/D52673
--HG--
extra : moz-landing-system : lando
On Windows, save the Ctrl-Shift-3 capture to the user's local app data
to make sure we have write permissions.
Verified with ./mach run + capture => saved to C:\Users\...\AppData\Local\wr-capture
Differential Revision: https://phabricator.services.mozilla.com/D53208
--HG--
extra : moz-landing-system : lando
These settings are now supplied during layer creation and never change.
Consumers must now create new NativeLayer objects if they want to change size or toggle opaqueness.
This aligns the NativeLayer API with DirectComposition's capabilities. It also simplifies swap chain
management.
Differential Revision: https://phabricator.services.mozilla.com/D51757
--HG--
extra : moz-landing-system : lando
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
These settings are now supplied during layer creation and never change.
Consumers must now create new NativeLayer objects if they want to change size or toggle opaqueness.
This aligns the NativeLayer API with DirectComposition's capabilities. It also simplifies swap chain
management.
Differential Revision: https://phabricator.services.mozilla.com/D51757
--HG--
extra : moz-landing-system : lando
Removes NofityForUse() functions for simplicity.
Ensure that RenderTextureHost::PrepareForUse() is called before RenderTextureHost:: Lock(). When a task of calling RenderTextureHost::PrepareForUse() is simply posted to render thread, there is a case that RenderTextureHost:: Lock() is called before PrepareForUse() .
Differential Revision: https://phabricator.services.mozilla.com/D51974
--HG--
extra : moz-landing-system : lando
`windowUtils.setCompositionRecording()` now returns a promise that is resolved
when the composition recorder is enabled (if given `true`) or when frames are
written to disk (if given `false`). To accomplish this, the
`WebRenderCompositionRecorder` now returns a `MozPromise` when writing frames
to disk begins that is resolved when that process finishes.
Differential Revision: https://phabricator.services.mozilla.com/D47300
--HG--
extra : moz-landing-system : lando
`windowUtils.setCompositionRecording()` now returns a promise that is resolved
when the composition recorder is enabled (if given `true`) or when frames are
written to disk (if given `false`). To accomplish this, the
`WebRenderCompositionRecorder` now returns a `MozPromise` when writing frames
to disk begins that is resolved when that process finishes.
Differential Revision: https://phabricator.services.mozilla.com/D47300
--HG--
extra : moz-landing-system : lando
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
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
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
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
This implementation is off by default (behind gfx.webrender.compositor) until
various bugs and inefficiencies are fixed. See bug 1592016.
Differential Revision: https://phabricator.services.mozilla.com/D50726
--HG--
extra : moz-landing-system : lando
This implementation is off by default (behind gfx.webrender.compositor) until
various bugs and inefficiencies are fixed. See bug 1592016.
Differential Revision: https://phabricator.services.mozilla.com/D50726
--HG--
extra : moz-landing-system : lando
This change makes opaqueness a boolean per layer again. The opaque region is
currently only used by the temporary WebRender code; the future WebRender code
won't use it. Removing this support simplifies the code and makes it easier to
implement clipping.
Differential Revision: https://phabricator.services.mozilla.com/D50722
--HG--
extra : moz-landing-system : lando
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
This passes the existing dirty rect for a picture cache update
through the native compositor interface, allowing compositors
to only update a sub-rect of a tile.
Also update the example to pass dirty rect to DirectComposition,
and add debug drawing for compositor redraw region.
Differential Revision: https://phabricator.services.mozilla.com/D50767
--HG--
extra : moz-landing-system : lando
Platform differences between DirectComposition and CoreAnimation
mean that WR needs to bind the FBO ID that the underlying platform
returns as part of the surface binding operation.
Differential Revision: https://phabricator.services.mozilla.com/D50760
--HG--
extra : moz-landing-system : lando
This patch is a small refactor of the public and internal structures
for options related to partial present and native compositing. It
doesn't contain any functional changes.
It adds a field to the native compositing setup to allow clients to
express whether dirty rect updates are supported when native compositing
is enabled (not currently used but will be enabled soon).
It also removes the partial present config options, and makes them
part of the default / draw compositing mode.
Differential Revision: https://phabricator.services.mozilla.com/D50521
--HG--
extra : moz-landing-system : lando
EGL_ANGLE_experimental_present_path was enabled for fast rendering to SwapChain by ANGLE. But current gecko does not request ANGLE to render to SwapChain for WebRender. Then we do not need to use EGL_ANGLE_experimental_present_path anymore. But Its usage still has a side effect that y is flipped. But OS compositor implementation on Windows does not want it. And it seems not good to continue to use EGL_ANGLE_experimental_present_path since it is experimental feature.
But when EGL_ANGLE_experimental_present_path is removed, rendering result of frame buffer is y flipped with ANGLE compared to other OpenGL implementation. It needs to be handled in WR. It is similar to chromium.
Differential Revision: https://phabricator.services.mozilla.com/D50604
--HG--
extra : moz-landing-system : lando
This patch was largely written by Sotaro.
This patch also adds an off-by-default pref gfx.webrender.compositor that currently does nothing.
Differential Revision: https://phabricator.services.mozilla.com/D50721
--HG--
extra : moz-landing-system : lando