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
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
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
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
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
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
(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
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
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
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
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
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
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
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
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
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
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
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
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
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
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