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

1723 Коммитов

Автор SHA1 Сообщение Дата
sotaro b61f0ef673 Bug 1583432 - Set IDCompositionVisual interporation mode to Linear r=nical
Differential Revision: https://phabricator.services.mozilla.com/D46896

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

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

--HG--
extra : moz-landing-system : lando
2019-09-26 12:50:44 +00:00
sotaro 4f131bcbd5 Bug 1572222 - Revert TooManyPendingFrames() logic r=nical
Before  Bug 1570869, new frame was generated if WR does not have a pending frame build task. But  since Bug 1570869 fix, there is a case that new frame generation does not happen even when WR does not have a frame build task.

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

--HG--
extra : moz-landing-system : lando
2019-09-26 09:29:24 +00:00
sotaro f3029ff35f Bug 1583703 - Fix reset handling in RenderThread::HandleFrameOneDoc() r=nical
Move DeviceReset handling before the assert. It is OK, since RendererOGL instance is not re-used after the DeviceReset. It is replaced by a new RendererOGL.

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

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

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

--HG--
extra : moz-landing-system : lando
2019-09-26 01:18:58 +00:00
sotaro 5cce4218d0 Bug 1583482 - Clean up RenderDXGITextureHostOGL r=nical
It is a preparation of Bug 1460499. It adds RenderDXGITextureHostOGL::GetD3D11Texture2D() for use by dc layer.

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

--HG--
extra : moz-landing-system : lando
2019-09-24 23:37:18 +00:00
Timothy Nikkel 3311b640cc Bug 1582273. Pass scrollbar flags from gecko to webrender so it can identify them. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D46587

--HG--
extra : moz-landing-system : lando
2019-09-24 02:40:27 +00:00
arthur.iakab 76632198c8 Backed out changeset da5d5eb153f2 (bug 1582273) for causing tidy bustages. CLOSED TREE 2019-09-24 03:14:33 +03:00
Timothy Nikkel 3c9a0952b5 Bug 1582273. Pass scrollbar flags from gecko to webrender so it can identify them. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D46587

--HG--
extra : moz-landing-system : lando
2019-09-23 23:31:45 +00:00
Noemi Erli c539b288a4 Backed out changeset 0574bc97e2ac (bug 1582273) for causing wrench build bustages CLOSED TREE 2019-09-24 00:55:58 +03:00
Timothy Nikkel 75996b49cc Bug 1582273. Pass scrollbar flags from gecko to webrender so it can identify them. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D46587

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

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

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

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

--HG--
extra : moz-landing-system : lando
2019-09-18 08:00:44 +00:00
Glenn Watson e2052553cc Bug 1581448 - Add support for specifying extra per-primitive flags in WR display lists r=kvark,nical
This patch replaces the is_backface_visible bool in the common
per-primitive data in the display list with a PrimitiveFlags
enumeration. This will allow Gecko to specify extra information
about certain primitive, such as tagging scroll bars.

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

--HG--
extra : moz-landing-system : lando
2019-09-18 07:14:51 +00:00
Andreea Pavel 73383c5230 Backed out changeset af9417bd8105 (bug 1581448) for wrench bustages on a CLOSED TREE 2019-09-18 09:54:23 +03:00
Glenn Watson ff53edd4e5 Bug 1581448 - Add support for specifying extra per-primitive flags in WR display lists r=kvark,nical
This patch replaces the is_backface_visible bool in the common
per-primitive data in the display list with a PrimitiveFlags
enumeration. This will allow Gecko to specify extra information
about certain primitive, such as tagging scroll bars.

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

--HG--
extra : moz-landing-system : lando
2019-09-18 06:27:34 +00:00
Jeff Muizelaar e3fb5c3284 Bug 1570435. Handle merging blobs with different bounds. r=nical
We compute the preserved bounds for each item and see if it's
contained in the invalid area. The gecko side will do the same
computation.

Appologies for duplicating euclid with Box2d type. We can deal with
that in a followup.

The asserts are disabled for now. I tried reenabling them and they
triggered. I haven't had a chance to figure out if they are still
valid.

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

--HG--
extra : moz-landing-system : lando
2019-09-17 18:13:37 +00:00
Nicolas Silva b80a2c908a Bug 1570081 - Put the blob dirty rect in the same space as the drawing commands and visible rect. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D43223

--HG--
extra : moz-landing-system : lando
2019-09-17 09:13:18 +00:00
Nicolas Silva e9915eb02b Bug 1570081 - Support changing the blob image visible rect in WebRender. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D39911

--HG--
extra : moz-landing-system : lando
2019-09-17 09:12:26 +00:00
sotaro 33aa5e8fda Bug 1581307 - Remove wr::WrExternalImageId r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D45937

