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

2316 Коммитов

Автор SHA1 Сообщение Дата
sotaro 128b5a46c5 Bug 1683248 - Stop to pass WebRenderShaders to software WebRender r=nical
Differential Revision: https://phabricator.services.mozilla.com/D100080
2020-12-18 22:38:56 +00:00
sotaro 3d7b9d1062 Bug 1683247 - Stop to create shared GL and WebRenderShaders in RenderDXGITextureHost::GetD3D11Texture2D() r=nical
sw-wr does not need shared GL and WebRenderShaders.

Differential Revision: https://phabricator.services.mozilla.com/D100081
2020-12-18 22:38:22 +00:00
Glenn Watson 422112d55d Bug 1683242 - Make external_scroll_id required when defining scroll frames. r=nical,aosmond
It's always supplied by Gecko anyway, and being able to rely on this
will make it easier to create stable spatial node IDs that persist
across display lists.

Differential Revision: https://phabricator.services.mozilla.com/D100076
2020-12-18 16:02:55 +00:00
Nicolas Silva 316d3394f3 Bug 1624264 - Use different texture cache sizes for popup windows. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D99771
2020-12-18 09:27:19 +00:00
Andrew Osmond 627b3749af Bug 1682876 - Better handle Linux NVIDIA device resets, and unflushed device resets. r=sotaro,jgilbert
These NVIDIA device resets are specific to Linux and trying to handle
them more gracefully is increasingly difficult. There are many
textures/buffers that we need to clear inside WebRender, but attempting
to add them to the list has proved difficult due to the number of places
we need to add, as well as race conditions with clearing them. Given
this shouldn't happen often, it doesn't seem worth optimizing for and we
should treat it just as an innocent device reset.

Testing this revealed an issue during recovery where unflushed device
resets were not handled as expected. When we checked for errors after
creating a new GL context, we would encounter a GL_CONTEXT_LOST error
which we failed to recover from. This is because we called
GLContext::fGetError instead of the GL method directly; the context lost
state was saved in mContextLost, and any subsequent calls to
GLContext::fGetError would continue to return GL_CONTEXT_LOST.

Differential Revision: https://phabricator.services.mozilla.com/D99905
2020-12-18 12:52:00 +00:00
sotaro 148fe8e9fc Bug 1682735 - Add error log to DCLayerTree::CreateSurface() r=nical
Add a log for understanding Bug 1681756.

Differential Revision: https://phabricator.services.mozilla.com/D99860
2020-12-16 12:05:01 +00:00
Lee Salzman 656be1724e Bug 1676862 - ensure wr_notifier_wake_up passes through UpdateAndRender. r=mstange
wr_notifier_wake_up uses RenderThread::WakeUp, which in turn just directly
calls Renderer::Update. As a side-effect, this can queue a composite to the
main framebuffer deep inside the renderer, but without having gone through
the normal pathway of Renderer::UpdateAndRender. UpdateAndRender ensures
that any RenderCompositor is properly prepared for the frame by calling
BeginFrame and other hooks as appropriate. But since we went through just
Update instead, there is never any call to BeginFrame and the SWGL framebuffer
never gets a chance to be properly set up in the RenderCompositor. In such
cases that we actually need to composite to the framebuffer, it seems more
appropriate to call UpdateAndRender, which also supports a boolean indicating
whether or not we actually intend to render something. To further simplify,
we just reuse the existing HandleFrameOneDoc handler to avoid needing separate
entry-points into UpdateAndRender.

Differential Revision: https://phabricator.services.mozilla.com/D99733
2020-12-16 03:47:08 +00:00
Andrew Osmond 00670ed214 Bug 1682367 - Add crash report annotation for which WebRender shader is being compiled. r=jrmuizel,chutten
This patch adds infrastructure for crash reporter annotations to
WebRender. This is used to expose the new annotation,
GraphicsCompileShader, to indicate which shader we are in the process of
compiling. We often see crash reports when compiling shaders, and it
would be useful to know which one it is compiling.

This also adds another annotation, IsWebRenderResourcePathOverridden,
which is useful to know if someone overrode the shader resource path for
testing purposes. We can likely ignore any crash reports that have this
annotation set.

Differential Revision: https://phabricator.services.mozilla.com/D99736
2020-12-15 16:24:04 +00:00
Jeff Muizelaar 109e9c3b20 Bug 1679578. Memory report RenderTextureHosts in mRenderTextures. r=mattwoodrow
There might be some overlap with memory counted elsewhere and some of
the size calculations could be wrong but it should give us an overall
picture.

Differential Revision: https://phabricator.services.mozilla.com/D99562
2020-12-15 15:37:11 +00:00
Lee Salzman 822746ce14 Bug 1676862 - add some debug asserts to discern if/why SWGL LockFramebuffer fails. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D99724
2020-12-14 22:39:37 +00:00
sotaro 9cba7102e4 Bug 1681869 - Add screenshots and frame recording support to RenderCompositorD3D11SWGL r=mstange
Implementation mimics RenderCompositorNative and uses Compositor screenshot handling.

