Commit Graph

3897 Commits

Author SHA1 Message Date
Hiroyuki Ikezoe
d37f48e250 Bug 1324591 - Store the corresponding LayersId for each animation on the compositor. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D75728
2020-07-05 02:48:51 +00:00
Jean-Yves Avenard
8fd158d479 Bug 1649684 - Use the current nsISerialEventTarget with the various process hosts. r=nika
In all those cases, the current nsISerialEventTarget is either the main thread or the MessageChannel's nsISerialEventTarget (since bug 1634846)

Differential Revision: https://phabricator.services.mozilla.com/D81966
2020-07-02 22:59:24 +00:00
sotaro
ce3a41744b Bug 1648411 - Add AHardwareBuffer layer buffer support on android r=jnicol
AHardwareBuffer is supported since Android O(APIVersion 26). Implementation of AndroidHardwareBufferTextureData referred AndroidNativeWindowTextureData. Implementation of AndroidHardwareBufferTextureHost referred obsoleted GrallocTextureHost.

android fence is not supported yet.

Differential Revision: https://phabricator.services.mozilla.com/D81808
2020-07-02 13:43:19 +00:00
Jean-Yves Avenard
9356971435 Bug 1647112 - P2. Remove static method. r=mattwoodrow
Allows to remove the dance around the compositor thread just to perform the assertion.
The use of an in-line lambda avoid all ambiguity on which thread this is called.

Differential Revision: https://phabricator.services.mozilla.com/D80635
2020-07-02 00:29:53 +00:00
Jean-Yves Avenard
28c6755d49 Bug 1647112 - P1. Make the canvas thread use BackgroundTaskQueue. r=KrisWright,jgilbert,andi
Some headers cleanup.

Differential Revision: https://phabricator.services.mozilla.com/D80597
2020-07-01 17:45:36 +00:00
Jean-Yves Avenard
87ab775e09 Bug 1647628 - Make ImageBridgeChild use a background taskqueue. r=KrisWright,andi
Differential Revision: https://phabricator.services.mozilla.com/D80599
2020-07-02 00:27:47 +00:00
Jean-Yves Avenard
8fc6e95f6c Bug 1649294 - Make RemoteDecoder use a background taskqueue. r=mattwoodrow,andi
There's a small race that can happen when the remote decoder gets shutdown during xpcom shutdown; that would cause GetCurrentSerialEventTarget to return null. Leading to an assertion failure in ActorLifecycleProxy thread-safety check when PRemoteDecoderManagerParent gets destroyed.

So we use a background taskqueue instead and cleanup a bit the threading code in there allowed thanks to the TaskQueue ability to not require an explicit shutdown.

Differential Revision: https://phabricator.services.mozilla.com/D81287
2020-07-02 00:26:46 +00:00
Simon Giesecke
cd8b8939b9 Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80860
2020-07-01 08:29:29 +00:00
Narcis Beleuzu
3700aab557 Backed out 7 changesets (bug 1634846, bug 1647628, bug 1649294, bug 1647112) for webgl-conf crashes. CLOSED TREE
Backed out changeset 4441d06e96c3 (bug 1647628)
Backed out changeset 4efaf32bc8f7 (bug 1647112)
Backed out changeset 2d24ad813039 (bug 1647112)
Backed out changeset fda262d73a13 (bug 1649294)
Backed out changeset 5863f9c5229f (bug 1634846)
Backed out changeset bca79526745d (bug 1634846)
Backed out changeset d539408a0048 (bug 1634846)
2020-06-30 09:50:00 +03:00
Jean-Yves Avenard
00688236a3 Bug 1647628 - Make ImageBridgeChild use a background taskqueue. r=KrisWright
Differential Revision: https://phabricator.services.mozilla.com/D80599
2020-06-24 01:38:30 +00:00
Jean-Yves Avenard
43bd79bd41 Bug 1647112 - P2. Remove static method. r=mattwoodrow
Allows to remove the dance around the compositor thread just to perform the assertion.
The use of an in-line lambda avoid all ambiguity on which thread this is called.

