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

2132 Коммитов

Автор SHA1 Сообщение Дата
Lee Salzman a6c3fcda13 Bug 1646835 - reuse depth buffers when rendering SWGL picture cache tiles. r=mstange
Bug 1592038 implemented a means for reducing memory usage resulting from needlessly
duplicated allocation of depth buffers when rendering WR picture cache tiles via
the NativeLayer interface. This aims to keep a similarly level of memory savings
even when using NativeLayer + SWGL.

SWGL allows, as an extension beyond OpenGL, specifying an allocation size separate
from the incidental size of a texture, which can be used to render to a smaller
valid rect of a texture without continually reallocating it every time the size
of the valid rect changes within the actual tile size. This functionality is used
to keep around only a single depth texture for the SWGL compositor that is resized
to accommodate the maximum requested tile size, so that any surface or tile can
use it as desired.

Differential Revision: https://phabricator.services.mozilla.com/D80274
2020-06-24 04:20:56 +00:00
Lee Salzman 6e8db72e54 Bug 1646835 - move SWGL context creation into specific SWGL RenderCompositors. r=jrmuizel
Currently RendererOGL has mixed-in details of SWGL context creation which becomes messy
and slightly unanticipated based on the nomenclature and structure of RendererOGL. Based
on other work in bug 1646835, it becomes more natural to move this context creation into
the specific SWGL RenderCompositors so that RendererOGL can be agnostic to any SWGL
details.

Differential Revision: https://phabricator.services.mozilla.com/D80273
2020-06-24 01:23:43 +00:00
Lee Salzman 6221028051 Bug 1646835 - refactor RenderCompositorOGL into RenderCompositorNative. r=mstange
RenderCompositorOGL currently has many responsibilities including supporting
OpenGL compositor for Linux, whole-window compositing for Mac NativeLayerCA,
and per-cache-tile compositing for Mac NativeLayerCA. With the addition of
support for SWGL, this becomes even further complicated.

It becomes advantageous to separate out RenderCompositorOGL specifically as
only the basic OpenGL compositing case, as that naturally yields a simple and
isolated RenderCompositor.

What is left over becomes RenderCompositorNative, a basis for implementing
NativeLayer-based RenderCompositors. To cleanly isolate state and details of
when HW compositing or SW compositing is being used, these are further split
off into RCNativeOGL and RCNativeSWGL versions that deal with specific
isolated details of OpenGL and SWGL respectively.

RCNativeOGL deals with just setting up OpenGL FBOs for NativeLayers.

RCNativeSWGL's new task is just to deal mapping NativeLayers and providing
SWGL FBOs for them without involving OpenGL.

Differential Revision: https://phabricator.services.mozilla.com/D80270
2020-06-23 23:54:24 +00:00
Lee Salzman d879c564d6 Bug 1646835 - add MapTile/UnmapTile hooks to the WR compositor. r=mstange
RenderCompositors for SWGL that wish to provide accelerated compositing need to
subvert the existing Bind/Unbind hooks in the WR compositor. These compositors
need to keep track of their HW tiles without actually binding an OpenGL FBO
for WR to render picture cache tiles. SWGL needs to intervene and get a backing
buffer for tile from the RenderCompositor so that it can create a SWGL FBO for
WR to render the picture cache tile to.

To that end, this adds MapTile/UnmapTile as a replacement for Bind/Unbind for
those scenarios. This is done in a way that it affects only the WrCompositor of
webrender_bindings without actually altering WR's Compositor interface. This is
beneficial because WR does not have to understand the details of SWGL
integration and also so as not to complicate other users of WR such as Servo
who are not currently utilizing SWGL at all.

RenderCompositorOGL is initially modified to use these hooks in this patch. It
later became more convenient to restructure that in a follow-up patch.

Differential Revision: https://phabricator.services.mozilla.com/D80269
2020-06-23 23:55:11 +00:00
Lee Salzman a8bc86a552 Bug 1646835 - implement basic SWGL compositor. r=jrmuizel
This is a first implementation of a software-only SWGL RenderCompositor
that relies on the existing widget hooks for Basic compositing. It attempts
to lock the widget and get a DT whose underlying data it can supply directly
to SWGL to composite to. Critically, it does not rely on OpenGL or any other
form of HW accel to function. The interface between the RenderCompositor and
SWGL will be further refined in follow-up patches.

Differential Revision: https://phabricator.services.mozilla.com/D80268
2020-06-24 00:53:39 +00:00
Lee Salzman 62ba932186 Bug 1646835 - allow specifying backing data and stride for SWGL default framebuffer. r=jimb
For performance reasons in SWGL software compositors. to avoid unnecessary
full-screen copies of the framembuffer, we need to allow those compositors to
map their underlying widget surfaces and pass that buffer to SWGL so that they
can be directly rendered to. That also requires supporting custom strides, as
we can't always enforce the particular layout of the buffers handed off to us.
To that end, InitDefaultFramebuffer is generalized to take such information
and then many places where we rely on a specific hard-coded SWGL-calculated
stride have been altered to deal with a caller-supplied stride.

Differential Revision: https://phabricator.services.mozilla.com/D80267
2020-06-23 01:44:00 +00:00
Martin Stransky 2b91832e28 Bug 1645704 [Wayland] Rename WaylandDMABufSurface to DMABufSurface at gxf, r=sotaro
Differential Revision: https://phabricator.services.mozilla.com/D79637
2020-06-21 13:59:17 +00:00
Markus Stange 4c8b889f5e Bug 1646066 - Make partial valid rects work properly in NativeLayerCA. r=jrmuizel
This moves the clipping responsibility into the layer. It also brings back
assertions that make sure that no invalid content reaches the screen.
On the layer side I'm renaming validRect to displayRect, because at the time
NextSurface* is called, that rect is not yet valid.
This implementation also allows having valid content outside of the display
rect. So, for example, if you grow and shrink the display rect multiple times
but most of the outer parts are transparent, in theory this allows you to paint
the transparent pixels only once rather than every time the display rect
expands.

Differential Revision: https://phabricator.services.mozilla.com/D79842
2020-06-18 22:15:22 +00:00
Jeff Muizelaar 6613f1b6b7 Bug 1646741 - Update gleam to 0.12. r=kvark
For stride calculation and SSBOs

Differential Revision: https://phabricator.services.mozilla.com/D80191
2020-06-18 18:11:13 +00:00
Coroiu Cristina 96536abc93 Backed out changeset 9367aa4b97e2 (bug 1646741) for wrench failures on a CLOSED TREE 2020-06-18 21:03:36 +03:00
Jeff Muizelaar c326a65a01 Bug 1646741 - Update gleam to 0.12. r=kvark
For stride calculation and SSBOs

Differential Revision: https://phabricator.services.mozilla.com/D80191
2020-06-18 15:02:08 +00:00
Hiroyuki Ikezoe 77bf0111ce Bug 1467765 - Sample off-main-thread animations on the render backend thread in case of WebRender. r=kats
Now CompositorAnimationStorage::GetAnimatedValue() and SetAnimatedValue()s
are called on the sampler thread in case of WebRender, are called on the
compositor thread in case of non WebRender, so we drop assertions of
IsInCompositorThread check there. A mLock.AssertCurrentThreadOwns call in
each function should make sure the function gets called on the
sampler/compositor thread with acquiring the lock.

