Commit Graph

148 Commits

Author SHA1 Message Date
Simon Giesecke
8adc4d231c Bug 1691894 - Replace several suboptimal uses of Put after Get by GetOrInsertWith or WithEntryHandle. r=xpcom-reviewers,necko-reviewers,kmag,valentin,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D104849
2021-02-15 15:12:17 +00:00
smolnar
03bc7728ba Backed out 5 changesets (bug 1691894) for causing hazard failures in nsXULPrototypeCache. CLOSED TREE
Backed out changeset 22dc870ee609 (bug 1691894)
Backed out changeset 58c31e9d6ae3 (bug 1691894)
Backed out changeset 7483e84149d8 (bug 1691894)
Backed out changeset f977d6cfa973 (bug 1691894)
Backed out changeset db4503476f34 (bug 1691894)
2021-02-15 16:43:23 +02:00
Simon Giesecke
f04f372040 Bug 1691894 - Make Put accept DataType instead of wrapping UserDataType. r=xpcom-reviewers,necko-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D104850
2021-02-15 10:04:46 +00:00
Simon Giesecke
1a0fd1ffb7 Bug 1691894 - Replace several suboptimal uses of Put after Get by GetOrInsertWith or WithEntryHandle. r=xpcom-reviewers,necko-reviewers,kmag,valentin,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D104849
2021-02-15 10:04:45 +00:00
sotaro
acd0ec363d Bug 1687427 - Update display list when ExternalCompositing is changed r=mattwoodrow
When when TexutureHost's SupportsExternalCompositing is changed, display list needs to be updated.

Differential Revision: https://phabricator.services.mozilla.com/D102264
2021-01-19 21:42:57 +00:00
Matt Woodrow
c6619a7301 Bug 1666607 - Set initial valuye for mRotation. r=jrmuizel
Depends on D99741

Differential Revision: https://phabricator.services.mozilla.com/D99742
2020-12-15 21:51:49 +00:00
Simon Giesecke
b1b15dcb38 Bug 1676357 - Avoid including Layers.h in header files. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D96538

Depends on D96537
2020-11-23 16:09:05 +00:00
Matt Woodrow
d517b70ca2 Bug 1666055 - Disable buffer textures as external compositor surfaces on MacOS. r=lsalzman
When using the native RenderCompositor+SWGL on MacOS, we don't support passing buffer textures directly to the compositor.

Differential Revision: https://phabricator.services.mozilla.com/D93179
2020-10-14 07:56:47 +00:00
sotaro
9ecd4df2c1 Bug 1670148 - Fix release fence handling at AsyncImagePipelineManager on Android r=jnicol
By Bug 1661189, AndroidHardwareBuffer owning TextureHosts became to be stored in mTextureHostsUntilRenderSubmitted.

AndroidHardwareBuffer usage is not enabled on gecko.

Differential Revision: https://phabricator.services.mozilla.com/D93050
2020-10-09 14:15:52 +00:00
sotaro
a14f794f2c Bug 1665846 - Re-push DisplayItem when video overlay is disabled r=nical
gfxVars::UseWebRenderDCompVideoOverlayWin() could be changed from true to false, when DCompVideoOverlay task is failed. In this case, DisplayItems need to be re-pushed to WebRender for disabling video overlay.

If DisplayItem is not re-pushed, overlay video rendering is not updated.

Differential Revision: https://phabricator.services.mozilla.com/D90656
2020-09-18 08:29:57 +00:00
sotaro
91d0ed03d2 Bug 1658684 - Add android Fence handling to WebRender r=nical
Release fence is delivered from RenderCompositorEGL to WebRenderImageHost via AsyncImagePipelineManager. And the fence is sent to client side by ImageBridgeParent.

Differential Revision: https://phabricator.services.mozilla.com/D88158
2020-09-02 14:21:36 +00:00
sotaro
5bff0a4154 Bug 1658005 - Unify RenderTextureHost async function calls r=nical,jnicol
The following functions are asynchronously called by a bit different ways. It seems not good. It seems better to unify them.
PrepareForUse()
NofityForUse()
NotifyNotUsed()

Differential Revision: https://phabricator.services.mozilla.com/D87709
2020-08-21 07:32:47 +00:00
sotaro
ffe3210631 Bug 1659233 - Remove AsyncImagePipelineManager::mPendingUpdates r=nical
It is not necessary with current gecko.

Differential Revision: https://phabricator.services.mozilla.com/D87158
2020-08-19 09:32:02 +00:00
Matt Woodrow
46ec29c048 Bug 1657523 - Compute the scale from size for async image pipelines in the compositor process, so that we get the size matching the current texture. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D86132
2020-08-06 21:09:55 +00:00
Matt Woodrow
bf3bac9774 Bug 1653166 - Add rotation support to computed reference frames and use them for <video>. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D85104
2020-08-04 01:15:04 +00:00
Glenn Watson
8978ee55ca Bug 1656820 - Remove content_size from scene pipeline. r=nical
Previously, the content_size was used when defining an iframe
to set the size of the root scrollable area.