Differential Revision: https://phabricator.services.mozilla.com/D99418
2020-12-11 21:41:45 +00:00
Nika Layzell 6d17703514 Bug 1678463 - Part 1: Add _WITH_DELETE_ON_EVENT_TARGET macros to nsISupportsImpl, r=mccr8
This also migrates all existing users of _WITH_MAIN_THREAD_DESTRUCTION to the
new macro in nsISupportsImpl.

Differential Revision: https://phabricator.services.mozilla.com/D97825
2020-12-14 18:30:51 +00:00
Jamie Nicol 679d0b1173 Bug 1682230 - Don't call eglSetDamageRegion if buffer age is disabled. r=aosmond
If gfx.webrender.allow-partial-present-buffer-age is false then we do
not query the egl buffer age, and always render the entire
backbuffer. However, we were still calling eglSetDamageRegion if
KHR_partial_present is available. Calling eglSetDamageRegion without
first querying the buffer age is an error, which was causing an
assertion failure in debug builds. To fix this, check the value of the
pref before calling eglSetDamageRegion.

Differential Revision: https://phabricator.services.mozilla.com/D99659
2020-12-14 11:40:53 +00:00
Andrew Osmond c5e26aebfa Bug 1681671 - Ensure we clear cached DMABuf textures during an NVIDIA video memory device reset. r=sotaro
Differential Revision: https://phabricator.services.mozilla.com/D99597
2020-12-14 00:26:18 +00:00
Andrew Osmond e73a5b9a7c Bug 1681563 - Record WebRender device resets in telemetry and crash reports on non-Windows. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D99346
2020-12-10 14:26:32 +00:00
Markus Stange 84b150a119 Bug 1677929 - Stop passing aEpochsBeingRendered to WebRender's APZ sampling callback, because it's now unused. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D99144
2020-12-09 03:38:31 +00:00
Markus Stange 7b0ccf01a3 Bug 1677929 - Add a way to specify an ID for a generated frame, and propagate the ID to the APZSampler. r=gw,kats
This ID allows the compositor to track per-frame information from frame
generation, through APZ sampling, to the NotifyDidRender notification.

Differential Revision: https://phabricator.services.mozilla.com/D97535
2020-12-09 03:35:50 +00:00
Markus Stange 213d8def5d Bug 1677929 - Extract the 'root' parts of NotifyPipelineRendered into a new method called NotifyDidRender. r=mattwoodrow
This reduces some code duplication, and makes it clear which things we want to
do only once per window, and which things we want to do once per pipeline / CompositorBridge.

This change affects the ordering of messages, but hopefully not in a way that
anybody was relying on. Specifically, the image notifications are now sent before
the NotifyDidPaint for the root CompositorBridge is sent.

Differential Revision: https://phabricator.services.mozilla.com/D97533
2020-12-08 22:21:37 +00:00
Andrew Osmond 45b5262f91 Bug 1632698 - Better handle device resets when we don't have a GPU process. r=sotaro,kvark,nical
Aside from on Windows, we do not appear to handle device resets properly
without the GPU process. This patch adds in the necessary plumbing to
handle the device reset properly. It also ensures that whenever we check
for a device reset reason, we handle all of the reasons (e.g. not just
the NV video memory purge reset reason) to ensure they are not lost, and
handles them all consistently in the same manner.

It also tracks the number of device resets for thresholding purposes
with an in process compositor. While it will only disable WebRender on
Linux at this time, it will put a note in the critical log if the
threshold was exceeded on all platforms. This may prove useful in
evaluating whether or not we should do the same everywhere.

Differential Revision: https://phabricator.services.mozilla.com/D98705
2020-12-07 20:36:11 +00:00
Xidorn Quan 8799a09b16 Bug 1661961 - Upgrade cstr to 0.2.x. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D98839
2020-12-07 08:01:04 +00:00
Glenn Watson 2ce239352c Bug 1679939 - Remove experimental PLS functionality. r=jnicol,nical
The pixel-local-storage functionality was an experiment for faster
drawing of clip masks on low end tiled GPUs. However, it's never
reached a point where it was shippable and showing clear performance
wins.

This patch removes the experimental PLS support - we can always
revive it from git history if we ever want to consider it again.

Differential Revision: https://phabricator.services.mozilla.com/D98290
2020-12-01 19:28:19 +00:00
Sylvestre Ledru 3412ec2dcb Bug 1617369 - Reformat recent rust changes with rustfmt r=emilio DONTBUILD
# ignore-this-changeset

Depends on D98301