One caveat in this change is that in case we try to get an animation value via
nsIDOMWindowUtils.getOMTAStyle(), we do sample animations on the _compositor_
thread and we never call UpdateDynamicProperties, which means if it gets called
in testing refresh driver mode, visual results will differ from what the value
returned by the getOMTAStyle should look like. But it should be fine because we
disallow using any chrome priviledge APIs in reftests and also we will never use
the testing refresh driver mode in the reftest harness. Also in mochitests the
visual results' differences might make people confusing if the person can notice
it, but in principal getOMTAStyle() is designed to get computed animating values
so that it doesn't matter what the visual result is.

Differential Revision: https://phabricator.services.mozilla.com/D79982
2020-06-17 23:47:20 +00:00
Sylvestre Ledru acaa9649a8 Bug 1617369 - Reformat recent rust changes with rustfmt r=emilio
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D79796
2020-06-16 22:35:03 +00:00
Jeff Gilbert a97c615de2 Bug 1632249 - Support compositing out-of-process WebGL. r=handyman,lsalzman,nical,geckoview-reviewers,agi,imanol
* Majorly simplity CanvasRenderer
* Replace GLScreenBuffer with trivial GLSwapChain
* Use descriptor structs so that future SharedSurface changes aren't so painful
  to propagate
* Mortgage/strip out more OffscreenCanvas code for now

Differential Revision: https://phabricator.services.mozilla.com/D75055
2020-06-15 18:25:55 +00:00
Dzmitry Malyshau 1df0745ce1 Bug 1642495 - Use the same usage hint in WebRender for one-time reset r=gw
This should let the GL drivers to re-use the PBOs more aggressively,
and traverse the orphan list less.
Fwiw, it doesn't look like Angle differentiates between StreamDraw and DynamicDraw:
https://searchfox.org/mozilla-central/rev/598e50d2c3cd81cd616654f16af811adceb08f9f/gfx/angle/checkout/src/libANGLE/renderer/d3d/BufferD3D.cpp#65-66

Differential Revision: https://phabricator.services.mozilla.com/D78339
2020-06-13 01:38:10 +00:00
Andrew Osmond 8f69882854 Bug 1628657 - Make canvas use computed reference frame transforms. r=kvark
When a transform depends on the layout size of an element, one can see
visual distortions caused by the difference between the unsnapped size
used in the transform, and the snapped size calculated during scene
building. Ideally we could compute the transform after we snap, rather
than before. This patch adds support for a computed reference frame
which takes parameters to calculate the ideal transform dynamically.

In a future patch, we should make videos take advantage of this same
mechanism to avoid similar problems. This requires support for mirroring
and rotations.

Differential Revision: https://phabricator.services.mozilla.com/D77956
2020-06-11 20:46:05 +00:00
Dorel Luca 255f146f14 Backed out 7 changesets (bug 1632249) for Gtest perma chrash in [@ mozilla::BlockingResourceBase::CheckAcquire()]. CLOSED TREE
Backed out changeset 4ff99aab3ee8 (bug 1632249)
Backed out changeset d5b7fe789001 (bug 1632249)
Backed out changeset 64fbb616a0f3 (bug 1632249)
Backed out changeset 6f19f43e0a0b (bug 1632249)
Backed out changeset 073302d26c5e (bug 1632249)
Backed out changeset 7c94d37c446e (bug 1632249)
Backed out changeset 204b899f436d (bug 1632249)
2020-06-11 19:44:20 +03:00
sotaro c5381ed0cd Bug 1638819 - Skip SyncObjectD3D11Host::Synchronize() when RenderTextureHosts do not use ID3D11Texture2D r=jrmuizel
Simple implementation of skipping SyncObjectD3D11Host::Synchronize(). More optimization could be done in Bug 1635629.

Differential Revision: https://phabricator.services.mozilla.com/D75781
2020-06-11 07:28:30 +00:00
Jeff Gilbert cf3c8fedea Bug 1632249 - Support compositing out-of-process WebGL. r=handyman,lsalzman,nical,geckoview-reviewers,agi,imanol
* Majorly simplity CanvasRenderer
* Replace GLScreenBuffer with trivial GLSwapChain
* Use descriptor structs so that future SharedSurface changes aren't so painful
  to propagate
* Mortgage/strip out more OffscreenCanvas code for now

Differential Revision: https://phabricator.services.mozilla.com/D75055
2020-06-11 06:37:35 +00:00
Jamie Nicol 6ac8fcda94 Bug 1644732 - Don't call NotifyNotUsed() from ~RenderAndroidSurfaceTextureHostOGL(). r=sotaro
Doing so means it is called twice, which causes an assertion failure.

Differential Revision: https://phabricator.services.mozilla.com/D79127
2020-06-11 05:27:09 +00:00
Mihai Alexandru Michis 59ad7ed333 Backed out 6 changesets (bug 1632249) for causing bustages in CanvasRenderingContext2D.cpp
CLOSED TREE

Backed out changeset c93972b05d4f (bug 1632249)
Backed out changeset 04f5127c85d5 (bug 1632249)
Backed out changeset b15d91e64a25 (bug 1632249)
Backed out changeset 71ad2ed8e9ba (bug 1632249)
Backed out changeset 6e9a89ead3a5 (bug 1632249)
Backed out changeset dd00e2da3a0f (bug 1632249)
2020-06-11 02:43:35 +03:00
Jeff Gilbert 9b09e54345 Bug 1632249 - Support compositing out-of-process WebGL. r=handyman,lsalzman,nical,geckoview-reviewers,agi,imanol
* Majorly simplity CanvasRenderer
* Replace GLScreenBuffer with trivial GLSwapChain
* Use descriptor structs so that future SharedSurface changes aren't so painful
  to propagate
* Mortgage/strip out more OffscreenCanvas code for now

Differential Revision: https://phabricator.services.mozilla.com/D75055
2020-06-10 22:21:02 +00:00
Dorel Luca 7289b66d6f Backed out 4 changesets (bug 1632249) for Build bustages and mda failures. CLOSED TREE
Backed out changeset cdaa8a4e9e36 (bug 1632249)
Backed out changeset 9ff26bcc580c (bug 1632249)
Backed out changeset 16d84439756f (bug 1632249)
Backed out changeset bbfe23c61add (bug 1632249)
2020-06-09 03:19:48 +03:00
Kris Taeleman ca4c948827 Bug 1643832 - Add Pref flag to enable shader precaching at startup. r=jnicol
Differential Revision: https://phabricator.services.mozilla.com/D78580
2020-06-08 08:18:34 +00:00
Dzmitry Malyshau 59b6551dd5 Bug 1638672 - Use shaders to clear texture cache regions r=geckoview-reviewers,gw,snorp
This is a suggested workaround for an interesting visual bug that we see on
some platforms with Intel Broadwell GPUs.

Also reverts https://phabricator.services.mozilla.com/D57100

Differential Revision: https://phabricator.services.mozilla.com/D78705
2020-06-08 21:05:03 +00:00
Jeff Gilbert de6377896c Bug 1632249 - Support compositing out-of-process WebGL. r=handyman,lsalzman,nical,geckoview-reviewers,agi,imanol
* Majorly simplity CanvasRenderer
* Replace GLScreenBuffer with trivial GLSwapChain
* Use descriptor structs so that future SharedSurface changes aren't so painful
  to propagate
