Commit Graph

337 Commits

Author SHA1 Message Date
Sylvestre Ledru
576cac5ec7 Bug 1381253 - Remove redundant control flow declarations rs=ehsan
MozReview-Commit-ID: FFxP4aMCbOL
2017-07-15 19:03:04 +02:00
Kartikaya Gupta
42cf0f4da6 Bug 1382200 - Eliminate LayerMetricsWrapper::IsScrollInfoLayer entirely by inlining it. r=botond
MozReview-Commit-ID: KX35cjOAQw7
2017-07-19 09:24:28 -04:00
Kartikaya Gupta
2800e31568 Bug 1382200 - Rename Layer::IsScrollInfoLayer to better capture what the call sites care about. r=botond
MozReview-Commit-ID: 1vMBMo5zOhK
2017-07-19 09:24:22 -04:00
sotaro
0969fd2d2e Bug 1379033 - Remove CompositorBridgeParentBase::GetAnimationStorage() r=kats
The patch removes CompositorBridgeParentBase::GetAnimationStorage and CrossProcessCompositorBridgeParent::GetAnimationStorage, and remove the "aId" parameter to CompositorBridgeParent::GetAnimationStorage, since it's only ever called with "0" as the argument.
2017-07-10 10:03:12 +09:00
Botond Ballo
0a174e788f Bug 1375949 - Repurpose AsyncPanZoomController::AsyncMode into a more general AsyncTransformConsumer enum. r=kats
The AsyncTransformConsumer enumeration captures the distinction between
the two main categories of consumers of async transforms: those using
it for hit-testing and related purposes, and those using it for
compositing.

MozReview-Commit-ID: 59CICcnPvY6
2017-06-30 14:31:28 -04:00
Nicholas Nethercote
a58025002f Bug 1375392 - Tweak the PROFILER_LABEL* macros. r=mstange.
This patch makes the following changes to the macros.

- Removes PROFILER_LABEL_FUNC. It's only suitable for use in functions outside
  classes, due to PROFILER_FUNCTION_NAME not getting class names, and it was
  mostly misused.

- Removes PROFILER_FUNCTION_NAME. It's no longer used, and __func__ is
  universally available now anyway.

- Combines the first two string literal arguments of PROFILER_LABEL and
  PROFILER_LABEL_DYNAMIC into a single argument. There was no good reason for
  them to be separate, and it forced a '::' in the label, which isn't always
  appropriate. Also, the meaning of the "name_space" argument was interpreted
  in an interesting variety of ways.

- Adds an "AUTO_" prefix to PROFILER_LABEL and PROFILER_LABEL_DYNAMIC, to make
  it clearer they construct RAII objects rather than just being function calls.
  (I myself have screwed up the scoping because of this in the past.)

- Fills in the 'js::ProfileEntry::Category::' qualifier within the macro, so
  the caller doesn't need to. This makes a *lot* more of the uses fit onto a
  single line.

The patch also makes the following changes to the macro uses (beyond those
required by the changes described above).

- Fixes a bunch of labels that had gotten out of sync with the name of the
  class and/or function that encloses them.

- Removes a useless PROFILER_LABEL use within a trivial scope in
  EventStateManager::DispatchMouseOrPointerEvent(). It clearly wasn't serving
  any useful purpose. It also serves as extra evidence that the AUTO_ prefix is
  a good idea.

- Tweaks DecodePool::SyncRunIf{Preferred,Possible} so that the labelling is
  done within them, instead of at their callsites, because that's a more
  standard way of doing things.
2017-06-22 17:08:53 +10:00
Randall Barker
e61f01164e Bug 1365161 - Ensure dynamic toolbar static snapshot visibility stays in sync with the real toolbar chrome r=botond,jchen
There were two issues that prevented the static snapshot toolbar and
real chrome toolbar from staying in sync.

1) When a page would resize such as when going fullscreen, if the
root content document was not scrollable, the animator would not receive
root composition page size updates. The page resize is used by the
animator to hide the static snapshot, so it would remain visible while
the real chrome toolbar would be hidden.

2) Certain places in UI java code would toggle the chrome state directly
instead of going through the animator to change the state.