Differential Revision: https://phabricator.services.mozilla.com/D98302
2020-12-01 13:51:20 +00:00
Simon Giesecke 971b645fe3 Bug 1660470 - Add missing include directives/forward declarations. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D87865
2020-11-23 16:21:38 +00:00
Simon Giesecke d1c992db5d Bug 1677284 - Remove unused includes of Variant.h. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D97076
2020-11-23 15:49:20 +00:00
Matt Woodrow 67114e4901 Bug 1678493 - Use the clipped dest area when computing bands so that they're evenly spread across the pixels actually drawn. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D97708
2020-11-20 07:00:38 +00:00
Matt Woodrow c913d6b79e Bug 1678493 - Pass the SwCompositor clip rect into the inner Composite code rather than intersecting if beforehand. r=lsalzman
The composite code uses the size of the dest rect to determine scaling, and we don't want this to be affected by the clip.

Differential Revision: https://phabricator.services.mozilla.com/D97707
2020-11-20 07:24:20 +00:00
Matt Woodrow 6f60512d7c Bug 1678493 - Don't support having both a native gl context and a native compositor in SwCompositor. r=lsalzman
This combination is never used, and adds complexity to support.

Differential Revision: https://phabricator.services.mozilla.com/D97706
2020-11-20 07:25:24 +00:00
Matt Woodrow 75ddcbd75d Bug 1678493 - Intersect the dirty rect with the compositor surface clip rect in SwCompositor. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D97705
2020-11-20 07:25:31 +00:00
Gerald Squelart b3314a1582 Bug 1675409 - Removed now-unused ProfilerMarkerPayload and all dependencies - r=gregtatum,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D96054
2020-11-18 21:56:57 +00:00
Razvan Maries b7eeb731df Backed out 23 changesets (bug 1675409) for build bustages on Preferences.cpp. CLOSED TREE
Backed out changeset c1a131a55767 (bug 1675409)
Backed out changeset 47d210802a5d (bug 1675409)
Backed out changeset e8ebb1c58d30 (bug 1675409)
Backed out changeset 69a1e9aeff2a (bug 1675409)
Backed out changeset 68f330b387a8 (bug 1675409)
Backed out changeset e4750d9ef5a1 (bug 1675409)
Backed out changeset bb6bb71e5ab3 (bug 1675409)
Backed out changeset 988d7f4716df (bug 1675409)
Backed out changeset ca41382e891c (bug 1675409)
Backed out changeset 90f3fbbbbeda (bug 1675409)
Backed out changeset 9b109d61a6f6 (bug 1675409)
Backed out changeset 3dd66abfdaa2 (bug 1675409)
Backed out changeset 44181df5f0db (bug 1675409)
Backed out changeset bb2603d947fc (bug 1675409)
Backed out changeset 97055cf20a56 (bug 1675409)
Backed out changeset f88fcf09de0d (bug 1675409)
Backed out changeset 7963e1c49786 (bug 1675409)
Backed out changeset 4c379c1061c3 (bug 1675409)
Backed out changeset b8be8ae7da63 (bug 1675409)
Backed out changeset 0b90aa89421e (bug 1675409)
Backed out changeset c10fb46467c9 (bug 1675409)
Backed out changeset 894ac233b290 (bug 1675409)
Backed out changeset 075d1d8e34c2 (bug 1675409)
2020-11-18 20:06:28 +02:00
Lee Salzman ebb7f57ce7 Bug 1677514 - cache current SwCompositeGraphNode with AtomicPtr to avoid locking mutex for every band. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D97361
2020-11-18 04:51:50 +00:00
Gerald Squelart ced008cc9f Bug 1675409 - Removed now-unused ProfilerMarkerPayload and all dependencies - r=gregtatum,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D96054
2020-11-17 22:26:20 +00:00
Glenn Watson 3170eddbd0 Bug 1675414 - Fix incorrect skipping of composites in some cases. r=nical
In the following circumstances, WR was failing to detect a
composite was required:
 - There is a picture cache slice that is smaller than a single tile.
 - The position of that picture cache slice is changed.
 - No other content invalidations occur.

This clip rect in the composite descriptor must include the
device_valid_rect rather than the tile device_rect. This ensures
that in the case of a picture cache slice that is smaller than a
single tile, the clip rect in the composite descriptor will change
if the position of that slice is changed. Otherwise, WR may conclude
that no composite is needed if the tile itself was not invalidated
due to changing content.

Differential Revision: https://phabricator.services.mozilla.com/D96966
2020-11-17 19:24:16 +00:00
Mihai Alexandru Michis c0d25b01b2 Backed out 24 changesets (bug 1666566, bug 1675409) for causing hazard failures in profiler/core/platform.cpp
CLOSED TREE