* Mortgage/strip out more OffscreenCanvas code for now

Differential Revision: https://phabricator.services.mozilla.com/D75055
2020-06-08 20:34:15 +00:00
sotaro 650f64603f Bug 1642839 - Implement WebRenderLayerManager::SendInvalidRegion() r=jrmuizel
When DWM is disabled, each window does not have own back buffer. They would paint directly to a buffer that was to be displayed by the video card. WM_PAINT via SendInvalidRegion() requests necessary re-paint. With it, RenderCompositorANGLE does not need to disable partial present.

Differential Revision: https://phabricator.services.mozilla.com/D77989
2020-06-05 05:03:40 +00:00
sotaro b12a00b03e Bug 1642834 - Add a comment to RenderCompositorANGLE::RequestFullRender() r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D77972
2020-06-03 22:32:10 +00:00
Bert Peers e05f202e2b Bug 1641704 - vendor tracy 0.1.1 (gfx/wr, bindings) r=gw
Differential Revision: https://phabricator.services.mozilla.com/D78100
2020-06-03 20:33:05 +00:00
sotaro 33ee2a10f6 Bug 1637497 - Disable partial present dynamically when Dwm is disabled r=jrmuizel
Do full render with WebRender when Dwn is disabled. It could be done by RenderCompositorANGLE::RequestFullRender().

Back out  Bug 1638469. It disables WebRender during starting if Dwm is disabled. But Dwm is enabled/disabled dynamically. And we do not want to disable WebRender in this case.

Differential Revision: https://phabricator.services.mozilla.com/D77221
2020-06-01 18:39:50 +00:00
Lee Salzman ff67b8251d Bug 1641671 - represent font size as f32 to avoid quantization issues. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D77367
2020-05-29 01:48:52 +00:00
Miko Mynttinen 6013e7cd95 Bug 1640457 - Discard pending WR display items if the Gecko item will be pushed as an image r=jrmuizel
If |nsDisplayItem::CreateWebRenderCommands()| returns false, the items that have been pushed to |DisplayListBuilder::pending_chunk| need to be cleared, because the item will be pushed as an image instead. This happens, for example, when nsDisplayText encounters unsupported features.

Differential Revision: https://phabricator.services.mozilla.com/D77095
2020-05-27 16:45:08 +00:00
sotaro 1e3d052869 Bug 1632357 - Use compositor window only when it is necessary r=nical
With current gecko, there are cases that compositor window is used even when it is not necessary. For example, fallback from DirectComposite with WebRender and fallback from double buffering with Compositor. With some gpu drivers, the fallbacks with compositor window causes rendering problem.

Differential Revision: https://phabricator.services.mozilla.com/D76470
2020-05-25 11:57:05 +00:00
Nicolas Silva bdabdf112f Bug 1635016 - Remove the rest of the SetTransactionLogging glue. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D74866
2020-05-18 12:11:33 +00:00
Sylvestre Ledru f69840fd80 Bug 1617369 - Reformat recent rust changes with rustfmt r=webdriver-reviewers,whimboo
# ignore-this-changeset

Depends on D76451

Differential Revision: https://phabricator.services.mozilla.com/D76663
2020-05-25 09:07:45 +00:00
Lee Salzman 9384fc8f0a Bug 1639563 - make WROTSAlloc::Grow check capacity instead of length. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D76582
2020-05-23 17:47:32 +00:00
Greg V 22c3a0e8d8 Bug 1620076 - Partial compositing (damage) with EGL_EXT_buffer_age in WebRender r=jgilbert
EGL with buffer-age requires the application to keep the front buffer
fully consistent. This means we have to draw the previous frame's
damage as well. (But we don't need to include it in the hint we're
sending to the system compositor via SwapBuffersWithDamage.)

Differential Revision: https://phabricator.services.mozilla.com/D61062
2020-05-22 18:15:13 +00:00
sotaro 2bb3ca363d Bug 1636868 - Add RenderTextureHostWrapper for GPUVideoTextureHost r=jrmuizel
By using RenderTextureHostWrapper, we could reduce re-creation of RenderDXGITextureHostOGL and RenderDXGIYCbCrTextureHostOGL.

Differential Revision: https://phabricator.services.mozilla.com/D74838
2020-05-22 19:42:38 +00:00
Lee Salzman e97b3d4035 Bug 1639563 - sanitize WR fonts. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D76360
2020-05-22 15:48:55 +00:00
Sylvestre Ledru 4ab6fe5285 Bug 1617369 - Reformat recent rust changes with rustfmt r=emilio DONTBUILD
# ignore-this-changeset

Depends on D76451

Differential Revision: https://phabricator.services.mozilla.com/D76452
2020-05-22 11:50:08 +00:00
Bogdan Tara 107fbafd77 Backed out 2 changesets (bug 1639563) for gfx related bustages CLOSED TREE
DONTBUILD
Backed out changeset b2c8de065886 (bug 1639563)
Backed out changeset 43abf0a9602a (bug 1639563)
2020-05-22 06:55:28 +03:00
Lee Salzman 91d6189dd9 Bug 1639563 - sanitize WR fonts. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D76360
2020-05-21 23:30:02 +00:00
Glenn Watson af3ddc2628 Bug 1617524 - Fix crash in get_relative_transform edge case. r=jnicol
Previously, WR would attempt to detect at the start of frame
building if the spatial node of any picture cache contained
a non-axis-aligned transform, and disable picture caching in
that edge case.

However, picture caching can't (currently) be disabled when the
native compositor is active. In this mode, picture caching was
force enabled, causing an assertion failure due to unexpected
coordinate systems when updating pictures.

This patch changes the way the detection of scroll root logic
works such that we don't consider any scroll frame inside a
reference frame to be a valid scroll root for picture caching
purposes. Thus it's not possible to create a picture cache
where the reference spatial node has a non-axis-aligned transform.

Differential Revision: https://phabricator.services.mozilla.com/D75890
2020-05-21 07:42:32 +00:00
sotaro f098f71977 Bug 1638750 - Remove unnecessary virtual from RenderTextureHost derived classes r=nical
Differential Revision: https://phabricator.services.mozilla.com/D75740
2020-05-18 13:59:44 +00:00
sotaro 2a3581f2ce Bug 1620458 - Revert part of Bug 1594303 fix r=nical
When android SurfaceTexture is rendered to WebGL, the SurfaceTexture should not be attached to GL context of WebRender.

Differential Revision: https://phabricator.services.mozilla.com/D66367
2020-05-16 00:46:28 +00:00
Glenn Watson de2845e48f Bug 1635610 - Enable per scroll root picture cache slices by default. r=jrmuizel,aosmond
Part 1 of this patch enables subpixel AA in more cases when there
are multiple picture cache slices. Because of this, we can enable
extra picture cache slices by default, as a performance win for
the general case.

Users who want to force subpixel AA in more cases, at the cost of
performance can manually set the about:config value called
gfx.webrender.quality.force-subpixel-aa-where-possible.