MozReview-Commit-ID: DCQgRFS0UAO
2017-05-19 10:50:02 -07:00
Botond Ballo
568a934f19 Bug 1364622 - Introduce a helper function for computing the async transform for a scroll thumb layer. r=kats
MozReview-Commit-ID: DFFcmBxzI84
2017-05-15 18:35:16 -04:00
Botond Ballo
50e80233ca Bug 1349750 - Group scroll thumb-related information in Layer into a ScrollThumbData structure. r=kats
The patch also renames Layer::SetScrollbarData() to Layer::SetScrollThumbData()
for clarity.

MozReview-Commit-ID: DVwJ3DMl3Zs
2017-05-10 14:02:15 -04:00
Randall Barker
2690f75319 Bug 1358775 - Fix the dynamic toolbar animator to animate the toolbar in place instead of shifting content with the toolbar r=botond,nical
MozReview-Commit-ID: 85l2d6q7OdL
2017-05-11 13:10:34 -07:00
Kartikaya Gupta
3af8d29cef Merge m-c to graphics
MozReview-Commit-ID: 5zsIClrx1FB
2017-04-21 10:01:47 -04:00
peter chang
f11c1bde12 Bug 1345017 - Add animation sampling for WR, r=kats
MozReview-Commit-ID: AR2vajUf2o0
2017-04-12 16:40:48 +08:00
Randall Barker
c955f482b1 Bug 1335895 - Android GeckoView Dynamic Toolbar Version 3 r=botond,dvander,jchen,kats
This version of the Dynamic Toolbar moves the animation of the toolbar
from the Android UI thread to the compositor thread. All animation for
showing and hiding the toolbar are done with the compositor and a static
snapshot of the real toolbar.

MozReview-Commit-ID: BCe8zpbkWQt
2017-04-20 15:15:14 -07:00
Kartikaya Gupta
ff4ffd35eb Bug 1338347 - Record frame throughput ratio for APZ animations r=botond
MozReview-Commit-ID: 7Ljaya9RFeo
2017-03-20 11:41:05 -04:00
Kartikaya Gupta
6b5a47fd52 Bug 1338347 - Record frame throughput ratios for compositor animations r=botond
This augments the AnimationMetricsTracker to also track compositor animations
triggered by chrome and content layers separately. During the animation, the
tracker keeps a count of frames composited, and once the animation ends, it
uses the wall-clock time and vsync interval to compute the expected number of
composited frames. It then submits a ratio of actual/expected to telemetry.
A score of 1000 (because the ratio is scaled up to an integer between 0 and 1000)
indicates a perfect score with no frames dropped. Lower values are worse, and
values significantly above 1000 indicate abnormal behaviour. Values may be slightly
above 1000 due to rounding error or vsync jitter.

MozReview-Commit-ID: 30Vw0j3dm9G
2017-03-20 11:41:05 -04:00
Kartikaya Gupta
7676bc75c5 Bug 1338347 - Have the animation-sampling code track which process the animations are in. r=botond
This allows the AsyncCompositionManager to know whether compositor animations
are coming from chrome layers or content layers (using the rootmost RefLayer
as the boundary). This information is needed to have the compositor animation
telemetry probes separate information by chrome/content.

MozReview-Commit-ID: GqHczgrzXE5
2017-03-20 11:41:05 -04:00
peter chang
dc497a1152 Bug 1337889 - use CompositorAnimationsId to query Opacity/Transform animation, r=hiro,kats
MozReview-Commit-ID: 3s1kzOQAfrd
2017-02-09 17:30:11 -05:00
Ryan Hunt
44fdab0d7e Bug 1344356 - Fix unused lambda capture warnings r=kats 2017-03-06 10:09:47 -06:00
Kartikaya Gupta
cd1c5dc857 Bug 1339220 - Add telemetry probes to measure duration and max-area of animations in the compositor. r=botond,bsmedberg
MozReview-Commit-ID: KyvsNSTcxG8
2017-02-16 14:40:37 -05:00
Hiroyuki Ikezoe
448c234858 Bug 1331704 - Part 1: Store base styles in KeyframeEffectReadOnly instead of EffectSet. r=birtles a=abillings
Now we dropped mNeedsBaseStyleSet bit set.

MozReview-Commit-ID: Gv2rU0jpyk1
2017-02-11 19:11:45 +09:00
Sebastian Hengst
2beaba93bd Backed out changeset e2f6d5054e20 (bug 1331704) for build bustage: unused variable hasProperty at KeyframeEffectReadOnly.h:294. r=backout on a CLOSED TREE 2017-02-11 11:37:54 +01:00
Hiroyuki Ikezoe
00914b9633 Bug 1331704 - Part 1: Store base styles in KeyframeEffectReadOnly instead of EffectSet. r=birtles a=abillings
Now we dropped mNeedsBaseStyleSet bit set.