Backed out changeset 4d8af8533fd4 (bug 1666566)
Backed out changeset f031a3a8a20f (bug 1675409)
Backed out changeset 2b7e1a031921 (bug 1675409)
Backed out changeset bda5a24b2d0a (bug 1675409)
Backed out changeset 4282e2284314 (bug 1675409)
Backed out changeset 0637f1b26e9f (bug 1675409)
Backed out changeset 67ae04c8f607 (bug 1675409)
Backed out changeset 6c7b3f3618ef (bug 1675409)
Backed out changeset 2f325c22d169 (bug 1675409)
Backed out changeset 1e48ff70ad8f (bug 1675409)
Backed out changeset 1dfc32d6871d (bug 1675409)
Backed out changeset 4f1f218a777b (bug 1675409)
Backed out changeset e6ac8722b38e (bug 1675409)
Backed out changeset cf132e15fb57 (bug 1675409)
Backed out changeset a126e6b00ba9 (bug 1675409)
Backed out changeset fbc7fbb04f33 (bug 1675409)
Backed out changeset 554c69681474 (bug 1675409)
Backed out changeset 44d0521c701f (bug 1675409)
Backed out changeset 04653dfe4720 (bug 1675409)
Backed out changeset 41ca2c043a00 (bug 1675409)
Backed out changeset 264ae4c805d4 (bug 1675409)
Backed out changeset 5f3bbdac0d52 (bug 1675409)
Backed out changeset 11311c11a6e8 (bug 1675409)
Backed out changeset 0355fbc44baf (bug 1675409)
2020-11-17 19:31:28 +02:00
Gerald Squelart f8c24dd6a4 Bug 1675409 - Removed now-unused ProfilerMarkerPayload and all dependencies - r=gregtatum,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D96054
2020-11-17 11:40:46 +00:00
Sylvestre Ledru 0dee1b74e8 Bug 1676513 - Fix clippy warnings r=emilio,webdriver-reviewers,whimboo,rhunt
Depends on D96634

Differential Revision: https://phabricator.services.mozilla.com/D96636
2020-11-17 12:02:22 +00:00
Lee Salzman 8b495f9b45 Bug 1677514 - always wait for SwComposite jobs to become available when job count is non-zero. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D97243
2020-11-17 02:06:49 +00:00
Lee Salzman 6d68b3a282 Bug 1677514 - always signal that SwComposite jobs are available when they are sent. r=jrmuizel
Fix an unintentional bug where I had not originally anticipated the renderer
thread to be waiting on the jobs available condition, so had avoided trying to
signal the condition. Later revisions of the patch then made the thread wait on
the condition, so it is always necessary to signal from either thread sending
jobs to make sure either thread wakes up when necessary to process jobs.

Differential Revision: https://phabricator.services.mozilla.com/D97194
2020-11-16 18:56:58 +00:00
Lee Salzman 6bdcedb745 Bug 1677236 - don't require padding for SWGL FBO textures. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D97061
2020-11-16 16:43:23 +00:00
Andrew Osmond ca9f3b661d Bug 1677165 - Add support for partial present to GLX. r=kvark,jgilbert
This adds support for GLX_EXT_buffer_age if available to minimize how
much must be redrawn when using GLX.

Differential Revision: https://phabricator.services.mozilla.com/D93098
2020-11-13 18:41:41 +00:00
Matt Woodrow 7edd8e0527 Bug 1677211 - Add Read access flags to D3D11 staging textures to avoid slow accesses when reading our intermediate results. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D97106
2020-11-16 03:21:52 +00:00
Matt Woodrow c347392269 Bug 1676719 - Allow WebRender ANGLE in parent process for Nightly. r=jrmuizel
Depends on D96766

Differential Revision: https://phabricator.services.mozilla.com/D96768
2020-11-12 01:31:19 +00:00
Matt Woodrow d418438c0c Bug 1676719 - Only attempt a partial present when we have DXGI 1.2 available. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D96766
2020-11-12 01:30:10 +00:00
Matt Woodrow 35b11ac2f9 Bug 1676332 - Use D3D11 staging textures within RenderCompositorD3D11SWGL for faster uploads. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D96665
2020-11-12 01:21:41 +00:00
Lee Salzman 238f5569e7 Bug 1670328 - reduce stack size for SwComposite threads. r=mattwoodrow
There appears to be a substantial overhead for trying to wake cold threads
from a thread pool (especially with rayon), so for now let's leave the existing
thread spawning in place, but reduce the stack size for individual threads.
Since these threads only call into SWGL's composite routines and do little else,
there isn't much harm in having a small stack size.

Differential Revision: https://phabricator.services.mozilla.com/D96748
2020-11-11 20:24:38 +00:00
Lee Salzman 2443ca341f Bug 1670328 - use SwCompositeGraphNodeRef wrapper for cleaner node mutation. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D96732
2020-11-11 20:22:22 +00:00
Lee Salzman 0da6812d97 Bug 1670328 - remove crossbeam usage from SwCompositor. r=mattwoodrow
We seem to be spending a significant amount of time inside crossbeam channels
sending jobs across. Sending multiple bands for a given job tends to relock the
channel multiple times when ideally we only want to queue the job once, or lock
the channel once (neither of which we can conveniently do with crossbeam). To
alleviate this, I've implemented a more custom solution with a mutexed VecDeque
and some Condvars.

