Commit Graph

16985 Commits

Author SHA1 Message Date
Dan Robertson
ac6e522c38 Bug 1778120 - Add the animation id to the webrender stacking context. r=botond
On desktop add the animation id to the webrender stacking context.

Differential Revision: https://phabricator.services.mozilla.com/D158035
2022-09-23 20:44:02 +00:00
Boris Chiou
38cba0f692 Bug 1776077 - Fix delay phase for scroll animations in the compositor thread. r=hiro
Basically, we need to detect a case if there is only scroll animations
which are not sampled because it goes back to before phase. If this
happens, we set ScrollToDelay to |mReason| in the returned value.

Without this patch, the visual result is intermittent because it
is possible that there are new animations arrived at the moment when
scrolling from active phase to before phase.

We don't have a test for after phase because we don't support end delay
for scroll animations now. However, although we set the adjusted fill, we may
still need this in the future so let's keep the check of after phase for now.

Differential Revision: https://phabricator.services.mozilla.com/D155108
2022-09-22 00:06:10 +00:00
Boris Chiou
f8e123fcca Bug 1776077 - Factor out the handle of storing animated value in SampleAnimations(). r=hiro
Make SampleAnimations() simpler and we may use this in the following patch.

Differential Revision: https://phabricator.services.mozilla.com/D156609
2022-09-22 00:06:10 +00:00
Boris Chiou
0914c374d2 Bug 1776077 - Drop unused AnimationInfo::SetCompositorAnimations(). r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D156608
2022-09-22 00:06:10 +00:00
Jamie Nicol
5e60f35505 Bug 1780093 - Remove code for enabling/disabling SurfaceControl rendering path. r=geckoview-reviewers,owlish
In order to fix the magnifier widget being broken, the previous patch
in this bug added a mechanism to disable and enable the SurfaceControl
rendering path. This caused some glitches to occur, so we removed the
calls to that code in bug 1783542, but the code remained.

As we now have an alternative solution to fix the magnifier widget, we
no longer require this code. This patch therefore reverts the original
patch, to lead the way for the new solution in the next patch.

Differential Revision: https://phabricator.services.mozilla.com/D157308
2022-09-21 17:30:25 +00:00
Hiroyuki Ikezoe
44f79cce09 Bug 1714143 - Revert bug 1705927. r=tnikkel
The reftest added in bug 1705927 is renamed to overscroll-disabled.html to test
overscrolling doesn't happen with apz.overscroll.enable=false.

Differential Revision: https://phabricator.services.mozilla.com/D157689
2022-09-21 08:38:53 +00:00
Jamie Nicol
7208aa15cb Bug 1791154 - Check for null root content controller in UpdateOverscrollVelocity/Offset. r=hiro
In bug 1785786 we added a GPU process implementation for
RemoteContentController::UpdateOverscrollVelocity and
RemoteContentController::UpdateOverscrollOffset. These work by looking
up the root content controller and using it to forward the message to
the parent process. However, we neglected to add a null check on the
result of the lookup. This patch adds the null check.

Differential Revision: https://phabricator.services.mozilla.com/D157553
2022-09-17 11:41:59 +00:00
Dan Robertson
82ca982ed1 Bug 1785103 - Fire the scrollend event only once per gesture. r=botond,hiro
The scrollend event should only be fired once, at the very end of the gesture.
Fire the event for user gestures only on APZStateChange::eTransformEnd, which
is dispatched when APZ transitions from a transforming state to a state that
does not transform (e.g. a state change from PANNING to NOTHING).
CompleteAsyncScroll() should only post the scrollend event if the scroll was a
programmatic instant scroll.

Differential Revision: https://phabricator.services.mozilla.com/D154834
2022-09-14 16:32:41 +00:00
Kelsey Gilbert
a32dfd5297 Bug 1785925 - Add LUT and Colorspace support to GLBlitHelper. r=lsalzman,media-playback-reviewers,alwu
This code was originally developed in bug 1771374, but here we omit the
DCLayerTree changes for later.