MozReview-Commit-ID: Gv2rU0jpyk1
2017-02-11 19:11:45 +09:00
peter chang
7969ef699d Bug 1332211 - refactor animation code in AsyncCompositionManager, r=hiro
MozReview-Commit-ID: 5PGYTv1cSeT
2017-01-26 15:04:16 +08:00
peter chang
0ec7b5f26c Bug 1332211 - Move Layer::SetAnimation into AnimationHelper, r=hiro
MozReview-Commit-ID: JQMAJt8lvYo
2017-01-25 10:51:30 +08:00
David Anderson
d46521f0e5 Move ScrollDirection to LayersTypes.h and make it a proper enum. (bug 1332567 part 1, r=kats) 2017-01-24 16:41:17 -08:00
Carsten "Tomcat" Book
c64603aa7e Merge mozilla-central to autoland 2017-01-12 10:39:04 +01:00
peter chang
c49fdee3dd Bug 1328229 - Remove the layer dependency for SampleAnimation, r=birtles
MozReview-Commit-ID: 78D3c7t8tIi
2017-01-10 10:03:47 +08:00
Hiroyuki Ikezoe
9940e0fd49 Bug 1325193 - Get underlying style value in the case where the last segment is missing keyframe for accumulation of iteration composite. r=birtles
Both of tests in this patch fail and cause lots of assertions without this fix.

MozReview-Commit-ID: CFrWSlM0Us5
2017-01-12 10:28:46 +09:00
Hiroyuki Ikezoe
d226a317df Bug 1311620 - Part 2: Don't call StyleAnimationValue::GetUnit() against uninitialized values, use IsNull() instead. r=birtles
MozReview-Commit-ID: JAcHqsgpdDB
2016-12-24 17:26:50 +09:00
Hiroyuki Ikezoe
51dbd0134d Bug 1305325 - Part 14: Compose base values on the compositor. r=birtles
MozReview-Commit-ID: EWumBqQ82RT
2016-12-04 08:07:40 +09:00
Hiroyuki Ikezoe
e6601b6c53 Bug 1305325 - Part 10: Make SampleValue return StyleAnimationValue. r=birtles
MozReview-Commit-ID: Izr6Cvee96Q
2016-12-04 08:07:40 +09:00
Hiroyuki Ikezoe
d8041fa2b6 Bug 1305325 - Part 9: Send animations even if it's paused, finished or zero playback rate. r=birtles.
If all of animations on an element are paused, finished or zero playback rate,
we don't send those animations to the compositor.
Also in this change, we send zero active duration animations to the compositor
in the same way as normail animations.

MozReview-Commit-ID: CHjv6Buy5fa
2016-12-02 15:34:13 +09:00
Bas Schouten
cd0155b68f Bug 1317843 - Split LayerManagerComposite into two classes. r=jrmuizel 2016-11-24 18:11:27 +13:00
Hiroyuki Ikezoe
723ccec4d8 Bug 1304886 - Part 1: Make StyleAnimationValue::Accumulate() infallible. r=birtles
MozReview-Commit-ID: 9ve3k6a3eAg
2016-11-16 20:32:26 +09:00
Botond Ballo
064e2717e4 Bug 1315854 - Account for rounding error when checking if certain transforms are the identity in AsyncCompositionManager::AlignFixedAndStickyLayers(). r=mstange
MozReview-Commit-ID: 4xxuqWHedeS
2016-11-16 15:59:24 -05:00
Kartikaya Gupta
88d479e33e Bug 1311030 - Remove more code unused since the deletion of JPZ. r=snorp
MozReview-Commit-ID: 1p8aWShTrQf
2016-10-18 12:34:25 -04:00
Kartikaya Gupta
374b5eeb47 Bug 1305969 - Ensure we don't clear the paint sync id unless it has actually been sent to Java via SyncViewportInfo. r=rbarker
MozReview-Commit-ID: FXy6xeWjqHq
2016-10-15 09:02:50 -04:00
Hiroyuki Ikezoe
b3c188145a Bug 1223658 - Part 3: Consider fillMode in compositor thread as well. r=birtles
We need to consider fill mode in compositor thread as well as other properties
because pulling the animation back from the compositor thread is sometimes
delayed due to the main thread busyness.  In such situations, if there is
another animation running on the main thread on the same element, users can
easily notice a gap between both of animations.