Differential Revision: https://phabricator.services.mozilla.com/D96520
2020-11-11 20:23:22 +00:00
smolnar 50215d649d Backed out 1 changesets (bug 1676332) for causing reftest failures. CLOSED TREE
Backed out changeset e767b7053baa (bug 1676332)
2020-11-11 10:27:34 +02:00
Matt Woodrow cf7e7e302d Bug 1676332 - Use D3D11 staging textures within RenderCompositorD3D11SWGL for faster uploads. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D96665
2020-11-11 03:54:36 +00:00
sotaro eff81341d5 Bug 1676550 - Add more overrides to RenderCompositorD3D11SWGL r=mattwoodrow
Some override functions do not have override.

Differential Revision: https://phabricator.services.mozilla.com/D96661
2020-11-11 02:02:24 +00:00
Matt Woodrow 912cfd9639 Bug 1674029 - Only commit the dirty rects in RenderCompositorSWGL. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D96495
2020-11-10 06:07:06 +00:00
Sylvestre Ledru 396275b3c3 Bug 1617369 - Reformat recent rust changes with rustfmt r=emilio
# ignore-this-changeset

Depends on D96608

Differential Revision: https://phabricator.services.mozilla.com/D96609
2020-11-10 19:10:16 +00:00
Matt Woodrow a289a86c53 Bug 1675665 - Don't draw surfaces if we're not currently presenting a frame. r=lsalzman
WR can run an update which outputs the compositor surfaces, but never calls Begin/EndFrame.

Differential Revision: https://phabricator.services.mozilla.com/D96380
2020-11-09 22:05:46 +00:00
Jamie Nicol e17f6c30ce Bug 1661528 - Update gleam to 0.13.1. r=kvark
Provides glBufferStorage and glFlushMappedBufferRange, and fixes
glClientWaitSync's return type.

Differential Revision: https://phabricator.services.mozilla.com/D96023
2020-11-07 00:30:09 +00:00
Matt Woodrow ec72f3a124 Bug 1673983 - Support using D3D11 textures as external compositor surfaces with D3D11 compositor. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D95800
2020-11-06 00:01:54 +00:00
Matt Woodrow 979882e86f Bug 1673983 - Add RenderTextureHostSWGL support to D3D11 RenderTextureHosts. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D95799
2020-11-06 00:01:36 +00:00
Matt Woodrow 603d0db408 Bug 1673983 - Add D3D11 RenderCompositor for SWGL. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D95797
2020-11-06 00:00:47 +00:00
Narcis Beleuzu 37bd723824 Backed out 4 changesets (bug 1673983) for linting failure on moz.build CLOSED TREE
Backed out changeset f408fc890ba1 (bug 1673983)
Backed out changeset 49ae9de85ab9 (bug 1673983)
Backed out changeset 91d8f0f829fd (bug 1673983)
Backed out changeset 91cb8ee8ddd8 (bug 1673983)
2020-11-06 00:10:34 +02:00
Matt Woodrow d3116d3c9e Bug 1673983 - Support using D3D11 textures as external compositor surfaces with D3D11 compositor. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D95800
2020-11-05 19:27:23 +00:00
Matt Woodrow 489a752d51 Bug 1673983 - Add RenderTextureHostSWGL support to D3D11 RenderTextureHosts. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D95799
2020-11-05 20:18:13 +00:00
Matt Woodrow 50873a9666 Bug 1673983 - Add D3D11 RenderCompositor for SWGL. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D95797
2020-11-05 19:26:21 +00:00
Glenn Watson 007ecb6d4f Bug 1675159 - Pt 2 - Expose dirty rects to start_compositing. r=sotaro
Move the calculation of the dirty rects array earlier in frame
drawing, and supply that to the `start_compositing` method of
the compositor trait.

For now, it's assumed that the native compositor wants a single
dirty rect, and doesn't use buffer-age functionality. These
params will be configurable as part of the compositor capabilities
struct in follow up patches.

Differential Revision: https://phabricator.services.mozilla.com/D95828
2020-11-05 20:01:36 +00:00
smolnar 625b8a74be Backed out 4 changesets (bug 1673983) for causing build bustages in RenderCompositorD3D11SWGL. CLOSED TREE
Backed out changeset 134e621d0902 (bug 1673983)
Backed out changeset 81601a02d9b7 (bug 1673983)
Backed out changeset 72d4bf5b093e (bug 1673983)
Backed out changeset 99b2e5c55a25 (bug 1673983)
2020-11-05 11:40:36 +02:00
Matt Woodrow f59d6ceb00 Bug 1673983 - Support using D3D11 textures as external compositor surfaces with D3D11 compositor. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D95800
2020-11-05 09:15:28 +00:00
Matt Woodrow b8c9f1b675 Bug 1673983 - Add RenderTextureHostSWGL support to D3D11 RenderTextureHosts. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D95799
2020-11-05 09:15:05 +00:00
Matt Woodrow f9fe60e315 Bug 1673983 - Add D3D11 RenderCompositor for SWGL. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D95797
2020-11-05 09:14:52 +00:00
Glenn Watson 38056c9366 Bug 1675159 - Pt 1 - Pass `buffer_age` via `render` rather than callback. r=jnicol
Implementing the Draw compositor via the native compositor interface
is simpler if the buffer age is passed into the top level render method.