Differential Revision: https://phabricator.services.mozilla.com/D155027
2022-09-13 17:40:43 +00:00
Butkovits Atila
f949caf80c Backed out 2 changesets (bug 1785103) for causing failures at test_group_scrollend.html. CLOSED TREE
Backed out changeset 0b1a9ad58327 (bug 1785103)
Backed out changeset 2712b51e6b75 (bug 1785103)
2022-09-12 18:28:12 +03:00
Dan Robertson
711374bdf8 Bug 1785103 - Fire the scrollend event only once per gesture. r=botond,hiro
The scrollend event should only be fired once, at the very end of the gesture.
Fire the event for user gestures only on APZStateChange::eTransformEnd, which
is dispatched when APZ transitions from a transforming state to a state that
does not transform (e.g. a state change from PANNING to NOTHING).
CompleteAsyncScroll() should only post the scrollend event if the scroll was a
programmatic instant scroll.

Differential Revision: https://phabricator.services.mozilla.com/D154834
2022-09-12 13:27:35 +00:00
Botond Ballo
27d6b966c4 Bug 1786452 - Add a gtest. r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D156767
2022-09-12 07:25:06 +00:00
Makoto Kato
6f6a4de1ef Bug 1786452 - Finish overscroll animation when finishing pan. r=geckoview-reviewers,owlish,m_kato
(Co-authored with m_kato)

GeckoView's overscroll is implemented by OS side using
`WidgetOverscrollEffect`.

When not releasing finger during overscroll, stretched animation is kept on
Android 12+ since `EdgeEffect.onRelease` isn't called. Then, when releasing
finger, this animation isn't finished on GeckoView with Android 12+.

When this situation, APZ doesn't call
`WidgetOverscrollEffect::HandleFlingOverscroll` by releasing finger due to too
small velocity value in `AsyncPanZoomController::HandleEndOfPan`. So there is
no way to detect whether releasing finger on GeckoView side.

I think We should notify GeckoView of releasing finger to finish animation.

This won't occurs on `GenericOverscollEffect` on macOS since overscoll
animation is managed by APZ and this animation will be finished by
`UpdateAnimation`.

Differential Revision: https://phabricator.services.mozilla.com/D156611
2022-09-12 07:25:05 +00:00
Botond Ballo
8464436acc Bug 1786452 - Implement ClearOverscroll() for WidgetOverscrollEffect. r=hiro
Depends on D157005

Differential Revision: https://phabricator.services.mozilla.com/D157006
2022-09-12 07:25:05 +00:00
Botond Ballo
63eba1640c Bug 1786452 - Implement IsOverscrolled() for WidgetOverscrollEffect. r=hiro
A couple of call sites, which are only interested in overscrolling that
induces a transform, are changed to call IsPhysicallyOverscrolled(),
the GenericOverscrollEffect implementation, directly.

Depends on D157004

Differential Revision: https://phabricator.services.mozilla.com/D157005
2022-09-12 07:25:04 +00:00
Botond Ballo
5c40157b93 Bug 1786452 - Rename OverscrollEffectBase::HandleFlingOverscroll() to RelieveOverscroll(). r=hiro
The function is used in some scenarios unrelated to fling animation.

Differential Revision: https://phabricator.services.mozilla.com/D157004
2022-09-12 07:25:04 +00:00
Hiroyuki Ikezoe
4977904f7f Bug 1789930 - Allow scroll anchoring during async scrolling animation triggered by user is in progress. r=emilio,botond
Scroll anchoring updates the scroll positions with ScrollOrigin::Relative, thus
it's properly merged into the in-progress animation.

Differential Revision: https://phabricator.services.mozilla.com/D156932
2022-09-12 04:59:38 +00:00
Hiroyuki Ikezoe
23036a9206 Bug 1789930 - Propagate |aTriggerByScript| argument properly. r=botond
The new test case added in this change is a variant test case for bug 1584035.
The test will be failed by the next change without this change.