Differential Revision: https://phabricator.services.mozilla.com/D75465
2020-05-16 03:09:57 +00:00
Aaron Klotz 51e92c23de Bug 1637452: Part 14 - Fix JNI includes in gfx; r=gfx-reviewers,jrmuizel
In this bug we're moving away from monolithic JNI headers to class-specific
headers so that we don't have to rebuild the world every time we make a change
to a JNI interface.

Differential Revision: https://phabricator.services.mozilla.com/D75377
2020-05-15 17:05:59 +00:00
Jamie Nicol b10845210b Bug 1633432 - Don't detach SurfaceTextures from GL context on Pause(). r=sotaro,geckoview-reviewers,snorp,imanol
In bug 1470348 we started to detach all SurfaceTextures from the
current GL context in CompositorOGL::Pause(). This was required for
VR, so that when the VR presentation was entered the SurfaceTextures
could be attached to the VR context instead.

When RenderCompositorEGL was implemented for webrender, we copied the
call to detach from CompositorOGL. However, due to extra complexity in
webrender's threading model, this is causing assertion failures.

VR no longer relies upon the SurfaceTextures being detached when the
compositor is paused, as it now uses its own SurfaceTexture
set. Therefore we can remove the detach call from both
CompositorOGL::Pause and RenderCompositorEGL::Pause.

Differential Revision: https://phabricator.services.mozilla.com/D74832
2020-05-15 12:05:15 +00:00
Kartikaya Gupta c9a8fb7425 Bug 1622360 - Rename RenderRootDisplayListData. r=jrmuizel
Depends on D75125

Differential Revision: https://phabricator.services.mozilla.com/D75383
2020-05-15 00:07:34 +00:00
Kartikaya Gupta e07109f0ec Bug 1622360 - Remove the RenderRoot enum entirely, along with the feature docs. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D75125
2020-05-15 00:07:01 +00:00
Kartikaya Gupta cae38bcf26 Bug 1622360 - Remove mRenderRoot from WebRenderAPI classes. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D74951
2020-05-15 00:04:55 +00:00
Kartikaya Gupta 19ea62d2a1 Bug 1622360 - Remove render root propagation in NotifyDidSceneBuild codepath. r=jrmuizel
Depends on D74946

Differential Revision: https://phabricator.services.mozilla.com/D74947
2020-05-14 23:59:11 +00:00
Sylvestre Ledru 2271eb5b20 Bug 1617369 - Reformat recent rust changes with rustfmt r=kvark DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D75254
2020-05-14 14:19:32 +00:00
Dzmitry Malyshau ea310127f1 Bug 1637092 - Change WR capture path to point to the home folder r=Bert,webdriver-reviewers,whimboo
Point the captures to the home folder at all times.

Differential Revision: https://phabricator.services.mozilla.com/D74747
2020-05-12 13:41:31 +00:00
Glenn Watson 82367ea5d6 Bug 1636683 - Fix close buttons on Win7 + WR + external theme. r=kats
Reverts part of a change from bug 1632705 to allow close buttons
to be shown in Win7 under certain themes with WR enabled.

If it turns out that we need to support the clear rect + rounded
clip case, that can be implemented as a follow up - this is an
improvement for now though.

Differential Revision: https://phabricator.services.mozilla.com/D74752
2020-05-12 00:11:12 +00:00
sotaro 0ef8de9346 Bug 1636352 - Fix RenderThread::HandlePrepareForUse() calling r=jnicol
There could be a case that new RenderThread::PrepareForUse() and new WebRender transaction by WebRenderBridgeParent::MaybeGenerateFrame() achieve during calling UpdateAndRender().

Differential Revision: https://phabricator.services.mozilla.com/D74365
2020-05-11 20:58:51 +00:00
Kartikaya Gupta caba8fb538 Bug 1622360 - Remove render roots from APZ sampling codepath. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D74405
2020-05-11 20:08:15 +00:00
Kartikaya Gupta 6e66eea2d4 Bug 1622360 - Remove render root arguments from ScheduleRender functions. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D74404
2020-05-11 20:08:08 +00:00
Kartikaya Gupta cf2201e264 Bug 1622360 - Remove kRenderRoots. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D74403
2020-05-11 20:08:05 +00:00
Kartikaya Gupta d0cb7d8424 Bug 1622360 - Remove RenderRootArray. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D74186
2020-05-11 20:07:50 +00:00
Nicolas Silva be515a3296 Bug 1612440 - Add BlobImageHandler::create_similar. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D74297
2020-05-11 14:00:49 +00:00
Nicolas Silva ee478cb6d7 Bug 1612440 - Renamed clone_sender into create_sender. r=gw
This was split off from https://phabricator.services.mozilla.com/D71992

Depends on D74293

Differential Revision: https://phabricator.services.mozilla.com/D74296
2020-05-07 19:45:20 +00:00
Nicolas Silva f4e54a21aa Bug 1612440 - Make send_transaction take &mut self. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D74293
2020-05-11 10:27:26 +00:00
Sylvestre Ledru 45c60a761a Bug 1617369 - Reformat recent rust changes with rustfmt r=emilio
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D74530
2020-05-09 23:02:52 +00:00
Sylvestre Ledru 1929dd1ab3 Bug 1519636 - Reformat recent changes to the Google coding style r=andi
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D73347
2020-05-09 14:51:53 +00:00
Jean-Yves Avenard 912e294406 Bug 1634253 - P6. Remove MessageLoop use from gfx. r=kats,mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D73825
2020-05-08 20:20:44 +00:00
Narcis Beleuzu 58a833221c Backed out 9 changesets (bug 1634253) for bc failures on browser_bug295977_autoscroll_overflow.js . CLOSED TREE
Backed out changeset d41b75c1f7ec (bug 1634253)
Backed out changeset 5f8a1ee17b81 (bug 1634253)
Backed out changeset 43eda078b405 (bug 1634253)
Backed out changeset e98212a74709 (bug 1634253)
Backed out changeset 855e222ceb14 (bug 1634253)
Backed out changeset 9f01acdf4367 (bug 1634253)
Backed out changeset ea62cb1ec472 (bug 1634253)
Backed out changeset fa3e7588e7d6 (bug 1634253)
Backed out changeset 139e7035e736 (bug 1634253)
2020-05-08 23:09:31 +03:00
Jean-Yves Avenard f304da03ac Bug 1634253 - P6. Remove MessageLoop use from gfx. r=kats,mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D73825
2020-05-07 08:04:53 +00:00
Dorel Luca 9340fa2b2d Backed out 11 changesets (bug 1635001, bug 1634253) for Browser-chrome failures in browser_bug295977_autoscroll_overflow.js
Backed out changeset c3c27cb46db6 (bug 1635001)
Backed out changeset 6cea251e5910 (bug 1635001)
Backed out changeset 3cb0a05be7fc (bug 1635001)
Backed out changeset 1cbb2866a3ad (bug 1634253)
Backed out changeset 53fd00dcf95c (bug 1634253)
Backed out changeset e3acd9db7065 (bug 1634253)
Backed out changeset 5c0b7aa99406 (bug 1634253)
Backed out changeset dc7e17f772be (bug 1634253)
Backed out changeset 6e47af64396a (bug 1634253)
Backed out changeset 8865de9ae0ef (bug 1634253)
Backed out changeset 6fac93b596c2 (bug 1634253)
2020-05-07 11:00:04 +03:00
Jean-Yves Avenard 96d7622823 Bug 1634253 - P6. Remove MessageLoop use from gfx. r=kats,mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D73825
2020-05-07 05:03:42 +00:00
Kartikaya Gupta 9b72e95f96 Bug 1622360 - Drop the document frames counter stuff. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D73878
2020-05-05 18:15:36 +00:00
Simon Giesecke 2e6385ca34 Bug 1626570 - Improve handling of copying arrays in gfx/. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D73635
2020-05-05 12:55:27 +00:00
Glenn Watson fb839d472b Bug 1635022 - Add support for specifying blend container r=kats,Bert
Previously, WR would internally mark a parent stacking context
as requiring isolation when a stacking context with mix-blend-mode
was encountered.