However, this was never useful (the root pipeline scroll frame
is not considered a scroll root, it's more of a placeholder).
The scroll frame for content is typically defined within the
iframe display list (which also allows non-scrolled content
within the iframe, such as a background rectangle color).

The existing content_size was causing problems in Gecko because
there are some snapping / rounding inaccuracies with fractional
DPI ratios, resulting in root scroll frames with +/- 1 pixel
scrollable size.

The simplest fix for this is to remove content_size altogether
and rely on the iframe display item to define the content size
of the root scroll frame for a pipeline.

Differential Revision: https://phabricator.services.mozilla.com/D85719
2020-08-03 20:57:30 +00:00
Miko Mynttinen
7cd8140ef5 Bug 1536515 - Part 3: Add RenderExternalTextureHost r=sotaro
Differential Revision: https://phabricator.services.mozilla.com/D80506
2020-07-07 17:57:22 +00:00
Andrew Osmond
5396cc95a3 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
sotaro
41303dc6db 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
Kartikaya Gupta
14ef0341a8 Bug 1622360 - Remove unused render root argument to AsyncImagePipelineManager. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D74849
2020-05-12 14:29:33 +00:00
Kartikaya Gupta
5bded3eca9 Bug 1622360 - Stop storing unused render root in AsyncImagePipeline. r=jrmuizel
Depends on D74847

Differential Revision: https://phabricator.services.mozilla.com/D74848
2020-05-12 14:22:09 +00:00
sotaro
a97bbd6e05 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
8444175710 Bug 1622360 - Remove render roots from the frame scheduling code. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D74182
2020-05-11 20:07:25 +00:00
Jean-Yves Avenard
647b901352 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
221d9102fa 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
859532c46d 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
68273599af 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
e3857f0cf2 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
6836a4ff43 Bug 1622360 - Downgrade mApis from a RenderRootArray. r=jrmuizel
This is a bigger patch but it was hard to split. Some of the changes look
non-trivial; the guiding principle in these changes was "look at what the code
was like before document splitting landed".

Differential Revision: https://phabricator.services.mozilla.com/D73879
2020-05-05 18:15:43 +00:00
Kartikaya Gupta
9456ace708 Bug 1622360 - Downgrade transactions from RenderRootArrays. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D73877
2020-05-05 18:15:33 +00:00
Simon Giesecke
b484c57d6d Bug 1626570 - Improve handling of copying arrays in gfx/layers/. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D73633
2020-05-05 12:59:26 +00:00
Bert Peers
c4e13e9168 Bug 1628175 - WebGL is drawn into the picture cache and then onto the screen r=gw
Part 1 - support RGB external surfaces for promotion to compositor
surfaces; add new shader permutations to handle all buffer kinds.
Set the promotion flag when the pixel format has no alpha, or when the
texture provider can guarantee all-solid alpha values.

Differential Revision: https://phabricator.services.mozilla.com/D71120
2020-04-30 07:08:17 +00:00
Brindusan Cristian
f3a199ac98 Backed out changeset 8433832c8f09 (bug 1628175) for reftest failures at 817019-1.html. CLOSED TREE 2020-04-28 21:33:46 +03:00
Bert Peers
b4a05f15db Bug 1628175 - WebGL is drawn into the picture cache and then onto the screen r=gw
Part 1 - support RGB external surfaces for promotion to compositor
surfaces; add new shader permutations to handle all buffer kinds.
Set the promotion flag when the pixel format has no alpha, or when the
texture provider can guarantee all-solid alpha values.

Differential Revision: https://phabricator.services.mozilla.com/D71120
2020-04-27 19:38:02 +00:00
Nicolas Silva
7a55b280e9 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
4225d45349 Bug 1617808 - Re-deliver PREFER_COMPOSITOR_SURFACE flag to WebRender r=gw
Differential Revision: https://phabricator.services.mozilla.com/D64007
2020-03-10 03:52:08 +00:00
Narcis Beleuzu
019e5b6cbc Backed out changeset 0cb5cf87cb27 (bug 1617808) for bustages on bindings.rs . CLOSED TREE 2020-03-10 02:16:24 +02:00
sotaro
610ea8b21e Bug 1617808 - Re-deliver PREFER_COMPOSITOR_SURFACE flag to WebRender r=gw
Differential Revision: https://phabricator.services.mozilla.com/D64007
2020-03-01 22:06:11 +00:00
Andrew Osmond
490ae875e7 Bug 1618345 - Enforce proper color management by splitting gfx::Color into sRGBColor and DeviceColor types. r=jrmuizel
gfx::Color is currently misused in many places. The DrawTargets expect
the color space to be in device space, e.g. what we are actually going
to draw using. Everything sitting above generally deals with sRGB, as
specified in CSS. Sometimes we missed the conversion from sRGB to device
space when issuing draw calls, and similarly sometimes we converted the
color to device space twice.

This patch splits the type in two. sRGBColor and DeviceColor now
represent sRGB and device color spaces respectively. DrawTarget only
accepts DeviceColor, and one can get a DeviceColor from an sRGBColor via
the ToDeviceColor helper API. The reftests now pass with color
management enabled for everything (e.g. CSS) instead of just tagged
raster images.

There will be a follow up patch to enable color management everywhere by
default on all supported platforms.

Differential Revision: https://phabricator.services.mozilla.com/D64771
2020-03-09 14:16:17 +00:00
Emilio Cobos Álvarez
193e6c4f14 Bug 1616395 - Remove FfiVec. r=jrmuizel
Use ThinVec instead, which is compatible with nsTArray, and makes stuff much
harder to misuse.

Differential Revision: https://phabricator.services.mozilla.com/D63256
2020-02-19 18:34:51 +00:00
Eric Rahm
daeb56f35b Bug 1606187 - Part 2b: Update users of nsClassHashtable to handle UniquePtr differences r=KrisWright,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D59042
2020-01-13 19:18:56 +00:00
sotaro
d0c54fc702 Bug 1599887 - Update frame is when WR rendering is skipped r=nical
wr::WebRenderPipelineInfo needs to be handled even when WR rendering does not happen.

Differential Revision: https://phabricator.services.mozilla.com/D55899
2019-12-06 13:06:21 +00:00
sotaro
bb2ccb6d86 Bug 1601531 - Tag image descriptors with PREFER_COMPOSITOR_SURFACE where appropriate r=gw
Differential Revision: https://phabricator.services.mozilla.com/D55922
2019-12-06 06:53:57 +00:00
sotaro
8b1ffd7d45 Bug 1594303 - Code clean up around RenderAndroidSurfaceTextureHostOGL r=jnicol
Removes NofityForUse() functions for simplicity.

Ensure that RenderTextureHost::PrepareForUse() is called before RenderTextureHost:: Lock(). When a task of calling RenderTextureHost::PrepareForUse() is simply posted to render thread, there is a case that RenderTextureHost:: Lock() is called before PrepareForUse() .

Differential Revision: https://phabricator.services.mozilla.com/D51974
2019-11-08 12:52:16 +00:00
Bob Owen
f4290ca36b Bug 1589718: Add a RenderedFrameId to RenderCompositor and use it to control release of textures. r=sotaro
This replaces mUpdatesCount in AsyncImagePipelineManager, which was really how
many times NotifyPipelinesUpdated was called with aRender == true. I think this
makes the release logic clearer as it is more explicit.
It also changes things for RenderCompositorANGLE, so that we check to see if
any other frames have completed even if we don't want to wait for them.

Differential Revision: https://phabricator.services.mozilla.com/D51064
2019-11-04 16:15:20 +00:00
sotaro
446f7425ce Bug 1570879 - Fix high contrast theme handling with DirectComposition and WebRender r=nical
When high contrast mode is enabled, title bar is drawn as transparent and on-client area rendering by DWM is shown. But when compositor window in GPU process is used, the on-client area rendering was not shown. To address the proboem, window needs to be cleard as transparent and SwapChain of compositor window needs to be DXGI_ALPHA_MODE_PREMULTIPLIED.

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

Differential Revision: https://phabricator.services.mozilla.com/D48302
2019-10-08 10:07:47 +00:00
Andrew Osmond
985dac6203 Bug 1574493 - Part 3. Stop rounding rects/clips during display list building. r=jrmuizel
Rounding in layout pixels is very close to snapping in raster pixels if
there are no transforms involved. This is why it worked most of the time
and fell flat in many edge cases. In future parts of this series, we
will trust scene building and frame building to do the heavy lifting for
snapping purposes.

Differential Revision: https://phabricator.services.mozilla.com/D45058
2019-09-14 16:17:04 +00:00
Ciure Andrei
c5f80130da 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
56529c6d35 Bug 1574493 - Part 3. Stop rounding rects/clips during display list building. r=jrmuizel
Rounding in layout pixels is very close to snapping in raster pixels if
there are no transforms involved. This is why it worked most of the time
and fell flat in many edge cases. In future parts of this series, we
will trust scene building and frame building to do the heavy lifting for
snapping purposes.

Differential Revision: https://phabricator.services.mozilla.com/D45058
2019-09-13 14:03:23 +00:00
Ciure Andrei
604db60afa 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