Differential Revision: https://phabricator.services.mozilla.com/D95824
2020-11-04 22:12:40 +00:00
Dorel Luca 15bd274cab Backed out changeset 644505d8afbb (bug 1675159) for Browser-chrome failures in browser/base/content/test/general/browser_save_video_frame.js. CLOSED TREE 2020-11-05 00:08:32 +02:00
Glenn Watson 1b9c2f8652 Bug 1675159 - Pt 1 - Pass `buffer_age` via `render` rather than callback. r=jnicol
Implementing the Draw compositor via the native compositor interface
is simpler if the buffer age is passed into the top level render method.

Differential Revision: https://phabricator.services.mozilla.com/D95824
2020-11-04 20:04:02 +00:00
Sylvestre Ledru 31599d2440 Bug 1617369 - Reformat recent rust changes with rustfmt r=emilio,necko-reviewers
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D95435
2020-11-04 17:03:33 +00:00
Matt Woodrow 726340ba67 Bug 1674878 - Expose more detailed WR backend information to TextureFactoryIdentifier. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D95588
2020-11-03 18:24:43 +00:00
Jeff Muizelaar b91e9dc743 Bug 1674943. Ensure the CStrings live long enough. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D95643
2020-11-03 01:16:31 +00:00
Glenn Watson c1e5418cb9 Bug 1674690 - Remove DocumentLayer while retaining the rest of the Document API. r=nical
This removes some of the complexity in the renderer associated with
drawing multiple document layers in a single render. It retains
the rest of the document API, which will be used to implement the
functionality in bug #1654938.

Differential Revision: https://phabricator.services.mozilla.com/D95478
2020-11-02 20:27:58 +00:00
Ricky Stewart 02a7b4ebdf Bug 1654103: Standardize on Black for Python code in `mozilla-central`.
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-26 18:34:53 +00:00
Bogdan Tara da1098d4aa Backed out 10 changesets (bug 1654103, bug 1672023, bug 1518999) for PanZoomControllerTest.touchEventForResult gv-junit failures CLOSED TREE
Backed out changeset ff3fb0b4a512 (bug 1672023)
Backed out changeset e7834b600201 (bug 1654103)
Backed out changeset 807893ca8069 (bug 1518999)
Backed out changeset 13e6b92440e9 (bug 1518999)
Backed out changeset 8b2ac5a6c98a (bug 1518999)
Backed out changeset 575748295752 (bug 1518999)
Backed out changeset 65f07ce7b39b (bug 1518999)
Backed out changeset 4bb80556158d (bug 1518999)
Backed out changeset 8ac8461d7bd7 (bug 1518999)
Backed out changeset e8ba13ee17f5 (bug 1518999)
2020-10-24 03:36:18 +03:00
Ricky Stewart c0cea3b0fa Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-23 20:40:42 +00:00
Lee Salzman 5b66b078c2 Bug 1671071 - support HDR formats in SWGL. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D94304
2020-10-22 03:59:17 +00:00
Dorel Luca 1ff59cb7a3 Backed out changeset 7558c8821a07 (bug 1654103) for multiple failures. CLOSED TREE 2020-10-22 03:51:06 +03:00
Ricky Stewart 50762dacab Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-21 21:27:27 +00:00
Lee Salzman 14606fb8f8 Bug 1670139 - surface origin for RenderCompositorSWGL is top left. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D94348
2020-10-21 20:44:46 +00:00
Jean-Yves Avenard 5de404e405 Bug 1595994 - P1D. Properly serialize display size when sending image over IPC. r=mattwoodrow
The code always assumed that the size of the image with the Y plane dimensions, which, while often the case, isn't correct.
We remove the assertions that the display offset was always (0,0) and properly carry the actual data over IPC.

Remoting the theora decoder and enabling fast video copy exposed several other related issues in the various D3D11 image types.
Various WPT uses theora YUV44 images (because we do not support YUV444 H264 ones). Those images are made of 32 pixels planes with a display size set to 20 pixels. Prior P1D the backend image was a ShareYCbCrPlanar image which correctly handled the size settings.

Like the image serializer, the various D3D11 images always assumed that the Y plane size was the image size.

This however expose existing issues where the offset position of the display is completely ignored for some image type. See bug 1669054

All those problems explain why sometimes we displayed more pixels than we should have.

Depends on D91914

Differential Revision: https://phabricator.services.mozilla.com/D92233
2020-10-20 23:30:04 +00:00
Nicolas Silva 41bda13c88 Bug 1671289 - Improve WebRender's integrated profiler. r=gw
In a (large-ish) nutshell:

 - Consolidate all counters under a single type.
 - Counters are all arranged in an array and referred to via index.
 - All counters can be displayed as average+max (float/int), graph, and change indicator.
 - Specify what to show and in what form via a pref.
 - All counters and visualizations support not having values every frame.
 - GPU time queries visualization is easier to read relative to the frame budget:
  - If the maximum value is under 16ms, the right side of the graph is fixed at 16ms.
  - If the maximum value is above 16ms, draw a vertical bar at 16ms.
 - Added a few new profile counters:
  - Total frame CPU time (from API send to the end of GPU command submission).
  - Visibility, Prepare, Batching and Glyph resolve times.