However, this adds significant complexity to scene building in
WR, meaning that several decisions related to stacking context
redundancy, clip chain roots must be delayed until the stacking
context is popped.

By requiring the display list to annotate blend containers (Gecko
already has all this information available), we will be able to
simplify this scene building logic, which will unblock some
ongoing improvements to how clips are handled.

The patch introduces stacking context flags, and ports the existing
is_backdrop_root bool to be part of these flags. It also removes
an unused old field, cache_tiles.

Differential Revision: https://phabricator.services.mozilla.com/D73597
2020-05-04 20:28:44 +00:00
Glenn Watson 88eb2e5226 Bug 1632705 - Part 5 - Port some more clips to explicit rect API. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D73179
2020-04-30 12:08:54 +00:00
Glenn Watson ca78f5a8c2 Bug 1632705 - Part 4 - Port clear prims to use rounded clip rect API. r=kats
The implementation of this was previously ignoring the aRegion
parameter, so was completely broken. This is only used by the
Win7 widget code. This may fix an issue with drawing of window
close buttons on Windows 7 with WebRender enabled.

Differential Revision: https://phabricator.services.mozilla.com/D73163
2020-04-30 11:50:59 +00:00
Daniel Varga d0212aae27 Backed out changeset a8ca75f3002d (bug 1633985) on request by dev 2020-04-30 01:58:25 +03:00
Glenn Watson ab3883a1e7 Bug 1633985 - Remove unused clip parent and backface flag from push_iframe r=kats,nical
Differential Revision: https://phabricator.services.mozilla.com/D73006
2020-04-29 21:54:14 +00:00
Dorel Luca f906702a66 Backed out changeset 0a9371673354 (bug 1633985) for Webrender bustages. CLOSED TREE 2020-04-30 00:03:23 +03:00
Glenn Watson c222acf8ae Bug 1633985 - Remove unused clip parent and backface flag from push_iframe r=kats,nical
Differential Revision: https://phabricator.services.mozilla.com/D73006
2020-04-29 17:14:50 +00:00
Dzmitry Malyshau 8f221fe39d Bug 1633553 - Update dwrote to 0.11 r=jdm
Differential Revision: https://phabricator.services.mozilla.com/D72748
2020-04-27 21:47:21 +00:00
sotaro d117745eaf Bug 1633303 - Add glDebugCallback support to non shared gl context with WebRender r=gw
Bug 1632096 added the capability to shared gl context with WebRender. This bug extends the support to non shared gl context.

Differential Revision: https://phabricator.services.mozilla.com/D72579
2020-04-27 02:51:48 +00:00
Glenn Watson 63892870eb Bug 1632705 - Part 1 - Remove complex clips from scroll frame definitions. r=kats,Bert
They aren't used, so can easily be removed as the first part of
this seried of patches.

If this functionality is ever required, it can be handled by the
caller defining complex clip nodes explicitly.

Differential Revision: https://phabricator.services.mozilla.com/D72261
2020-04-24 18:29:38 +00:00
Sylvestre Ledru 7f26dcf1b6 Bug 1617369 - Reformat recent rust changes with rustfmt r=emilio
Done with:
./mach lint -l rustfmt --fix
with
rustfmt 1.4.12-stable (a828ffe 2020-03-11)

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D72527
2020-04-25 21:21:32 +00:00
Sylvestre Ledru 34acbb653a Bug 1619165 - Reformat recent changes to the Google coding style r=andi
First reformat with clang-format 10

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D68802
2020-04-25 09:40:08 +00:00
sotaro 74fce68a04 Bug 1632096 - Forward WebRender gl(ANGLE) error message to gfx critical note r=gw
Differential Revision: https://phabricator.services.mozilla.com/D72123
2020-04-24 11:32:05 +00:00
Narcis Beleuzu 3eaaf8fd77 Backed out changeset d84032238d5f (bug 1632096) for bustages on GLContext.h . CLOSED TREE 2020-04-24 05:46:10 +03:00
sotaro 41ebbb733f Bug 1632096 - Forward WebRender gl(ANGLE) error message to gfx critical note r=gw
Differential Revision: https://phabricator.services.mozilla.com/D72123
2020-04-23 22:58:27 +00:00
Glenn Watson 31dabce5a8 Bug 1632409 - Separate image mask API from the generic clip API in WR. r=kats
Separating out the generic clip definition API into image masks
(and other types in future) makes the serialized data smaller. More
importantly, it will allow us to simplify some of the WR clip internals
in future and optimize the performance spent in clip chain handling.

Differential Revision: https://phabricator.services.mozilla.com/D72125
2020-04-23 20:44:21 +00:00
Glenn Watson a252244f3c Bug 1632389 - Remove image mask support from scroll layer API. r=nical
This is not used, so we can remove it as the first part of modifying
the public clip API in order to allow some internal optimizations.

If callers ever want to make use of this in future, it can be
achieved by placing an image mask clip node in the clip chain for
the primitives in the scroll layer.

Differential Revision: https://phabricator.services.mozilla.com/D72099
2020-04-23 11:39:42 +00:00
Nicolas Silva 119986111e Bug 1631039 - Remove WebRender's recording infrastructre. r=gw
The code is untested, and mostly obsoleted by (multi) frame captures.
Also it gets in the way of some other changes I need to make.

Differential Revision: https://phabricator.services.mozilla.com/D71372
2020-04-22 08:49:38 +00:00
sotaro 7769346520 Bug 1631753 - Rename DCLayer to DCTile r=gw
Differential Revision: https://phabricator.services.mozilla.com/D71744
2020-04-21 19:40:55 +00:00
Jamie Nicol d9a1b3bbde Bug 1604615 - Use optimized shader source in webrender. r=jrmuizel
Add a gecko pref "gfx.webrender.use-optimized-shaders". If enabled,
then when attempting to compile a webrender shader first look for the
optimized source. If the optimized source is not present, emit a
warning and fall back to the unoptimized source.

Use the optimized source by default in wrench, and add the flag
"--use-unoptimized-shaders" to override this.

Differential Revision: https://phabricator.services.mozilla.com/D70033
2020-04-21 10:32:15 +00:00
Martin Stransky e3d81b0f91 Bug 1474281 - Make EGL-provider support OGL. r=jgilbert
In the past EGL only supported GLES, not OGL. This has not been true
for a very long time, so lets support OGL context creation in the EGL
backend.