MozReview-Commit-ID: 1i7YTWboira
2016-10-14 19:14:11 +09:00
Hiroyuki Ikezoe
c2817650ed Bug 1223658 - Part 2: Pass delay property to compositor. r=birtles
The check of negative elapsedDuration is basically no longer valid since
animation delay is not factored into start time any more.  But still we have
somtimes met negative elapsedDuration sice we use a previous vsync time stamp
for async animations to make the animations more sync.  This is not a problem
in most cases but makes two reftests intermitent failure because both of them
used steps(1, start), the steps(1, start) composed different results in the
before phase and in the active phase. To avoid this difference this patch
replace the steps(1, start) with steps(1, end).

Once we incorpolate playbackRate into GetCurrentOrPendingStartTime, we don't
need to call AnimationTimeToTimeStamp for deviding delay by playbackRate since
the time passed to AnimationTimeToTimeStamp does not contain delay any more.

MozReview-Commit-ID: IVE2IFfNgm0
2016-10-14 19:14:01 +09:00
Kevin Wern
0249c4fc96 Bug 1227233: Increase scope of TreeTraversal.h to by-value traversal r=botond
MozReview-Commit-ID: LOw1k792T10
2016-09-22 12:31:26 -04:00
Jim Chen
e32ed5b400 Bug 1306083 - 1. Use AndroidCompositorWidget to access GeckoLayerClient; r=kats
Add AndroidCompositorWidget to act as the intermediary between gfx code
and GeckoLayerClient, in place of AndroidBridge. AndroidCompositorWidget
currently inherits from InProcessCompositorWidget, but when Android
eventually supports OOP compositing, it will be made to inherit from
CompositorWidget directly.
2016-10-03 12:26:00 -04:00
Botond Ballo
5ed0199f11 Bug 1288210 - In AlignFixedAndStickyLayers, propagate the unconsumed portion of the adjustment to descendant layers. r=mstange
MozReview-Commit-ID: DOOCRA0RHtr
2016-09-23 19:32:57 -04:00
Botond Ballo
5e1641d688 Bug 1288210 - Don't use ForEachNode in AlignFixedAndStickyLayers. r=mstange
It would make the next change awkard.

This also temporarily removes the current, incomplete, handling of an
unconsumed translation, but this will be added back (and made complete)
in the next commit.

MozReview-Commit-ID: 2tPOjEMRKfj
2016-09-23 19:32:09 -04:00
Botond Ballo
b39572b687 Bug 1288210 - Simplify AlignFixedAndStickyLayers by not considering the local transform. r=kats,mstange
There shouldn't be a local transform because we create container layers
for fixed layers, so any transform would be on a descendant layer instead.

MozReview-Commit-ID: Kmya9vHZx1n
2016-09-28 13:33:38 -04:00
Botond Ballo
14ad0c6f0f Bug 1288210 - Simplify AlignFixedAndStickyLayers by not considering the ancestor transform. r=kats,mstange
There shouldn't be an ancestor transform, because transforms create
containing blocks for fixed-position descendants.

MozReview-Commit-ID: IVp1djLgIV9
2016-09-23 19:52:15 -04:00
Botond Ballo
dfe73be5b6 Bug 1288210 - Fixed a bug in how the ancestor transform is computed in AlignFixedAndStickyLayers. r=mstange
MozReview-Commit-ID: 8TL7PNpYv6R
2016-09-26 17:19:34 -04:00
Botond Ballo
a621afb00a Bug 1288210 - Improve the use of strongly typed units in AsyncCompositionManager. r=mstange
MozReview-Commit-ID: 1EfGg0MNSBm
2016-09-21 17:33:29 -04:00
Hiroyuki Ikezoe
68331a33cc Bug 1216843 - Part 2: Implement effect iteration composition. r=birtles, r=smaug
MozReview-Commit-ID: 6u7WtXwL3y3
2016-09-13 11:48:44 +09:00
Nicolas Silva
fdb7ab259e Bug 1301027 - Remove the matrix * point operator and replace it with TransformPoint methods. r=Bas 2016-09-08 18:26:03 +02:00
Brian Birtles
cf51ad1c35 Bug 1300045 part 2 - Split KeyframeEffect.cpp into KeyframeEffect{ReadOnly}.cpp r=hiro,smaug
MozReview-Commit-ID: DdBEicunApv
2016-09-04 16:34:21 +09:00