The main change is how profile counters are represented. Instead of having different types for different visualizations, every counter is represented the same way, tracking average/max values over half a ms and optionally recording a graph over a number of frames. Counters are stored in a vector and referred to via index (See constants at the top of profiler.rs).
The main motivation for this storage is to facilitate adding counters without having to think too much about where to store them and how to pass them to the renderer.

The profiler's UI is defined by a string with with a single syntax:
 - Comma separated list of tokens (leading and trailing spaces ignored), which can be:
  - A counter name:
   - If prefixed with a '#' character, the counter is shown as a graph.
   - If prefixed with a '*' character, the counter is shown as a change indicator
   - By default (counter name without prefix), the counter is shown as average and max over half a second.
  - A preset name:
   - A preset is a builtin UI string in the same syntax that can be nested in the main UI string.
   - Presets are defined towards the top of profiler.rs and can also refer to other presets.
  - An empty token adds a  bit of vertical space.
  - A '|' token begins a new column.
  - A '_' token begins a new row.

Differential Revision: https://phabricator.services.mozilla.com/D93603
2020-10-20 08:54:04 +00:00
Narcis Beleuzu 1fa351142a Backed out 1 changesets (bug 1671289) for wrench bustages on profiler.rs . CLOSED TREE
Backed out changeset db80ac24d32f (bug 1671289)
2020-10-19 23:58:05 +03:00
Nicolas Silva b5e41f1e7e Bug 1671289 - Improve WebRender's integrated profiler. r=gw
In a (large-ish) nutshell:

 - Consolidate all counters under a single type.
 - Counters are all arranged in an array and referred to via index.
 - All counters can be displayed as average+max (float/int), graph, and change indicator.
 - Specify what to show and in what form via a pref.
 - All counters and visualizations support not having values every frame.
 - GPU time queries visualization is easier to read relative to the frame budget:
  - If the maximum value is under 16ms, the right side of the graph is fixed at 16ms.
  - If the maximum value is above 16ms, draw a vertical bar at 16ms.
 - Added a few new profile counters:
  - Total frame CPU time (from API send to the end of GPU command submission).
  - Visibility, Prepare, Batching and Glyph resolve times.

The main change is how profile counters are represented. Instead of having different types for different visualizations, every counter is represented the same way, tracking average/max values over half a ms and optionally recording a graph over a number of frames. Counters are stored in a vector and referred to via index (See constants at the top of profiler.rs).
The main motivation for this storage is to facilitate adding counters without having to think too much about where to store them and how to pass them to the renderer.

The profiler's UI is defined by a string with with a single syntax:
 - Comma separated list of tokens (leading and trailing spaces ignored), which can be:
  - A counter name:
   - If prefixed with a '#' character, the counter is shown as a graph.
   - If prefixed with a '*' character, the counter is shown as a change indicator
   - By default (counter name without prefix), the counter is shown as average and max over half a second.
  - A preset name:
   - A preset is a builtin UI string in the same syntax that can be nested in the main UI string.
   - Presets are defined towards the top of profiler.rs and can also refer to other presets.
  - An empty token adds a  bit of vertical space.
  - A '|' token begins a new column.
  - A '_' token begins a new row.

Differential Revision: https://phabricator.services.mozilla.com/D93603
2020-10-19 20:07:54 +00:00
Bob Owen e9515cbc26 Bug 1654477 P5: Add crashtest to trigger texture handle open failures. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D93674
2020-10-16 10:57:16 +00:00
Glenn Watson b4aecd470f Bug 1670842 - Pt 1 - Remove option to disable picture caching. r=jnicol
This patch removes the public API and high level logic for
disabling picture caching for debugging and pinch-zoom in
some cases.

Follow up patches will remove and simplify the internal parts
of WR that remain to handle the disabled picture caching
code path.

Differential Revision: https://phabricator.services.mozilla.com/D93446
2020-10-14 06:06:45 +00:00
Matt Woodrow 2de72f3cef Bug 1666055 - Merge IOSurface RenderTextureHosts, so that NativeLayerCA can handle surfaces passed through SWGL. r=lsalzman
NativeLayerCA only understands how to extract the IOSurface from a RenderMacIOSurfaceTextureHost.

Rather than trying to support both types, this just merges them, as they are both just an IOSurface pointer and some associated helper functions.

Differential Revision: https://phabricator.services.mozilla.com/D93181
2020-10-14 07:58:45 +00:00
Matt Woodrow 5487b02f9e Bug 1666055 - Remove RenderTextureHostOGL. r=lsalzman
This interface is never used directly, and the only consumers of the virtual functions are by the derived classes themselves.