Differential Revision: https://phabricator.services.mozilla.com/D156931
2022-09-12 04:59:38 +00:00
sotaro
87a37cfd91 Bug 1790188 - Fix releasing CompositableRef of mLatestTextureHost r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D157067
2022-09-12 03:49:02 +00:00
Jamie Nicol
50310d33ee Bug 1784109 - Override SurfaceTexture transform for videos on Mediatek 6735. r=gfx-reviewers,media-playback-reviewers,lsalzman,alwu
On Android, SurfaceTextures provide a transform matrix that should be
applied to texture coordinates when sampling from the texture. Prior
to bug 1731980 we ignored this value, and simply y-flipped the video
instead. On most devices the transform is just a y-flip, so this
produced the correct results. However, on some devices the transform
included a scale as well as the y-flip, meaning that we rendered
videos at an incorrect size.

The fix for bug 1731980 was to correctly apply the transformation.
However, it now appears that on Mediatek 6735 devices the transform
provided by the system is incorrect. On these devices, videos were
rendered correctly when we ignored the transform and just did a
y-flip, and now that we apply the transform videos are rendered at the
wrong size.

This patch makes it so that we override the system-provided transform
on these devices with a simple y-flip. The existing mIgnoreTransform
flag has been changed to an optional "transform override" value to
achieve this. We ensure that we only override the transform for
SurfaceTextures that are output from a MediaCodec, to ensure that we
don't accidentally apply the wrong transform to SurfaceTextures
attached to other sources.

Differential Revision: https://phabricator.services.mozilla.com/D155706
2022-09-09 14:43:21 +00:00
Brad Werth
ddc104b332 Bug 1787561 Part 1: Make GPUVideoImage track color depth, and make RemoteImageHolder pass it through. r=media-playback-reviewers,gfx-reviewers,alwu,aosmond
This ensures that the Image that the client receives has the color depth
information that was sent to the GPU, even though the client can't query
the GPU directly.

Differential Revision: https://phabricator.services.mozilla.com/D155902
2022-09-08 18:02:03 +00:00
sotaro
ee73cfe360 Bug 1789658 - Keep gl::SharedSurface/TextureData alive if remote texture's TextureHost is still in use by WebRender r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D156774
2022-09-08 14:27:44 +00:00
criss
d87f2984cd Backed out 3 changesets (bug 1787561) for causing mochitest failures on browser_tab_visibility_and_play_time.js
Backed out changeset a41ab0c5f32f (bug 1787561)
Backed out changeset c1375f03dc75 (bug 1787561)
Backed out changeset afef5857aea6 (bug 1787561)
2022-09-07 23:49:05 +03:00
Brad Werth
e7afee4bf1 Bug 1781122 Part 3: Make macOS video layers prevent capture when TextureHost is DRM. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D155297
2022-09-07 18:51:12 +00:00
Brad Werth
62b54b0774 Bug 1781122 Part 2: Make TextureHost aware of DRM Images, and set this on macOS. r=gfx-reviewers,sotaro
At point of display, we need the TextureHost to know whether or not its
texture was created from a DRM Image. The throughline of data is:

Image -> TextureClient -> TextureHost

The TextureClient is generated by the Image, so it has access to the DRM
state of the Image, but the TextureHost is built from the raw texture data
and from TextureFlags. This patch updates TextureFlags to include a
DRM_SOURCE bit for use by the TextureHost.

The TextureClient and TextureHost are platform-specific classes. The
creation of the TextureClient by the Image is done in a platform-specific
subclass of Image. This patch only implements this pipeline for macOS.
There doesn't seem to be a way to do this in cross-platform classes, but
other platforms can follow the pattern used here.

Depends on D155295

Differential Revision: https://phabricator.services.mozilla.com/D155296
2022-09-07 18:51:12 +00:00
Brad Werth
2725370634 Bug 1781122 Part 1: Make ChromiumCDMParent mark its Images as DRM. r=media-playback-reviewers,gfx-reviewers,alwu,sotaro
This also modifies Image to track whether or not it is from a DRM source.
Later parts of the patch move this characteristic into the textures that
are used by compositors.

Differential Revision: https://phabricator.services.mozilla.com/D155295
2022-09-07 18:51:11 +00:00
Brad Werth
9c2897078c Bug 1787561 Part 1: Make GPUVideoImage track color depth, and make RemoteImageHolder pass it through. r=media-playback-reviewers,gfx-reviewers,alwu,aosmond
This ensures that the Image that the client receives has the color depth
information that was sent to the GPU, even though the client can't query
the GPU directly.

