Before this change, the value which was set by SetShadowBaseTransform()
has been used for the assertion, but it is possible that the value is changed
by APZ. And it's hard to tell whether the value has been changed by APZ or not
and it's hard to *reverse-calculate* the differences in the past APZ at the
moment we want to do the assert.
So after this patch, on debug build we don't actually skip the calculation for
unchanged animations and use the newly calculated value for the assertion.
MozReview-Commit-ID: 8fCcvvbUMHe
--HG--
extra : rebase_source : 0ff5e7100ad33a690bb0edd02af2b00c749afbbe
The FlingPhysics controls the shape of the fling curve, including how fast
and far it goes, while leaving other logic (related to flywheel, handoff,
overscroll, etc.) centralized in GenericFlingAnimation.
FlingPhysics is a template parameter of GenericFlingAnimation because we
already have a dynamic dispatch on the type of the animation, we don't
need another one for the physics.
I called the specific class implementing the current physics
DesktopFlingPhysics because since the deprecation of B2G and Android
switching to StackScrollerFlingAnimation, it's only used in desktop touch
scenarios.
MozReview-Commit-ID: LhJ9rpPrnXC
--HG--
extra : rebase_source : e53f1d7bbe3e0a588f5d5ba530c59e03cdc50d69
extra : source : 8fda27f6bbf30cc14966c80780c9e09533e7b7e5
The calculation in that function is specific to a particular physics model,
so it's inappropriate to house it in Axis.
Also do some light refactoring to this function, to make modifying the
velocity the caller's responsibility (this becomes relevant in the next
patch, where we factor out the physics logic into a class that can't
modify the APZC).
MozReview-Commit-ID: 5ALQd3LBx3O
--HG--
extra : rebase_source : 2290b72d3026878b34c86f437b0fac093d9fceac
When a transform thinks it's animated we should abandon screen rasterization
and instead favour local rasterization. This produces a more visually
pleasant rendering, as pixel-snapping "wobbles" the text between
frames.
The float scale of GlyphRasterSpace::Local is currently unused, but this
PR tries its best to set it to a reasonable value, based on discussion
with glennw about the intended semantics. We agreed it should specify
the scale *relative* to the parent stacking context, which means it's
just whatever scaling the stacking context's transform applies. It's
possible we'll need to clamp this value or make it properly 2-dimensional
later on.
Some book-keeping is added to StackingContextHelper to ensure that
GlyphRasterSpace::Screen is never requested by a descendent
of a stacking context using GlyphRasterSpace::Local.
nsDisplayMask is changed to use a StackingContextHelper to ensure
rasterSpace is properly propagated.
In addition, this is the first commit making use of cbindgen's new support
for bridging Rust enums natively into C++! This bumps our minimum cbindgen
to 6.0.0 (just released).
MozReview-Commit-ID: 9AlsB6nUheB
--HG--
extra : rebase_source : 978e51dbedeb1542e0829752b7f828ffeb2872e9
This prevents us from getting stuck in the frame throttling code where
TooManyPendingFrames always returns true.
MozReview-Commit-ID: 92tybPOaOTP
--HG--
extra : rebase_source : 8934f89a191759e85578db3dfde9e017a03a82eb
We no longer need them since in the previous commit we make sure subsequent
ticks happens for animations in delay phase.
MozReview-Commit-ID: F68wCCsCEiE
--HG--
extra : rebase_source : 0f7d1b3ef45b9dd210473d3c374d193e3ee94e83
If the animation is in delay phase, we shouldn't produce any values for the
animation but we have to make sure subsequent ticks happen in order to the time
when the animation starts. So what we should do here is that
1) Make AnimationHelper::SampleAnimations() return boolean, return true if
there is any animation.
2) Schedule the next tick if AnimationHelper::SampleAnimations return true
This setup is equivalent to what we do non-WebRender.
So that we don't need to set non-animated value as AnimatedValue for delay
phase to make subsequent ticks happen for the delay phase animations. The
non-animated value will be dropped in the next patch.
MozReview-Commit-ID: IwltLGgvT7K
--HG--
extra : rebase_source : 9854b182134adf3060260849741142841721d65b