Differential Revision: https://phabricator.services.mozilla.com/D93180
2020-10-14 07:58:18 +00:00
Matt Woodrow 324654797b Bug 1666055 - Disable buffer textures as external compositor surfaces on MacOS. r=lsalzman
When using the native RenderCompositor+SWGL on MacOS, we don't support passing buffer textures directly to the compositor.

Differential Revision: https://phabricator.services.mozilla.com/D93179
2020-10-14 07:56:47 +00:00
Lee Salzman ca9278009f Bug 1670164 - implement APPLE_rgb_422 extension in SWGL. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D93055
2020-10-12 07:10:12 +00:00
Kartikaya Gupta 719b5d3455 Bug 1666802 - Remove unused serializers. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D93145
2020-10-11 23:22:51 +00:00
Jamie Nicol 788a554a66 Bug 1670014 - Delay querying buffer age until it is actually needed. r=sotaro
Currently we query the backbuffer age in
RenderCompositor::BeginFrame(). Querying the age on android requires
the driver to dequeue a new backbuffer. By doing this right at the
start of the frame, we may cause the driver to block until a buffer is
ready.

We don't actually need the buffer age until part way through
rendering, in Renderer::composite_simple(), by which point there is a
better chance the buffer is available. So move the query to there instead.

Differential Revision: https://phabricator.services.mozilla.com/D92950
2020-10-09 08:25:43 +00:00
Jean-Yves Avenard 9e8b4a210f Bug 1630733 - Only attempt to use TextureHost if it's valid. r=mattwoodrow,nical
It is possible that when the ImageBridge received a new image to composite, that image hasn't yet been registered via the VideoBridge.

This can happen if the decoding occurs in the different process than the content process. Even though the VideoBridge registration message was sent earlier by the RDD process, the ImageBridge message sent by the content process reached the compositor earlier.

So we only attempt to use the TextureHost if it is valid and the underlying image has been properly registered. Otherwise we will continue to use the previous image.

Some methods are modified to lazily perform their action only once the image has been registered from the PVideoBridge.

Differential Revision: https://phabricator.services.mozilla.com/D92234
2020-10-09 02:54:30 +00:00
Jim Blandy f97fb69900 Bug 1669394: Draw rounded rectangles using WebRender borders. r=gw
The DisplayListBuilder::PushRoundedRect function is used for <li> bullets and a
few other decorations. It draws a rounded rectangle as an ordinary rectangle
with a rounded rect clip.

However, you can get the same effect by drawing a box border with rounded
corners around a box with zero width and height. This, WebRender can cache as a
bitmap and draw as an image. Clips are not cached in this way, and require extra
attention from WebRender to process.

Differential Revision: https://phabricator.services.mozilla.com/D92984
2020-10-08 20:22:57 +00:00
Lee Salzman 165e8d8f80 Bug 1623074 - support overlay surfaces being added late in frame in SwCompositor. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D92909
2020-10-08 18:49:39 +00:00
Kartikaya Gupta cfcbbaae93 Bug 1668921 - Update cbindgen version and generate ostream serializers for WR structs. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D92842
2020-10-08 09:24:36 +00:00
Glenn Watson 5eb6500eff Bug 1669567 - Use fixed size texture arrays for picture cache slices. r=jnicol
Previously we used a single texture array for a given tile size,
and resized the texture array as more tiles were needed.

However, this results in expensive driver stalls and GPU copy times
when resizing the array.

Instead, use a fixed slice count for each texture array, and support
multiple textures with the same tile size.

This may result in slightly more draw calls during compositing of
picture cache tiles due to batch breaks, but will remain a small
number due to the limited number of picture cache tiles that are
allocated at any one time.

Differential Revision: https://phabricator.services.mozilla.com/D92715
2020-10-07 21:58:06 +00:00
sotaro 4f1c35bfbd Bug 1669143 - Handle a case that GetDeviceOfEGLDisplay() returned nullptr r=nical
When ANGLE detects device reset, GetDeviceOfEGLDisplay() returns nullptr. It is not handled as device reset in current RenderCompositorANGLE::ShutdownEGLLibraryIfNecessary(). It should be handled as device reset.

Differential Revision: https://phabricator.services.mozilla.com/D92543
2020-10-06 09:31:05 +00:00
Nicolas Silva 1db54669eb Bug 1667696 - Use standard rust channels on Windows. r=jrmuizel
While we measuered somewhat surprisingly high performance improvements on linux when replacing standard channels with crossbeam ones on Linux, there has been a CONTENT_FRAME_TIME regression on Windows around the same time. In doubt, this patch makes us use standard channels on Windows to see if it fixes the regression. This patch will be reverted if it doesn't turn out restore the CONTENT_FRAME_TIME numbers.

Swgl needs to continue using crossbeam because it depends on select which doesn't exist in standard channels.

Differential Revision: https://phabricator.services.mozilla.com/D92383
2020-10-05 14:01:08 +00:00
Solomon Chiu 26f860a4a3 Bug 1667939 - Make the picture tile size configurable via pref. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D91759
2020-10-02 10:38:45 +00:00