Differential Revision: https://phabricator.services.mozilla.com/D155902
2022-09-07 18:31:45 +00:00
Olli Pettay
93acdfad59 Bug 1777574, automate CC zone handling, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D155084
2022-09-07 11:22:51 +00:00
sotaro
525fcfea38 Bug 1781740 - Split RemoteTexture to RemoteTextureHostWrapper and actual remote texture's TextureHost r=gfx-reviewers,lsalzman
Preparation of Bug 1776885.

RemoteTextureMap is simplified. It expects that pref webgl.out-of-process.async-present.force-sync is true. Additional async remote texture ipc handling is going to be added at Bug 1776885.

- RemoteTextureHostWrapper wraps TextureHost of remote texture. It expose remote texture to WebRender. It notifies end of WebRender usage to the wrapped remote texture's TextureHost.
- Remote texture's TextureHost is created on WebGL ipc thread during pushing to RemoteTextureMap . End of usage of the remote texture is decided by using compositable ref of remote texture's TextureHost. The compositable ref is updated with holding RemoteTextureMap::mMutex.

Differential Revision: https://phabricator.services.mozilla.com/D152845
2022-09-07 00:58:34 +00:00
Marian-Vasile Laza
7ec7dec6f1 Backed out changeset f1e6746037f7 (bug 1785925) for causing reftest failures on DCLayerTree.cpp. CLOSED TREE 2022-09-06 23:35:51 +03:00
Kelsey Gilbert
24a9bc97bb Bug 1785925 - Add LUT and Colorspace support to GLBlitHelper. r=lsalzman,media-playback-reviewers,alwu
This code was originally developed in bug 1771374, but here we omit the
DCLayerTree changes for later.

Differential Revision: https://phabricator.services.mozilla.com/D155027
2022-09-06 18:36:34 +00:00
alwu
3d1bc29d56 Bug 1785738 - part4 : run media engine in the new utility process. r=gerard-majax,azebrowski
This patch moves the media engine from the RDD process to the new
utility process, and create video bridge between the new utility process
and the GPU process in order to share the texture.

Differential Revision: https://phabricator.services.mozilla.com/D155901
2022-09-03 00:53:59 +00:00
Cristian Tuns
3d56a1da28 Backed out changeset b14b975aa6d7 (bug 1785925) for causing build bustages on GLBlitHelper.cpp CLOSED TREE 2022-09-02 20:12:33 -04:00
Kelsey Gilbert
75cccdd5cb Bug 1785925 - Add LUT and Colorspace support to GLBlitHelper. r=lsalzman,media-playback-reviewers,alwu
This code was originally developed in bug 1771374, but here we omit the
DCLayerTree changes for later.

Differential Revision: https://phabricator.services.mozilla.com/D155027
2022-09-02 22:15:58 +00:00
Dan Robertson
ea25b2e90a Bug 1787560 - Add test for touch drag scrollbar scroll. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D155871
2022-09-02 13:36:38 +00:00
sotaro
8f7ed31c01 Bug 1788241 - Ensure WebRenderImageHost::OnReleased() is called in ImageBridgeParent::ActorDestroy() r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D156142
2022-09-01 05:22:23 +00:00
Butkovits Atila
bbbce97998 Backed out changeset 4274430f48d6 (bug 1787560) for causing failures at browser_test_scroll_thumb_dragging.js. CLOSED TREE 2022-08-31 03:16:26 +03:00
Dan Robertson
78ceb5cc0e Bug 1787560 - Add test for touch drag scrollbar scroll. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D155871
2022-08-30 23:25:07 +00:00
Botond Ballo
85eb92eba1 Bug 1787953 - Update the value of the epsilon used in SampledAPZCState::RemoveFractionalAsyncDelta() to 0.01 as well. r=tnikkel
This epsilon was split off from COORDINATE_EPSILON in bug 1787099,
but the original value used here (before bug 1659642) was 0.01
as well.

Depends on D155904