--HG--
extra : moz-landing-system : lando
2019-09-16 22:13:16 +00:00
sotaro a9eafcf63d Bug 1581370 - Change mUseTripleBuffering to bool r=nical
Differential Revision: https://phabricator.services.mozilla.com/D45949

--HG--
extra : moz-landing-system : lando
2019-09-16 09:40:12 +00:00
Andrew Osmond 811b2b59fa Bug 1574493 - Part 1. Split out repeating and non-repeating images in the display list. r=jrmuizel
Repeating/background images may have extra parameters such the stretch
size and tile spacing, that non-repeating images do not require. By
splitting these apart, we can make it easier to infer what we should do
if snapping changes the size of an image primitive, in addition to
reducing the display list size for non-repeating images.

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

--HG--
extra : moz-landing-system : lando
2019-09-14 16:17:00 +00:00
Ciure Andrei a4046ec458 Backed out 6 changesets (bug 1574493) for causing nested-sticky-2.html to perma fail CLOSED TREE
Backed out changeset 358746636448 (bug 1574493)
Backed out changeset 34aef5498237 (bug 1574493)
Backed out changeset 1f88e2031c76 (bug 1574493)
Backed out changeset 07c588b5ea10 (bug 1574493)
Backed out changeset 0685e8d3510e (bug 1574493)
Backed out changeset 15d4390220c4 (bug 1574493)
2019-09-13 19:26:50 +03:00
Andrew Osmond ef0483f724 Bug 1574493 - Part 1. Split out repeating and non-repeating images in the display list. r=jrmuizel
Repeating/background images may have extra parameters such the stretch
size and tile spacing, that non-repeating images do not require. By
splitting these apart, we can make it easier to infer what we should do
if snapping changes the size of an image primitive, in addition to
reducing the display list size for non-repeating images.

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

--HG--
extra : moz-landing-system : lando
2019-09-13 14:03:13 +00:00
Ciure Andrei 8c3feea58a Backed out 6 changesets (bug 1574493) for causing nested-sticky-1.html to perma fail CLOSED TREE
Backed out changeset fdc25a90b0ef (bug 1574493)
Backed out changeset 0ce3c48c1f79 (bug 1574493)
Backed out changeset 326b9f96614b (bug 1574493)
Backed out changeset b0817c0aee77 (bug 1574493)
Backed out changeset 70d99c264df9 (bug 1574493)
Backed out changeset e5217ab4b668 (bug 1574493)
2019-09-13 16:17:47 +03:00
Andrew Osmond 25917edfc6 Bug 1574493 - Part 1. Split out repeating and non-repeating images in the display list. r=jrmuizel
Repeating/background images may have extra parameters such the stretch
size and tile spacing, that non-repeating images do not require. By
splitting these apart, we can make it easier to infer what we should do
if snapping changes the size of an image primitive, in addition to
reducing the display list size for non-repeating images.

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

--HG--
extra : moz-landing-system : lando
2019-09-13 10:48:22 +00:00
Andreea Pavel 730793a2ef Backed out 5 changesets (bug 1570081) for assertion failure at WebRenderCommandBuilder.cpp on a CLOSED TREE
Backed out changeset 8d4baf4d063a (bug 1570081)
Backed out changeset 14a4451b2781 (bug 1570081)
Backed out changeset ba19640abf33 (bug 1570081)
Backed out changeset 214c815015a8 (bug 1570081)
Backed out changeset 548e4395ee1a (bug 1570081)
2019-09-13 11:24:59 +03:00
Nicolas Silva 04ec40580d Bug 1570081 - Put the blob dirty rect in the same space as the drawing commands and visible rect. r=jrmuizel
Depends on D43222

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

--HG--
extra : moz-landing-system : lando
2019-09-12 15:59:58 +00:00
Nicolas Silva 3bfb23feb3 Bug 1570081 - Support changing the blob image visible rect in WebRender. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D39911

--HG--
extra : moz-landing-system : lando
2019-09-12 15:54:50 +00:00
Bastien Orivel 081b88925b Bug 1580908 - Part 1: Update uuid to 0.7 to dedupe it. r=froydnj
This also removes a dependency on rand 0.4 getting it closer to being
able to remove that.

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