This allows e.g. the Wayland backend to use OGL contexts, which brings
it on par with the X11/GLX backend.

Differential Revision: https://phabricator.services.mozilla.com/D48096
2020-04-21 05:43:35 +00:00
Andrew Osmond 84731cd82b Bug 1561367 - Implement initial support for capturing multiple frames. r=kvark
This patch adds support for the capture and replaying of multiple frames
during normal operation of Firefox. Ctrl + Shift + 6 starts capturing
and pressing it again stops capturing. It attempts to capture the minimum
amount of data required to replay a sequence for debugging purposes.

There are several known limitations, particularly surrounding replaying
when transitioning between snapshots of the resource cache. It will
reload the entire document set, causing greater delay between frames.
Should you advance too quickly, it may also panic due to a race between
the current frame still being generated, and the new frame resetting the
resource cache state. These should be resolved with time, and the
current implementation should be workable to at least capture/debug most
animated issues with some effort.

It also adds support for loading dynamic properties which is necessary
for accurate replaying of a captured frame (sequence or individual)
which are in the middle of an animation.

Differential Revision: https://phabricator.services.mozilla.com/D59755
2020-04-20 16:03:53 +00:00
sotaro 126d45bceb Bug 1631355 - Remove non virtual surface implementation from DCLayerTree r=gw
Virtual surface implementation is stable now. Removing non virtual surface implementation could simplify DCLayerTree.

Differential Revision: https://phabricator.services.mozilla.com/D71506
2020-04-20 20:01:42 +00:00
Stefan Hindli 84357fecdc Backed out changeset 419be9960357 (bug 1561367) for causing wrench bustages CLOSED TREE 2020-04-20 17:22:53 +03:00
Andrew Osmond 69a83fc13a Bug 1561367 - Implement initial support for capturing multiple frames. r=kvark
This patch adds support for the capture and replaying of multiple frames
during normal operation of Firefox. Ctrl + Shift + 6 starts capturing
and pressing it again stops capturing. It attempts to capture the minimum
amount of data required to replay a sequence for debugging purposes.

There are several known limitations, particularly surrounding replaying
when transitioning between snapshots of the resource cache. It will
reload the entire document set, causing greater delay between frames.
Should you advance too quickly, it may also panic due to a race between
the current frame still being generated, and the new frame resetting the
resource cache state. These should be resolved with time, and the
current implementation should be workable to at least capture/debug most
animated issues with some effort.

It also adds support for loading dynamic properties which is necessary
for accurate replaying of a captured frame (sequence or individual)
which are in the middle of an animation.

Differential Revision: https://phabricator.services.mozilla.com/D59755
2020-04-20 12:53:03 +00:00
Nicolas Silva a7bf827f4d Bug 1630212 - Remove non-tiled blob images. r=jrmuizel
Gecko always tiles blobs. The other code path is untested and a tad complicated, let's remove it.

Differential Revision: https://phabricator.services.mozilla.com/D71021
2020-04-16 20:13:24 +00:00
Glenn Watson f276147e7f Bug 1630480 - Update gleam GL bindings to 0.11.0 r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D71133

--HG--
extra : moz-landing-system : lando
2020-04-16 02:13:31 +00:00
sotaro 5e373d876a Bug 1626142 - Fix canvas handling during resuming on Android r=jnicol
CanvasClientSharedSurface did not handle a case that CanvasClientSharedSurface was re-created, but GLScreenBuffer was not re-created. And RenderCompositorEGL::Pause() detaches all SurfaceTesxtures, but RenderAndroidSurfaceTextureHostOGL did not handle it.

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

--HG--
extra : moz-landing-system : lando
2020-04-14 14:07:30 +00:00
sotaro 7552fe3e1e Bug 1626822 - Add a way to enable WebRender without GPU process on Windows r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D69771

--HG--
extra : moz-landing-system : lando
2020-04-14 03:27:12 +00:00
Kartikaya Gupta 442f54f533 Bug 1566599 - Have the WR hit-test return all results to the caller. r=botond
No functional changes here, just plumbing to allow the caller to
access all the results instead of just the one picked out by
bindings.rs.

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

--HG--
extra : moz-landing-system : lando
2020-04-14 00:43:18 +00:00
Brindusan Cristian 2ad9b58e73 Backed out changeset d05ac327b65e (bug 1626822) for bustages at gfxPlatform.cpp. CLOSED TREE 2020-04-14 03:12:33 +03:00
sotaro fb4859cf94 Bug 1626822 - Add a way to enable WebRender without GPU process on Windows r=jrmuizel
WebRender could be used when WebRender does not use ANGLE. And there is a case that we want to use WebRender with ANGLE for testing.

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

--HG--
extra : moz-landing-system : lando
2020-04-13 23:55:08 +00:00
Dzmitry Malyshau 0e42a4799d Bug 1628772 - Update core-foundation dependency to 0.7 r=kats
Differential Revision: https://phabricator.services.mozilla.com/D70432

--HG--
extra : moz-landing-system : lando
2020-04-11 20:14:41 +00:00
Mihai Alexandru Michis 5beb91b795 Backed out changeset d91a97562b48 (bug 1628772) for causing failures regarding core-foundation.
CLOSED TREE
2020-04-10 03:42:05 +03:00
Dzmitry Malyshau feed464a5d Bug 1628772 - Update core-foundation dependency to 0.7 r=kats
Differential Revision: https://phabricator.services.mozilla.com/D70432

--HG--
extra : moz-landing-system : lando
2020-04-09 20:57:18 +00:00
Kartikaya Gupta cee04b337d Bug 1622360 - Remove the sub-builder machinery. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D69844

--HG--
extra : moz-landing-system : lando
2020-04-06 20:45:14 +00:00
Sylvestre Ledru 0aa6f03cf3 Bug 1519636 - Reformat recent changes to the Google coding style r=jgilbert
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2020-04-05 13:34:58 +00:00
Botond Ballo 0db5983e81 Bug 1627482 - Fix non-unified build errors in gfx/webrender_bindings. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D69736

--HG--
extra : moz-landing-system : lando
2020-04-05 03:49:51 +00:00
Nicolas Silva fdb6027218 Bug 1624627 - Reimplement the slow frame indicator. r=jrmuizel
This removes the WebRender side of the previous slow frame indicator and replace it with a simple implementation that only looks at the CPU time on the render backend and renderer thread involved for building a frame.

A followup patch will add a separate indicator for when the displaylist/ipc/scene bits take too long.

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

--HG--
extra : moz-landing-system : lando
2020-04-02 17:23:15 +00:00
Glenn Watson bdde050f84 Bug 1625816 - Fix rectangle display item bounds being affected by display port clip. r=nical
This can cause extra invalidations in picture caching.

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

--HG--
extra : moz-landing-system : lando
2020-04-01 10:01:26 +00:00
Kartikaya Gupta bd12f9cf60 Bug 1622360 - Remove NonDefaultRenderRootArray. r=jrmuizel
There's only one instance of this left (mSubBuilders) and that can be
easily removed as well.

Depends on D68865

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