Differential Revision: https://phabricator.services.mozilla.com/D80635
2020-06-30 02:33:09 +00:00
Jean-Yves Avenard
135d109d8e Bug 1647112 - P1. Make the canvas thread use BackgroundTaskQueue. r=KrisWright
Some headers cleanup.

Differential Revision: https://phabricator.services.mozilla.com/D80597
2020-06-30 02:33:02 +00:00
Jean-Yves Avenard
c251c5b2c7 Bug 1649294 - Make RemoteDecoder use a background taskqueue. r=mattwoodrow
There's a small race that can happen when the remote decoder gets shutdown during xpcom shutdown; that would cause GetCurrentSerialEventTarget to return null. Leading to an assertion failure in ActorLifecycleProxy thread-safety check when PRemoteDecoderManagerParent gets destroyed.

So we use a background taskqueue instead and cleanup a bit the threading code in there allowed thanks to the TaskQueue ability to not require an explicit shutdown.

Differential Revision: https://phabricator.services.mozilla.com/D81287
2020-06-30 02:50:38 +00:00
Bob Owen
3ba9a0b436 Bug 1641722: Deactivate remote canvas 2D when device creation or stream read failure occurs. r=jrmuizel,chutten
This also adds telemetry probes to track:
* number of times remote canvas 2D is activated
* number of times remote canvas 2D is deactivated due to device creation failure
* number of times remote canvas 2D is deactivated due to a stream read error.

Differential Revision: https://phabricator.services.mozilla.com/D81032
2020-06-26 11:37:31 +00:00
Dorel Luca
caf588721d Backed out changeset 8570bd4a1f0b (bug 1641722) for Build bustage in telemetry/.deps/TelemetryScalarData.h. CLOSED TREE 2020-06-26 13:26:54 +03:00
Bob Owen
d3745901a1 Bug 1641722: Deactivate remote canvas 2D when device creation or stream read failure occurs. r=jrmuizel,chutten
This also adds telemetry probes to track:
* number of times remote canvas 2D is activated
* number of times remote canvas 2D is deactivated due to canvas device creation failure
* number of times remote canvas 2D is deactivated due to a stream read error.

Differential Revision: https://phabricator.services.mozilla.com/D81032
2020-06-26 08:22:12 +00:00
Jean-Yves Avenard
8d2ff29220 Bug 1647133 - P4. Use nsISerialEventTarget where it's actually that. r=mattwoodrow
We are here, always actually dealing with the compositor thread, with the exception of VRDisplayPresentation which is passing  the main thread.

Depends on D80422

Differential Revision: https://phabricator.services.mozilla.com/D80423
2020-06-22 09:38:34 +00:00
sotaro
8f5e819367 Bug 1647253 - Remove unused CreateSharedRGBImage() r=jrmuizel
CreateSharedRGBImage() is not used.

Differential Revision: https://phabricator.services.mozilla.com/D80436
2020-06-22 14:24:21 +00:00
Jamie Nicol
2e61ade1af Bug 1646243 - Guard against null state in UiCompositorControllerParent::Initialize(). r=kats
Differential Revision: https://phabricator.services.mozilla.com/D80205
2020-06-18 16:17:34 +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
Hiroyuki Ikezoe
4af8413479 Bug 1646263 - Separate CompositorAnimationStorage from AnimationHelper.[cpp,h]. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D79944
2020-06-17 22:38:30 +00:00
Sylvestre Ledru
85c05f3a47 Bug 1519636 - Reformat recent changes to the Google coding style r=andi
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D79795
2020-06-16 14:37:23 +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
Jean-Yves Avenard
9b85722f24 Bug 1644254 - Keep a reference to the CompositorThreadHolder until gfx shutdown tasks have run. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D79596
2020-06-13 12:30:27 +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
Andrew Osmond
65ad608400 Bug 1641594 - Remove the wrapper around recycled surfaces. r=tnikkel
We can perform the same function as RecyclingSourceSurface by checking
the ref count of the underlying surface directly. We need to ensure
WebRender is explicitly aware that it is a recycled surface, but that is
easily achieved by changing the type of the surface. This avoids
unnecessary heap allocations, particularly in the case where many
elements on the same page refer to the same animation (and thus
duplicating RecyclingSourceSurface objects).