--HG--
extra : moz-landing-system : lando
2019-09-12 21:45:58 +00:00
Gurzau Raul fe4bb6d539 Backed out 6 changesets (bug 1574493) for wrench failures at stacking-context-clip.yaml on a CLOSED TREE.
Backed out changeset 8a8736ac4e25 (bug 1574493)
Backed out changeset 4a3294e88823 (bug 1574493)
Backed out changeset 0c26ecdc1ddc (bug 1574493)
Backed out changeset 11257f7b3ad3 (bug 1574493)
Backed out changeset dcedc286ad9d (bug 1574493)
Backed out changeset 87f216e0753d (bug 1574493)
2019-09-12 18:34:07 +03:00
Andrew Osmond 7cda552aeb Bug 1574493 - Part 1. Split out repeating and non-repeating images in the display list. r=jrmuizel
Repeating/background images may have extra parameters such the stretch
size and tile spacing, that non-repeating images do not require. By
splitting these apart, we can make it easier to infer what we should do
if snapping changes the size of an image primitive, in addition to
reducing the display list size for non-repeating images.

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

--HG--
extra : moz-landing-system : lando
2019-09-12 12:42:37 +00:00
Markus Stange d603768670 Bug 1578330 - Call GetBufferSize after BeginFrame because RenderCompositorANGLE mutates it in BeginFrame. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D45143

--HG--
extra : moz-landing-system : lando
2019-09-09 03:59:15 +00:00
Kristen Wright 885b132251 Bug 1578378 - use 'false' instead of hidden static pref in non-nightly builds r=gw
Falls back to 'false' in non-nightly builds instead of using the gfx.webrender.start-debug-server pref, which is only available in nightly builds.

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

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

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

--HG--
extra : moz-landing-system : lando
2019-09-03 12:36:09 +00:00
Markus Stange 85f866aad1 Bug 1578099 - Use NativeLayer::NextSurfaceAsFramebuffer for WebRender. r=mattwoodrow
Depends on D44325

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

--HG--
extra : moz-landing-system : lando
2019-09-01 22:36:00 +00:00
Sylvestre Ledru 843fae6aee Bug 1577236 - clang-10: Fix -Wimplicit-int-float-conversion warnings in gfx/ r=nical
Differential Revision: https://phabricator.services.mozilla.com/D43776

--HG--
extra : moz-landing-system : lando
2019-08-28 21:31:26 +00:00
Markus Stange 28d283ab15 Bug 1574592 - Remove now-unused CompositorWidget::DoCompositorCleanup again. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D42403

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

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

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

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

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

--HG--
extra : moz-landing-system : lando
2019-08-25 17:43:42 +00:00
Mike Hommey 66d7fe943e Bug 1575420 - Replace MOZ_WIDGET_TOOLKIT value of "gtk3" with "gtk". r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D42765

--HG--
extra : moz-landing-system : lando
2019-08-21 12:25:42 +00:00
Markus Stange 62430de27f Bug 1491442 - Add CompositorWidget::DoCompositorCleanup() to give the widget a chance to clean up any state from PreRender/PostRender on the correct thread. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D40514

--HG--
extra : moz-landing-system : lando
2019-08-16 01:09:26 +00:00
Connor Brewster 04d4ece0af Bug 1178765 - Part 3: Add backdrop-filter display items to Gecko r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D39099

--HG--
extra : moz-landing-system : lando
2019-08-13 22:02:57 +00:00
Connor Brewster dbce0f3810 Bug 1178765 - Part 2: Implement backdrop-filter in WebRender r=gw
Differential Revision: https://phabricator.services.mozilla.com/D39098

--HG--
extra : moz-landing-system : lando
2019-08-13 22:02:44 +00:00
Connor Brewster afa1fcbaed Bug 1178765 - Part 1: Add backdrop-filter WebRender display items r=gw
Differential Revision: https://phabricator.services.mozilla.com/D39097

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

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

--HG--
extra : moz-landing-system : lando
2019-08-13 22:17:47 +00:00
Dzmitry Malyshau 005edf80aa Bug 1570736 - Force disable WR swizzling on Intel 4000 on Mac r=aosmond
Investigation showed that on this platform the texture unit state becomes
corrupted whenever we set the non-identity swizzling (getting garbage from textureSize()).
Given no easy workaround, we disable swizzling for this GPU family on Mac, for now.

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

--HG--
extra : moz-landing-system : lando
2019-08-09 18:57:35 +00:00
Markus Stange c3e76bb3af Bug 1570869 - Add some comments to WindowInfo and reorder members a little. r=nical
Depends on D40375

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

--HG--
extra : moz-landing-system : lando
2019-08-05 12:08:18 +00:00
Markus Stange dd7b882fd0 Bug 1570869 - Inline FrameRenderingComplete into HandleFrameOneDoc. r=nical
Depends on D40374

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