--HG--
extra : moz-landing-system : lando
2020-04-01 13:40:13 +00:00
Kartikaya Gupta cd8118eabb Bug 1622360 - Remove the content render root. r=jrmuizel
Nothing creates the content render root anymore, so we can delete
references to it and wipe it off the face of the codebase. This makes
the non-default render root array a zero-length Array which is a template
specialization that lacks things like begin() end end(). So we need
to also rip out any code that tries to iterate these things, in order
to get compilation to succeed. The code would be a no-op anyway now
that there are no non-default render roots left.

Depends on D68864

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

--HG--
extra : moz-landing-system : lando
2020-04-01 13:39:12 +00:00
Kartikaya Gupta 0fc597f2c2 Bug 1622360 - Remove the popover render root references. r=jrmuizel
Nothing uses the popover render root any more, so we can assume
render_root_variable == Popover is always false.

Depends on D68862

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

--HG--
extra : moz-landing-system : lando
2020-04-01 13:38:23 +00:00
Nicolas Silva 430e8ef7b4 Bug 1625220 - Use euclid 0.20.8. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D68469

--HG--
extra : moz-landing-system : lando
2020-03-31 12:41:52 +00:00
Stefan Hindli 73e4464101 Backed out 3 changesets (bug 1625220) for causing wrench bustages CLOSED TREE
Backed out changeset fbeb908b3513 (bug 1625220)
Backed out changeset 793808082134 (bug 1625220)
Backed out changeset 17bf8121665a (bug 1625220)
2020-03-31 12:59:52 +03:00
Nicolas Silva 70311638fb Bug 1625220 - Use euclid 0.20.8. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D68469

--HG--
extra : moz-landing-system : lando
2020-03-31 09:36:39 +00:00
Markus Stange 43978b79e6 Bug 1626114 - Remove unused update_program_cache. r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D68931

--HG--
extra : moz-landing-system : lando
2020-03-30 23:37:29 +00:00
Miko Mynttinen 9b727b1e0b Bug 1624125 - Track display list changes in DisplayItemCache r=jrmuizel
This is needed because display lists and DisplayItemCache have different lifetimes. For example, display lists can outlive WebRenderLayerManager when device reset occurs.

A slightly nicer way of fixing this would be to couple DisplayItemCache with nsDisplayList or nsDisplayListBuilder. This is would currently require a lot of refactoring to look nice, because the painting code still supports non-retained display lists and non-WR code paths.

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

--HG--
extra : moz-landing-system : lando
2020-03-27 16:49:37 +00:00
Sylvestre Ledru 180e76f20c Bug 1617369 - Reformat recent rust changes r=webdriver-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D67563

--HG--
extra : moz-landing-system : lando
2020-03-20 11:36:56 +00:00
sotaro bfdd961bd3 Bug 1593179 - Enable gfx.webrender.max-partial-present-rects by default on Windows r=nical
Differential Revision: https://phabricator.services.mozilla.com/D67082

--HG--
extra : moz-landing-system : lando
2020-03-17 10:26:50 +00:00
Miko Mynttinen ba0e838277 Bug 1614655 - Part 2: Allow 1:n mapping of Gecko - WR display items r=jrmuizel
This patch changes the underlying storage for WR display items in DisplayItemCache
from Vec<Option<CachedDisplayItem> to Vec<Vec<CachedDisplayItem>>.
This allows storing multiple WebRender display items for one Gecko display item.

The storage is populated by traversing BuiltDisplayList extra data portion
in display list format, which is roughly as follows:
RetainedItems(key k1)
Item1(..)
RetainedItems(key k2)
ItemN(..)
ItemN+1(..)

This would store Item1 under key k1, and ItemN and ItemN+1 under the key k2,
where k1 and k2 are arbitrary unique identifiers (currently of type uint16_t).

The entries in the storage are accessed by DisplayItemCache::get_iterator(key),
which is called by BuiltDisplayListIter, whenever it encounters a display item
DisplayItem::ReuseItems(key).

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

--HG--
extra : moz-landing-system : lando
2020-03-18 23:47:05 +00:00
Miko Mynttinen a6fe46df99 Bug 1614655 - Part 1: Remove item_key from CommonItemProperties r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D66442

--HG--
extra : moz-landing-system : lando
2020-03-18 23:46:27 +00:00
Razvan Maries e153e0a3e1 Backed out 3 changesets (bug 1614655) for WebRender bustages. CLOSED TREE
Backed out changeset e79e84e8819c (bug 1614655)
Backed out changeset cc263e909c61 (bug 1614655)
Backed out changeset 10897d6106a8 (bug 1614655)
2020-03-19 00:49:08 +02:00
Miko Mynttinen ac6d4c087e Bug 1614655 - Part 2: Allow 1:n mapping of Gecko - WR display items r=jrmuizel
This patch changes the underlying storage for WR display items in DisplayItemCache
from Vec<Option<CachedDisplayItem> to Vec<Vec<CachedDisplayItem>>.
This allows storing multiple WebRender display items for one Gecko display item.

The storage is populated by traversing BuiltDisplayList extra data portion
in display list format, which is roughly as follows:
RetainedItems(key k1)
Item1(..)
RetainedItems(key k2)
ItemN(..)
ItemN+1(..)

This would store Item1 under key k1, and ItemN and ItemN+1 under the key k2,
where k1 and k2 are arbitrary unique identifiers (currently of type uint16_t).

The entries in the storage are accessed by DisplayItemCache::get_iterator(key),
which is called by BuiltDisplayListIter, whenever it encounters a display item
DisplayItem::ReuseItems(key).

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

--HG--
extra : moz-landing-system : lando
2020-03-18 17:09:51 +00:00
Miko Mynttinen 237ad6cea5 Bug 1614655 - Part 1: Remove item_key from CommonItemProperties r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D66442

--HG--
extra : moz-landing-system : lando
2020-03-18 17:08:49 +00:00
Jeff Muizelaar f0d960cc2b Bug 1622327. Add support for adding profiling event markers to WebRender. r=kvark
Also add some texture cache reallocation events.

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

--HG--
extra : moz-landing-system : lando
2020-03-14 06:56:36 +00:00
Nicolas Silva 560b01ff35 Bug 1618116 - Remove synchronous hit testing from WebRender's C++ wrapper. r=botond,kats
In addition:
 - Move the fast hit tester to the rust side of the bindings.
 - Avoid blocking by requesting a hit tester early and only blocking if the request isn't delivered by the time of the first hit test query.

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

--HG--
extra : moz-landing-system : lando
2020-03-17 10:45:31 +00:00
Glenn Watson 1d0e9e389a Bug 1622720 - Add support for the tracy frame profiler to webrender. r=nical,jrmuizel
This patch removes the old thread_profiler bindings, and adds
support for profiling WR with the tracy profiler, which is a
much more advanced frame profiler.

Since it's very lightweight, and only instruments annotated CPU
and GPU zones, it can retain very large profiles, allowing
fine grained analysis of thread interactions, CPU spikes etc.

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

--HG--
extra : moz-landing-system : lando
2020-03-16 22:24:33 +00:00
Lee Salzman ea4d4f305a Bug 1622592 - add some padding to SWGL composition buffer to account for SIMD masking. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D66992

--HG--
extra : moz-landing-system : lando
2020-03-16 15:12:25 +00:00
Hiroyuki Ikezoe 72ced063bb Bug 1621474 - Factor out a generic function to convert WrAnimationPropertyValue<T> array into Vec<PropertyValue<T>>. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D66330