Differential Revision: https://phabricator.services.mozilla.com/D77513
2020-06-11 17:49:13 +00:00
Jean-Yves Avenard
71373f3f10 Bug 1644009 - P7. Revert "Bug 1592488 - P4. Ensure an AbstractThread exists for the Compositor Thread." r=mattwoodrow
DirectTask dispatching will now be directly handled by nsThread.

Differential Revision: https://phabricator.services.mozilla.com/D79091
2020-06-12 05:10:10 +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
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
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
Daosheng Mu
d9e2924e6f Bug 1643514 - Clean up VRManager usage. r=kip,jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D78436
2020-06-10 01:26:52 +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
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
James Willcox
feb9d115fd Bug 1536833 - Fix overscroll effect on Android r=botond,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D78130
2020-06-08 17:13:28 +00:00
Kenny Levinsen
979767c4db Bug 1641033 - Fire vsync observers directly from Wayland frame callback. r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D77047
2020-06-05 18:35:22 +00:00
Noemi Erli
184f382e28 Backed out changeset 6b49139f2b9d (bug 1641033) for causing assertions in gfxPlatform.cpp CLOSED TREE 2020-06-05 04:31:45 +03:00
Kenny Levinsen
3950a7a3bf Bug 1641033 - Fire vsync observers directly from Wayland frame callback. r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D77047
2020-06-04 23:39:30 +00:00
Botond Ballo
1d58b2d108 Bug 1642817 - Avoid accessing sIndirectLayerTreesLock during shutdown. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D77957
2020-06-03 13:25:41 +00:00
Micah Tigley
81f5f0e8d0 Bug 1621781 - Add an "IsRDMTouchSimulationActive" field to ScrollMetadata. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D77395
2020-05-30 03:15:22 +00:00
Dorel Luca
0c8ff16ba2 Backed out 2 changesets (bug 1621781) for Mochitest failures in gfx/layers/apz/test/mochitest/test_group_mouseevents.html
Backed out changeset a5fe71693070 (bug 1621781)
Backed out changeset 58a9b7f50a4b (bug 1621781)
2020-05-30 06:12:01 +03:00
Micah Tigley
62367a9af9 Bug 1621781 - Add an "IsRDMTouchSimulationActive" field to ScrollMetadata. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D77395
2020-05-29 21:03:06 +00:00
Martin Stransky
ec6a3bec56 Bug 1619882 [Wayland] Implement dmabuf global ref count, r=jhorak
This patch implements:

- Global surface UID for better tracking/debugging. The UID is passes acros all processes so we can track
  surface usage.
- WaylandAllocateShmMemory() function which uses shm_open() instead of files at tmp for Shm memory creation.
- DMABufRefcount() class based on eventfd() which is used as a global surface reference count.

Differential Revision: https://phabricator.services.mozilla.com/D76689
2020-05-29 15:21:50 +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
615c83d723 Bug 1519636 - Reformat recent changes to the Google coding style r=andi
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D76451
2020-05-25 07:42:38 +00:00
Bob Owen
f6fb416c5b Bug 1633791 part 2: Use ExpectingShutdown to prevent ShutDownKill for remote canvas. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D75508
2020-05-22 18:22:02 +00:00
sotaro
6d4116acb8 Bug 1639874 - Fix YCbCrTextureClientAllocationHelper::IsCompatible() r=jrmuizel
IsCompatible() also needs to check YStride and CbCrStride. They also affect to buffer size.

Differential Revision: https://phabricator.services.mozilla.com/D76323
2020-05-21 18:53:42 +00:00
Bob Owen
ffea5a7eed Bug 1639599: Add null check for mRecorder to CanvasChild::ShouldBeCleanedUp. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D76165
2020-05-21 00:04:59 +00:00
Bob Owen
5a1b15d341 Bug 1639626: Hold BackendType in CanvasTranslator to guard against the reference DrawTarget being null. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D76177
2020-05-21 00:05:27 +00:00
Bob Owen
5ee999bc1e Bug 1639634: Add null check for mTranslationTaskQueue to CanvasTranslator::ActorDestroy. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D76183
2020-05-21 00:05:34 +00:00