Differential Revision: https://phabricator.services.mozilla.com/D155905
2022-08-30 06:51:43 +00:00
Botond Ballo
9e4bfa3d7d Bug 1787953 - Change the value of COORDINATE_EPSILON back to 0.01. r=tnikkel
The previous change to 0.02 appears to have been unintentional,
and the value should be less than 1 app unit (1/60 of a pixel).

Differential Revision: https://phabricator.services.mozilla.com/D155904
2022-08-30 06:51:42 +00:00
Hiroyuki Ikezoe
65e6de2b59 Bug 1704978 - Prevent opening context menu in the case the user did right click in the overscroll gutter on Windows. r=botond,handyman
Differential Revision: https://phabricator.services.mozilla.com/D155039
2022-08-30 06:49:59 +00:00
Razvan Cojocaru
5edbd09ad0 Bug 1787099 - Change COORDINATE_EPSILON to type CSSCoord and update uses accordingly. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D155707
2022-08-29 00:07:57 +00:00
sotaro
7e5059e7a3 Bug 1783923 - Ensure WebRenderImageHost::OnReleased() is called during WebRenderBridgeParent shutdown r=gfx-reviewers,lsalzman
If WebRenderImageHost::OnReleased()  is called on all WebRenderImageHosts before RemoteTextureMap::Shutdown(), RemoteTextureMap does not own a reference of WebRenderImageHost during the shutdown.

On current gecko, when WebRenderImageHost is released by WebRenderBridgeParent::Destroy(), WebRenderImageHost::OnReleased() is not called. It needs to be addressed.

And RemoteTextureMap::Shutdown() need to be called after CompositorThreadHolder::Shutdown(). By it, we could expect that WebRenderBridgeParent::Destroy() is called on all WebRenderBridgeParents.

Differential Revision: https://phabricator.services.mozilla.com/D155673
2022-08-26 23:20:55 +00:00
Dan Robertson
89c22b5223 Bug 1787361 - Fix scrollbar touch drag detection when processing touch input. r=botond
Populate hitScrollbarNode after we have cloned the hit test to correctly
determine if we are in a scrollbar touch drag.

Differential Revision: https://phabricator.services.mozilla.com/D155733
2022-08-26 20:56:00 +00:00
Mark Banner
d86604e53c Bug 1786197 - Turn on ESLint rule for prefer-boolean-length-check for gfx. r=gfx-reviewers,nical
Differential Revision: https://phabricator.services.mozilla.com/D155170
2022-08-26 13:39:36 +00:00
Brad Werth
933b043177 Bug 1787271: Change the order of emitted video low power telemetry enums. r=gfx-reviewers,jrmuizel
This favors FailWindowed as the most important enum to see before any
others, which is more actionable.

Differential Revision: https://phabricator.services.mozilla.com/D155614
2022-08-25 17:42:02 +00:00
Razvan Cojocaru
2456e8733d Bug 1782339 - Incorrectly hit overscroll bounce makes it impossible to scroll page fully. r=botond,dlrobertson,hiro
Differential Revision: https://phabricator.services.mozilla.com/D155047
2022-08-25 04:02:48 +00:00
Emilio Cobos Álvarez
dca3374873 Bug 1661147 - When starting a new list, copy inputs from the stack as well. r=gfx-reviewers,bradwerth
Copying outputs with a null clip input is not sound if one of the other
items expand outside of our bounds, such as in the case of a blur
filter.

This unveils a side issue, which is that PushOverrideForASR didn't
update the current item stack, which meant that we could accidentally
break sticky positioning in some edge-cases otherwise.

Differential Revision: https://phabricator.services.mozilla.com/D155241
2022-08-25 02:01:37 +00:00
Emilio Cobos Álvarez
b5e1870820 Bug 1661147 - Improve ClipManager logs more. r=gfx-reviewers,gw
Differential Revision: https://phabricator.services.mozilla.com/D155425
2022-08-25 02:01:18 +00:00
Hiroyuki Ikezoe
0ca171b4b6 Bug 1786657 - Implement HeadlessWidget::SynthesizeNativeTouchpadPan. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D155437
2022-08-25 00:34:17 +00:00