--HG--
extra : moz-landing-system : lando
2019-08-05 12:09:46 +00:00
Markus Stange d4aaf327fd Bug 1570869 - Fold mRender, mDocFramesSeen and mDocFrameCounts into PendingFrameInfo. r=nical
This makes it clear that these belong to a single frame and makes some assumptions explicit.
For example, in the old code, mDocFrameCounts.size() was the same as mPendingFrames.size()
when a pending frame was added, but then the sizes differed during rendering because a frame's
mDocFrameCount would be popped at the beginning of rendering while mPendingFrames would be
popped at the end of rendering.
This modification also makes some clearing of values unnecessary. A new frame always starts out
with cleared values for mDocFramesSeen and mFrameNeedsRender.

This patch also combines the two locks in HandleFrameOneDoc.

Depends on D40373

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

--HG--
extra : moz-landing-system : lando
2019-08-05 12:07:29 +00:00
Markus Stange 6ebb22a9d3 Bug 1570869 - Replace mRenderingCount with a boolean, to make it clear that we are only ever rendering at most one frame. r=nical
The only place that increments mRenderingCount, HandleFrameOneDoc, also synchronously calls FrameRenderingComplete
at the end of the function, which decrements mRenderingCount again. So it can never grow beyond 1.

Depends on D40372

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

--HG--
extra : moz-landing-system : lando
2019-08-05 12:02:38 +00:00
Markus Stange d00dade81c Bug 1570869 - Remove mPendingCount in favor of an accessor. r=nical
Depends on D40371

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

--HG--
extra : moz-landing-system : lando
2019-08-05 11:59:35 +00:00
Markus Stange 17df58880c Bug 1570869 - Inline IncRenderingFrameCount into HandleFrame. r=sotaro
IncRenderingFrame only had one caller. Inlining it into HandleFrame makes it clearer
how the values in mWindowInfos are mutated and in what order calls happen.
This also renames HandleFrame to HandleFrameOneDoc, because we're expecting one call
per document before we actually trigger the render.

Depends on D40370

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

--HG--
extra : moz-landing-system : lando
2019-08-06 07:01:15 +00:00
Markus Stange e36f7409a9 Bug 1570869 - Combine pending frame info in RenderThread's WindowInfo. r=nical
Differential Revision: https://phabricator.services.mozilla.com/D40370

--HG--
extra : moz-landing-system : lando
2019-08-05 11:54:31 +00:00
Barret Rennie c32eee8ff0 Bug 1566915 - Do not ref count the CompositionRecorder r=mstange
Now that there is only ever a single handle to the `CompositionRecorder`, it no
longer needs to be ref-counted. And since the `WebRenderCompositionRecorder` is
owned exclusively by the `RenderThread`, it no longer needs a mutex. All the
code that resulted from having handles to the `WebRenderCompositionRecorder` on
two different threads is now no longer necessary.

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

--HG--
extra : moz-landing-system : lando
2019-07-31 18:28:47 +00:00
Barret Rennie 4374f75f51 Bug 1566915 - Write collected frames from the composition recorder on the render thread r=kvark
On macOS, if we try to write the collected frames from the
`CompositorBridgeParent` we will not have an active GL context, resulting in a
crash. Writing the frames from the `RenderThread` solves this problem.

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

--HG--
extra : moz-landing-system : lando
2019-07-31 18:28:34 +00:00
Dzmitry Malyshau 4d7909d785 Bug 1548339 - WR swizzle configuration of texture units r=gw
Allow the swizzle to be configurable with a texture binding. This is still experimental and needs to be tested well on all platforms.
Basic approach is the following:
  - WR device figures out how it can use BGRA and makes the texture cache format configurable at run-time. It tries to make the uploads to the shared texture cache pages to be done without any driver conversions, and without extra memory allocated.
  - it also reports the preferred input format for the images, which may be different from the texture cache format
  - if WR texture cache is asked to allocate a shared texture with a different (swizzled) format from the preferred, it associates the cache entry with a swizzle
  - the swizzle becomes a part of the `SourceTexture`, which affects batch splitting
  - when a texture reaches binding by GL device, it checks whether the current swizzle on this texture doesn't match the given one, and configures the texture sampling accordingly
  - we can't use blits with swizzling, so when that needs to happen we use `cs_copy` path, which is now mostly rewritten

The idea is that Gecko would ask WR for the preferred format and configure its image decoding to produce image data that doesn't require any swizzling.

The PR changes existing texture upload (and batching) paths. On Linux, if texture storage is available, we now use it and provide the data as RGBA, assuming no conversion by the driver. The swizzling kicks in when we sample this data in the shader. On Windows/Angle we use BGRA as an internal format for texture cache and expect Gecko to provide BGRA data, this should be unchanged.

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

--HG--
extra : moz-landing-system : lando
2019-07-26 14:55:50 +00:00
Jean-Yves Avenard de19fb7f7e Bug 1543359 - P6. Add backend for color range information. r=mattwoodrow.
Add code for YCbCr buffer and IOSurface backend.

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