--HG--
extra : moz-landing-system : lando
2020-03-14 08:37:47 +00:00
Hiroyuki Ikezoe 9e26e7ea21 Bug 1621474 - Add a generic WrAnimationPropertyValue. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D66329

--HG--
extra : moz-landing-system : lando
2020-03-14 08:14:20 +00:00
Hiroyuki Ikezoe bd2bb0fbeb Bug 1621474 - Drop into() calls for LayoutTransform in WrTransformProperty. r=kats
It's not necessary to be converted, it's simply copied.

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

--HG--
extra : moz-landing-system : lando
2020-03-14 08:14:02 +00:00
Ed Lee 68e140412a Bug 1622343 - Automatic code fixes for rustfmt warnings for now-unskipped files r=linter-reviewers,sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D66811

--HG--
extra : moz-landing-system : lando
2020-03-13 23:23:58 +00:00
Lee Salzman 757d9d309f Bug 1612941 - update gleam version to allow implementation of Gl trait. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D65615

--HG--
extra : moz-landing-system : lando
2020-03-13 18:22:45 +00:00
Lee Salzman ec2805f08f Bug 1612941 - add SWGL glue to webrender_bindings. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D65592

--HG--
extra : moz-landing-system : lando
2020-03-13 18:18:14 +00:00
Lee Salzman 9a97a2105a Bug 1612941 - add deinit hook to WR Compositor trait. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D65591

--HG--
extra : moz-landing-system : lando
2020-03-13 18:35:27 +00:00
Coroiu Cristina 819630de4b Backed out changeset 2f04abdb752c (bug 1622327) for build bustage on a CLOSED TREE 2020-03-13 20:02:43 +02:00
Jeff Muizelaar 68bc5d8e20 Bug 1622327. Add support for adding profiling event markers to WebRender. r=kvark
I plan on using this to add texture cache reallocation events.

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

--HG--
extra : moz-landing-system : lando
2020-03-13 17:39:17 +00:00
Sean Feng 5885e10fa0 Bug 1600793 - Make the scrolling input telemetry work for WebRender r=botond,jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D60046

--HG--
extra : moz-landing-system : lando
2020-03-12 17:39:59 +00:00
Miko Mynttinen 8168ef50b5 Bug 1620005 - Refactor WebRender display item caching r=jrmuizel
DisplayItemBuilder now has methods:
```
void StartGroup(nsPaintedDisplayItem* aItem);
void CancelGroup();
void FinishGroup();
bool ReuseItem(nsPaintedDisplayItem* aItem);
```
WebRender display items previously created between calls to StartGroup() and FinishGroup() will be reused by a call to ReuseItem(),
which will push DisplayItem::ReuseItem(key) to WR display list, if the Gecko display item has been retained and reused.
Calling CancelGroup() will discard the display items that have been pushed after calling StartGroup().

For example, inside nsDisplayBackgroundColor::CreateWebRenderCommands():
```
aBuilder.StartGroup(this);
aBuilder.PushRect(r, r, !BackfaceIsHidden(),
                  wr::ToColorF(ToDeviceColor(mColor)));
aBuilder.FinishGroup();
```

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

--HG--
extra : moz-landing-system : lando
2020-03-11 18:13:45 +00:00
Andreea Pavel b154619cbb Backed out changeset 91760460f914 (bug 1620005) for build bustages on a CLOSED TREE 2020-03-11 19:57:28 +02:00
Miko Mynttinen ccd17c0d43 Bug 1620005 - Refactor WebRender display item caching r=jrmuizel
DisplayItemBuilder now has methods:
```
void StartGroup(nsPaintedDisplayItem* aItem);
void CancelGroup();
void FinishGroup();
bool ReuseItem(nsPaintedDisplayItem* aItem);
```
WebRender display items previously created between calls to StartGroup() and FinishGroup() will be reused by a call to ReuseItem(),
which will push DisplayItem::ReuseItem(key) to WR display list, if the Gecko display item has been retained and reused.
Calling CancelGroup() will discard the display items that have been pushed after calling StartGroup().

For example, inside nsDisplayBackgroundColor::CreateWebRenderCommands():
```
aBuilder.StartGroup(this);
aBuilder.PushRect(r, r, !BackfaceIsHidden(),
                  wr::ToColorF(ToDeviceColor(mColor)));
aBuilder.FinishGroup();
```

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

--HG--
extra : moz-landing-system : lando
2020-03-11 17:40:18 +00:00
shindli 8a8793039d Backed out 12 changesets (bug 1612941) for webrender linting bustage CLOSED TREE
Backed out changeset bbb8ec38f354 (bug 1612941)
Backed out changeset cd798d2a0433 (bug 1612941)
Backed out changeset c02c4c5bf7f7 (bug 1612941)
Backed out changeset 2e0c9b9bd507 (bug 1612941)
Backed out changeset ec0fffd12dec (bug 1612941)
Backed out changeset 2d6f65fe6ec0 (bug 1612941)
Backed out changeset dd1a92041bb4 (bug 1612941)
Backed out changeset 3cae17a5ec80 (bug 1612941)
Backed out changeset edfca5676513 (bug 1612941)
Backed out changeset f94d5c7cee41 (bug 1612941)
Backed out changeset 67bba000daba (bug 1612941)
Backed out changeset 60151122db4d (bug 1612941)
2020-03-11 14:28:55 +02:00
Lee Salzman 874d7bc3e6 Bug 1612941 - update gleam version to allow implementation of Gl trait. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D65615

--HG--
extra : moz-landing-system : lando
2020-03-11 12:05:13 +00:00
Lee Salzman 0b6ec64adc Bug 1612941 - add SWGL glue to webrender_bindings. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D65592

--HG--
extra : moz-landing-system : lando
2020-03-11 12:05:07 +00:00
Lee Salzman 41602b16e1 Bug 1612941 - add deinit hook to WR Compositor trait. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D65591

--HG--
extra : moz-landing-system : lando
2020-03-11 12:05:09 +00:00
shindli 0830b5e7f8 Backed out 12 changesets (bug 1612941) for causing bustages CLOSED TREE
Backed out changeset 29f9f745ff65 (bug 1612941)
Backed out changeset d92e03315f8d (bug 1612941)
Backed out changeset 9b1360daa75a (bug 1612941)
Backed out changeset ad7f43d72b08 (bug 1612941)
Backed out changeset 30b28118362a (bug 1612941)
Backed out changeset 76f80dce8875 (bug 1612941)
Backed out changeset 375896f494ae (bug 1612941)
Backed out changeset bd8ba66dc2ac (bug 1612941)
Backed out changeset 54ec5a6e8e45 (bug 1612941)
Backed out changeset 419105739e53 (bug 1612941)
Backed out changeset c198dedeaa1b (bug 1612941)
Backed out changeset 87ddcdfc5fcf (bug 1612941)
2020-03-11 14:01:26 +02:00
Lee Salzman a7cc74fee1 Bug 1612941 - update gleam version to allow implementation of Gl trait. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D65615

--HG--
extra : moz-landing-system : lando
2020-03-11 11:32:40 +00:00