--HG--
extra : moz-landing-system : lando
2019-07-26 08:45:31 +00:00
Narcis Beleuzu e84980d8b1 Backed out 15 changesets (bug 1543359) for wrench bustages on image.rs . CLOSED TREE
Backed out changeset 548006270186 (bug 1543359)
Backed out changeset c9585e9d9f3c (bug 1543359)
Backed out changeset 1c7ca95a2a9b (bug 1543359)
Backed out changeset d742d80b892f (bug 1543359)
Backed out changeset 210eee703fd9 (bug 1543359)
Backed out changeset 4eb933d55d88 (bug 1543359)
Backed out changeset fb9b71ed9f4b (bug 1543359)
Backed out changeset 98b968443458 (bug 1543359)
Backed out changeset a85bd4691bea (bug 1543359)
Backed out changeset b576317853e9 (bug 1543359)
Backed out changeset 095bca5c9b1a (bug 1543359)
Backed out changeset 48eb0ebf9f2e (bug 1543359)
Backed out changeset b22b0eb708b8 (bug 1543359)
Backed out changeset 52187d9320b1 (bug 1543359)
Backed out changeset fa6792c1c2e8 (bug 1543359)
2019-07-26 11:40:33 +03:00
Jean-Yves Avenard 37515d5cc9 Bug 1543359 - P6. Add backend for color range information. r=mattwoodrow.
Add code for YCbCr buffer and IOSurface backend.

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

--HG--
extra : moz-landing-system : lando
2019-07-26 06:13:37 +00:00
Cosmin Sabou ae7e8fbf55 Backed out 14 changesets (bug 1543359) for causing build bustages. CLOSED TREE
Backed out changeset 87c99ef85813 (bug 1543359)
Backed out changeset cd0afc5758ba (bug 1543359)
Backed out changeset 101ac87ff017 (bug 1543359)
Backed out changeset 348e748e3451 (bug 1543359)
Backed out changeset d9e937f5caf4 (bug 1543359)
Backed out changeset 2f4eb6501552 (bug 1543359)
Backed out changeset 0d316ef8c668 (bug 1543359)
Backed out changeset bf238b58c694 (bug 1543359)
Backed out changeset 496f206d03d6 (bug 1543359)
Backed out changeset 7c3a1f23baa8 (bug 1543359)
Backed out changeset 90fff717198b (bug 1543359)
Backed out changeset b2ce591ca398 (bug 1543359)
Backed out changeset a63968f077e3 (bug 1543359)
Backed out changeset ca660ab1e0c1 (bug 1543359)
2019-07-26 07:39:11 +03:00
Jean-Yves Avenard 63be56621d Bug 1543359 - P6. Add backend for color range information. r=mattwoodrow.
Add code for YCbCr buffer and IOSurface backend.

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

--HG--
extra : moz-landing-system : lando
2019-07-22 08:24:30 +00:00
Nicholas Nethercote 18fae65f38 Bug 1563139 - Remove StaticPrefs.h. r=glandium
This requires replacing inclusions of it with inclusions of more specific prefs
files.

The exception is that StaticPrefsAll.h, which is equivalent to StaticPrefs.h,
and is used in `Codegen.py` because doing something smarter is tricky and
suitable for a follow-up. As a result, any change to StaticPrefList.yaml will
still trigger recompilation of all the generated DOM bindings files, but that's
still a big improvement over trigger recompilation of every file that uses
static prefs.

Most of the changes in this commit are very boring. The only changes that are
not boring are modules/libpref/*, Codegen.py, and ServoBindings.toml.

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

--HG--
extra : moz-landing-system : lando
2019-07-26 01:10:23 +00:00
Alexis Beingessner bb09834391 Bug 1547351 - Automatically set content process render root r=kats
This implements the idea of automatically setting a content proc's
render root based on the render root enclosing the iframe that
points to it. There was a bit of cleanup in here that was a bit
tricky to extract from the core patch revolving around how we
use the Api(...) helper. This was to avoid the situation where
we use the Api(...) helper before our render root is initialized,
when we don't actually have to. I.e., when we just want the root
WebRenderAPI in all cases.

An alternative to this approach could be to fully built out the
WebRender transactions and just queue those up to be sent. However,
transaction building has various side effects which are committed
before the transaction is actually sent, so we would have to build
out some scheme for deferring those as well. This seemed simpler.

Patch primarily written by :dthayer

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

--HG--
extra : moz-landing-system : lando
2019-07-24 14:10:56 +00:00
Martin Stransky 6a432bbfd1 Bug 1565583 - Handle missing mEGLSurface in DEBUG mode to avoid GL error, r=sotaro
Differential Revision: https://phabricator.services.mozilla.com/D37873

--HG--
extra : moz-landing-system : lando
2019-07-23 10:59:05 +00:00
sotaro 70e1a770b5 Bug 1567816 - Remove WebRenderTextureHostWrapper r=nical
Differential Revision: https://phabricator.services.mozilla.com/D38837

--HG--
extra : moz-landing-system : lando
2019-07-22 08:03:59 +00:00
Jamie Nicol 45b50b0912 Bug 1566211 - Handle filesystem errors in webrender program cache. r=bholley
A few potential error cases were being unwrapped, resulting in a very
small number of crashes. These errors can be safely ignored as the
program cache is non-critical, so this change makes us log the error
and continue rather than panicking.

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

--HG--
extra : moz-landing-system : lando
2019-07-19 16:44:05 +00:00
Nicholas Nethercote 7974362afd Bug 1567329 - Append `_AtStartup` to `once` static pref getters. r=erahm
Currently it's completely unclear at use sites that the getters for `once`
static prefs return the pref value from startup, rather than the current pref
value. (Bugs have been caused by this.) This commit improves things by changing
the getter name to make it clear that the pref value obtained is from startup.

This required changing things within libpref so it distinguishes between the
"base id" (`foo_bar`) and the "full id" (`foo_bar` or
`foo_bar_DoNotUseDirectly` or `foo_bar_AtStartup` or
`foo_bar_AtStartup_DoNotUseDirectly`; the name used depends on the `mirror` and
`do_not_use_directly` values in the YAML definition.) The "full id" is used in
most places, while the "base id" is used for the `GetPrefName_*` and
`GetPrefDefault_*` functions.

(This is a nice demonstration of the benefits of the YAML file, BTW. Making
this change with the old code would have involved adding an entry to every
single pref in StaticPrefList.h.)

The patch also rejigs the comment at the top of StaticPrefList.yaml, to clarify
some things.

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

--HG--
extra : moz-landing-system : lando
2019-07-22 02:10:14 +00:00
Andreea Pavel c07a5d8ccc Merge mozilla-inbound to mozilla-central a=merge 2019-07-20 12:51:57 +03:00
Csoregi Natalia 660053d99f Merge mozilla-central to mozilla-inbound. CLOSED TREE 2019-07-19 18:31:03 +03:00
Nicolas Silva 0dc4fc1dc2 Bug 1557208 - Leak WebRender's thread pool. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D38368

--HG--
extra : source : 7b53914d63d0767d9236afedafebbb7e1193ec77
2019-07-17 18:29:53 +02:00
Nicolas Silva a58ba90d31 Bug 1567241 - Update to euclid 0.20. r=kvark, emilio.
Differential Revision: https://phabricator.services.mozilla.com/D38530

--HG--
extra : source : d65512e23a13164f540430ff0c85a1f2a147d8a0
2019-07-18 22:54:16 +02:00
sotaro 8f7c96a032 Bug 1567347 - Add option of using DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL without DirectComposition r=nical
Differential Revision: https://phabricator.services.mozilla.com/D38588

--HG--
extra : moz-landing-system : lando
2019-07-19 09:26:03 +00:00
Markus Stange daf06d791b Bug 1565668 - Add back-pressure to WebRender+OGL by implementing RenderCompositorOGL::WaitForGPU(). r=sotaro
Without CoreAnimation, back-pressure was applied by SwapBuffers: On a
double-buffered NSOpenGLContext which is bound to an NSView, [context flushBuffer]
waits for the previous frame to be finished. With CoreAnimation, the context
is no longer bound to an NSView, and SwapBuffers acts as a regular glFlush.
glFlush on its own does not prevent overproduction.

If we submit GPU work at a faster rate than the GPU can handle, we end up
delaying the window server's GPU work. This can cause the window server to skip
frames. So even if Gecko can produce frames at 60FPS, the window server might
only present those frames at 30FPS, skipping every second frame.

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

--HG--
extra : moz-landing-system : lando
2019-07-17 20:46:39 +00:00
Markus Stange 51a3779fea Bug 1565668 - Make WebRender draw into the default framebuffer. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D26624

--HG--
extra : moz-landing-system : lando
2019-07-17 20:45:54 +00:00
Sylvestre Ledru e16ed69f90 Bug 1519636 - Fix some conflicts r=bustage . CLOSED TREE
--HG--
extra : histedit_source : a2071905aa294d25be82b0c29e27fbb8a2e4ccc6
2019-07-16 10:04:55 +02:00
Sylvestre Ledru e77bfc655d Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-07-16 07:33:44 +00:00
Jeff Muizelaar 81db073a18 Bug 1565904. Move the blob metadata from image space to an absolute space. r=nical
This is a follow up to bug 1564655. It removes the offset from ToDeviceSpace
and thus moves item rects into absolute space which is now the same coordinate
space as the recordings are in.

We also adjust item bounds for fallback blobs.

Some additional changes that need happen to:

1. In Moz2DImageRenderer we can reunify the origin because the recording and
the recording metadata return to using the same coordinate space.

2. The calls to PushLayer can return to using the item bounds
which are now in the same coordinate space.

3. This dirty rect which remains in images space is adjusted during merging.

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

--HG--
extra : moz-landing-system : lando
2019-07-15 15:24:54 +00:00
Andreea Pavel 6665820f48 Backed out 3 changesets (bug 1547351) for assertion failures on a CLOSED TREE
Backed out changeset 77ef8e8bc669 (bug 1547351)
Backed out changeset b594f8e47025 (bug 1547351)
Backed out changeset 6e5d426cd313 (bug 1547351)
2019-07-15 17:47:40 +03:00
Alexis Beingessner 81f39dd2b0 Bug 1547351 - Automatically set content process render root r=kats
This implements the idea of automatically setting a content proc's
render root based on the render root enclosing the iframe that
points to it. There was a bit of cleanup in here that was a bit
tricky to extract from the core patch revolving around how we
use the Api(...) helper. This was to avoid the situation where
we use the Api(...) helper before our render root is initialized,
when we don't actually have to. I.e., when we just want the root
WebRenderAPI in all cases.

An alternative to this approach could be to fully built out the
WebRender transactions and just queue those up to be sent. However,
transaction building has various side effects which are committed
before the transaction is actually sent, so we would have to build
out some scheme for deferring those as well. This seemed simpler.

Patch primarily written by :dthayer

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

--HG--
extra : moz-landing-system : lando
2019-07-15 13:18:44 +00:00
Jeff Muizelaar 00f87f386d Bug 1564655. blob: Make the recording use absolute coordinates. r=nical
Currently items are painted with a context that has a transform of
-mLayerBounds.TopLeft().  This means that if TopLeft() changes the commands
will be in the wrong place because the -TopLeft() offset is baked into the
recording.

I don't think we've ever needed to support painting without this transformed
baked in so there were some infrastructure changes that needed to be made to
make this possible. Most of the problems come from the use of
gfxContext::GetClipExtents which expose the bounds of the underlying surface.
The biggest of these was fixed by the CreateClippedDrawTarget rewrite. The rest
should be handled by ensuring that the DrawTarget has bounds that are at least
as big as the union of the individual item bounds. i.e. GetClipExtents should
never intersect with bounds of the item.

This change has a couple of parts:

1. Store mLayerBounds.TopLeft() in the recording so that it will be subtracted
during replay

2. Use mLayerBounds as the Rect of the RecordingDrawTarget

3. Don't include mLayerBounds.TopLeft() in the transform during recording.

4. Adjust the dirty rect by recordingOrigin before we use it as a clip so that
it stays in the right place.

5. In PaintContainerItem the bounds parameter of PushLayer is in device space
so we need to account for the shift in the location of device space in the
DrawTargetRecording.

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

--HG--
extra : moz-landing-system : lando
2019-07-14 00:02:03 +00:00
Jeff Muizelaar 81aac9064d Bug 1563770. Always include a visible rect with blob images. r=nical
I suspect we may change things more in the future as we blob's size
just be the visible rect but this is an incremental step in the right
direction.

It also includes some changes to make sure that we always update our
tiles appropriately.

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

--HG--
extra : moz-landing-system : lando
2019-07-13 19:07:05 +00:00
Jeff Muizelaar c0299a4309 Bug 1563775. Include the recording origin in the stream. r=nical
This will let us do the subtraction of the recording origin during
playback instead of during recording.

It will also let us merge recordings that have different origins.

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

--HG--
extra : moz-landing-system : lando
2019-07-12 18:20:29 +00:00
Jeff Muizelaar ab81cbdb67 Bug 1565580. Apply accidentally dropped review comments.
Differential Revision: https://phabricator.services.mozilla.com/D37901

--HG--
extra : moz-landing-system : lando
2019-07-12 18:16:07 +00:00
Jeff Muizelaar 3b81239430 Bug 1565580. Improve blob metadata deserialization code. r=Gankro
This removes duplication and makes it a bit safer by using ConvertFromBytes to
do an unaligned read of the indexOffset.

Also, inner classes can't have template methods. Who knew.

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

--HG--
extra : moz-landing-system : lando
2019-07-12 15:09:01 +00:00
Mihai Alexandru Michis fb4bad51c9 Backed out 2 changesets (bug 1547351) for causing bustages in nsTArray.h CLOSED TREE
Backed out changeset 46c9b479034f (bug 1547351)
Backed out changeset 4689b2870416 (bug 1547351)
2019-07-12 17:37:24 +03:00
Alexis Beingessner 6126cdbed2 Bug 1547351 - Automatically set content process render root r=kats
This implements the idea of automatically setting a content proc's
render root based on the render root enclosing the iframe that
points to it. There was a bit of cleanup in here that was a bit
tricky to extract from the core patch revolving around how we
use the Api(...) helper. This was to avoid the situation where
we use the Api(...) helper before our render root is initialized,
when we don't actually have to. I.e., when we just want the root
WebRenderAPI in all cases.

An alternative to this approach could be to fully built out the
WebRender transactions and just queue those up to be sent. However,
transaction building has various side effects which are committed
before the transaction is actually sent, so we would have to build
out some scheme for deferring those as well. This seemed simpler.

Patch primarily written by :dthayer

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

--HG--
extra : moz-landing-system : lando
2019-07-12 14:14:22 +00:00
Jeff Muizelaar b2c74a942a Bug 1565566. blob: Improve convert_from_bytes. r=Gankro
This minimizes regret by requiring T: Copy and switches
to read_unaligned() because the pointer can be unaligned.

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

--HG--
extra : moz-landing-system : lando
2019-07-12 13:36:17 +00:00
Daniel Varga 883bfd385e Merge mozilla-inbound to mozilla-central. a=merge 2019-07-12 12:58:03 +03:00
Gurzau Raul 09c2a7cb24 Backed out 2 changesets (bug 1547351) for build bustages at WebRenderBridgeParent.cpp on a CLOSED TREE.
Backed out changeset b294575c279c (bug 1547351)
Backed out changeset 69260373f95c (bug 1547351)
2019-07-12 06:47:35 +03:00
Alexis Beingessner 7d0ec2c7ed Bug 1547351 - Automatically set content process render root r=kats
This implements the idea of automatically setting a content proc's
render root based on the render root enclosing the iframe that
points to it. There was a bit of cleanup in here that was a bit
tricky to extract from the core patch revolving around how we
use the Api(...) helper. This was to avoid the situation where
we use the Api(...) helper before our render root is initialized,
when we don't actually have to. I.e., when we just want the root
WebRenderAPI in all cases.

An alternative to this approach could be to fully built out the
WebRender transactions and just queue those up to be sent. However,
transaction building has various side effects which are committed
before the transaction is actually sent, so we would have to build
out some scheme for deferring those as well. This seemed simpler.

Patch primarily written by :dthayer

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

--HG--
extra : moz-landing-system : lando
2019-07-12 03:19:28 +00:00
Csoregi Natalia fcccd2b6b0 Merge mozilla-central to autoland. CLOSED TREE 2019-07-12 02:06:45 +03:00
Csoregi Natalia d7d499fe52 Merge inbound to mozilla-central. a=merge 2019-07-12 02:00:51 +03:00
Csoregi Natalia b798889d4a Backed out changeset 5c4b8d62324c (bug 1563775) for reftest crashes. a=backout 2019-07-12 01:17:41 +03:00
Csoregi Natalia 20e91a0890 Backed out changeset 5c88b35cc6f5 (bug 1563770) for causing bug 1565231. a=backout 2019-07-11 23:14:01 +03:00
Brindusan Cristian 73b4ae530d Merge mozilla-central to inbound. a=merge CLOSED TREE 2019-07-11 19:23:36 +03:00
Brindusan Cristian fd86c6d641 Backed out changeset cb1d78b00e25 (bug 1563775) on request from jrmuizel for causing Bug 1565231. a=backout 2019-07-11 17:40:51 +03:00
sotaro f8e55ff471 Bug 1563432 - Remove ID3D11Device::GetDeviceRemovedReason() call from RenderCompositorANGLE::BeginFrame() r=nical
Differential Revision: https://phabricator.services.mozilla.com/D36866

--HG--
extra : moz-landing-system : lando
2019-07-11 09:41:38 +00:00
Jeff Muizelaar e146f6712d Bug 1563775. Include the recording origin in the stream. r=nical a=reland
This will let us do the subtraction of the recording origin during
playback instead of during recording.

It will also let us merge recordings that have different origins.

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

--HG--
extra : source : cb1d78b00e25dd7fcfec86216c7a83c85ce9a982
extra : histedit_source : 68a31189f05998ba3b8a29a624d7ebe37636c4d9
2019-07-10 14:01:34 +00:00