Description was changed from ========== [WIP] First attempt to cancel compositor running animation initiated by ...
4 years, 9 months ago
(2016-03-07 15:53:50 UTC)
#1
Description was changed from
==========
[WIP] First attempt to cancel compositor running animation initiated by MT
BUG=
==========
to
==========
Takeover MT initiated animations from the compositor
This is a follup CL to https://crrev.com/1734063003/. It finishes a
MT initiated animation running on the compositor, on the MT.
==========
Description was changed from ========== Takeover MT initiated animations from the compositor This is a ...
4 years, 9 months ago
(2016-03-07 15:54:49 UTC)
#3
Description was changed from
==========
Takeover MT initiated animations from the compositor
This is a follup CL to https://crrev.com/1734063003/. It finishes a
MT initiated animation running on the compositor, on the MT.
==========
to
==========
Takeover MT initiated animations from the compositor
This is a follup CL to https://crrev.com/1734063003/. It finishes a
MT initiated animation running on the compositor, on the MT.
BUG=581875
==========
ymalik
4 years, 9 months ago
(2016-03-07 15:55:11 UTC)
#4
ajuma
lgtm Please update the description to say a bit more about why we'd want to ...
4 years, 9 months ago
(2016-03-07 16:42:11 UTC)
#5
4 years, 9 months ago
(2016-03-07 17:57:21 UTC)
#7
+Jeremy for Source/core, Source/platform
jbroman
Description was changed from ========== Takeover MT initiated animations from the compositor This is a ...
4 years, 9 months ago
(2016-03-07 18:12:35 UTC)
#8
Description was changed from
==========
Takeover MT initiated animations from the compositor
This is a follup CL to https://crrev.com/1734063003/. It finishes a
MT initiated animation running on the compositor, on the MT.
BUG=581875
==========
to
==========
Takeover MT initiated animations from the compositor
This is a followup CL to https://crrev.com/1734063003/. It finishes a
MT initiated animation running on the compositor, on the MT.
BUG=581875
==========
jbroman
rs lgtm with nits I'm relying on ajuma's review for the correctness of the scrolling ...
4 years, 9 months ago
(2016-03-07 18:38:41 UTC)
#9
rs lgtm with nits
I'm relying on ajuma's review for the correctness of the scrolling logic.
https://codereview.chromium.org/1770443002/diff/60001/third_party/WebKit/Sour...
File third_party/WebKit/Source/platform/scroll/ScrollAnimator.cpp (right):
https://codereview.chromium.org/1770443002/diff/60001/third_party/WebKit/Sour...
third_party/WebKit/Source/platform/scroll/ScrollAnimator.cpp:218: if
(!m_scrollableArea->shouldScrollOnMainThread()) {
super-nit: this might be a little easier to read with early return:
if (m_scrollableArea->shouldScrollOnMainThread())
return false;
OwnPtr<CompositorAnimation> animation = ...;
// ...
bool sentToCompositor = addAnimation(animation.release();
if (sentToCompositor) {
// ...
}
return sentToCompositor;
It reduces the level of indentation, and I know immediately that
if the scrollable area is on the main thread that nothing happens,
without having to read past the if statement.
https://codereview.chromium.org/1770443002/diff/60001/third_party/WebKit/Sour...
File third_party/WebKit/Source/platform/scroll/ScrollAnimatorTest.cpp (right):
https://codereview.chromium.org/1770443002/diff/60001/third_party/WebKit/Sour...
third_party/WebKit/Source/platform/scroll/ScrollAnimatorTest.cpp:99: explicit
TestScrollAnimator(ScrollableArea* scrollableArea, WTF::TimeFunction
timingFunction = WTF::monotonicallyIncreasingTime)
This is never constructed with the default argument; why have a default?
Also, two-argument constructors need not be explicit.
https://codereview.chromium.org/1770443002/diff/60001/third_party/WebKit/Sour...
third_party/WebKit/Source/platform/scroll/ScrollAnimatorTest.cpp:119: void
abortAnimation() override {};
nit: superfluous semicolon
https://codereview.chromium.org/1770443002/diff/60001/third_party/WebKit/Sour...
third_party/WebKit/Source/platform/scroll/ScrollAnimatorTest.cpp:320:
EXPECT_CALL(*scrollableArea, setScrollOffset(_, _)).Times(3);
It's not entirely obvious to me why we should expect three setScrollOffsets and
four registerForAnimations. Is this a meaningful expectation, or does this just
happen to be the number of calls?
ymalik
https://codereview.chromium.org/1770443002/diff/60001/third_party/WebKit/Source/platform/scroll/ScrollAnimator.cpp File third_party/WebKit/Source/platform/scroll/ScrollAnimator.cpp (right): https://codereview.chromium.org/1770443002/diff/60001/third_party/WebKit/Source/platform/scroll/ScrollAnimator.cpp#newcode218 third_party/WebKit/Source/platform/scroll/ScrollAnimator.cpp:218: if (!m_scrollableArea->shouldScrollOnMainThread()) { On 2016/03/07 18:38:40, jbroman wrote: > ...
4 years, 9 months ago
(2016-03-07 21:26:07 UTC)
#10
https://codereview.chromium.org/1770443002/diff/60001/third_party/WebKit/Sour...
File third_party/WebKit/Source/platform/scroll/ScrollAnimator.cpp (right):
https://codereview.chromium.org/1770443002/diff/60001/third_party/WebKit/Sour...
third_party/WebKit/Source/platform/scroll/ScrollAnimator.cpp:218: if
(!m_scrollableArea->shouldScrollOnMainThread()) {
On 2016/03/07 18:38:40, jbroman wrote:
> super-nit: this might be a little easier to read with early return:
>
> if (m_scrollableArea->shouldScrollOnMainThread())
> return false;
>
> OwnPtr<CompositorAnimation> animation = ...;
> // ...
> bool sentToCompositor = addAnimation(animation.release();
> if (sentToCompositor) {
> // ...
> }
> return sentToCompositor;
>
> It reduces the level of indentation, and I know immediately that
> if the scrollable area is on the main thread that nothing happens,
> without having to read past the if statement.
Agreed. Done!
https://codereview.chromium.org/1770443002/diff/60001/third_party/WebKit/Sour...
File third_party/WebKit/Source/platform/scroll/ScrollAnimatorTest.cpp (right):
https://codereview.chromium.org/1770443002/diff/60001/third_party/WebKit/Sour...
third_party/WebKit/Source/platform/scroll/ScrollAnimatorTest.cpp:99: explicit
TestScrollAnimator(ScrollableArea* scrollableArea, WTF::TimeFunction
timingFunction = WTF::monotonicallyIncreasingTime)
On 2016/03/07 18:38:41, jbroman wrote:
> This is never constructed with the default argument; why have a default?
>
> Also, two-argument constructors need not be explicit.
Done.
https://codereview.chromium.org/1770443002/diff/60001/third_party/WebKit/Sour...
third_party/WebKit/Source/platform/scroll/ScrollAnimatorTest.cpp:320:
EXPECT_CALL(*scrollableArea, setScrollOffset(_, _)).Times(3);
On 2016/03/07 18:38:41, jbroman wrote:
> It's not entirely obvious to me why we should expect three setScrollOffsets
and
> four registerForAnimations. Is this a meaningful expectation, or does this
just
> happen to be the number of calls?
Actually setScrollOffset is called 2 times, and registerForAnimation is called 3
times (I missed the failure earlier as apparently the test still passes if the
EXPECT_CALL expectation is unsatisfied).
The reason for the extra registerForAnimation is that when we are running an
animation on the compositor, we deregister for service because the animation is
serviced by the compositor. Thus, we need to registerForAnimation again if the
animation is cancelled or we need to takeover.
jbroman
https://codereview.chromium.org/1770443002/diff/60001/third_party/WebKit/Source/platform/scroll/ScrollAnimatorTest.cpp File third_party/WebKit/Source/platform/scroll/ScrollAnimatorTest.cpp (right): https://codereview.chromium.org/1770443002/diff/60001/third_party/WebKit/Source/platform/scroll/ScrollAnimatorTest.cpp#newcode320 third_party/WebKit/Source/platform/scroll/ScrollAnimatorTest.cpp:320: EXPECT_CALL(*scrollableArea, setScrollOffset(_, _)).Times(3); On 2016/03/07 at 21:26:07, ymalik1 wrote: ...
4 years, 9 months ago
(2016-03-07 21:33:17 UTC)
#11
https://codereview.chromium.org/1770443002/diff/60001/third_party/WebKit/Sour...
File third_party/WebKit/Source/platform/scroll/ScrollAnimatorTest.cpp (right):
https://codereview.chromium.org/1770443002/diff/60001/third_party/WebKit/Sour...
third_party/WebKit/Source/platform/scroll/ScrollAnimatorTest.cpp:320:
EXPECT_CALL(*scrollableArea, setScrollOffset(_, _)).Times(3);
On 2016/03/07 at 21:26:07, ymalik1 wrote:
> On 2016/03/07 18:38:41, jbroman wrote:
> > It's not entirely obvious to me why we should expect three setScrollOffsets
and
> > four registerForAnimations. Is this a meaningful expectation, or does this
just
> > happen to be the number of calls?
>
> Actually setScrollOffset is called 2 times, and registerForAnimation is called
3 times (I missed the failure earlier as apparently the test still passes if the
EXPECT_CALL expectation is unsatisfied).
Yeah, you'll have to make sure your mock object is collected (if, as here, it's
garbage-collected). I think tdresser ran into a similar issue recently.
> The reason for the extra registerForAnimation is that when we are running an
animation on the compositor, we deregister for service because the animation is
serviced by the compositor. Thus, we need to registerForAnimation again if the
animation is cancelled or we need to takeover.
A brief comment explaining where the magic numbers come from (unless it's
obvious to everyone working on ScrollAnimator) would be nice. :)
https://codereview.chromium.org/1770443002/diff/80001/third_party/WebKit/Sour...
File third_party/WebKit/Source/platform/scroll/ScrollAnimator.cpp (right):
https://codereview.chromium.org/1770443002/diff/80001/third_party/WebKit/Sour...
third_party/WebKit/Source/platform/scroll/ScrollAnimator.cpp:236:
sentToCompositor = addAnimation(animation.release());
nit: move the variable declaration here (delete the declaration above, and
insert "bool" here)
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1770443002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1770443002/100001
4 years, 9 months ago
(2016-03-08 15:27:46 UTC)
#15
Try jobs failed on following builders: linux_chromium_compile_dbg_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_compile_dbg_ng/builds/61024)
4 years, 9 months ago
(2016-03-08 15:39:01 UTC)
#17
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1770443002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1770443002/100001
4 years, 9 months ago
(2016-03-08 17:48:32 UTC)
#19
4 years, 9 months ago
(2016-03-08 18:25:18 UTC)
#20
Message was sent while issue was closed.
Committed patchset #6 (id:100001)
commit-bot: I haz the power
Description was changed from ========== Takeover MT initiated animations from the compositor This is a ...
4 years, 9 months ago
(2016-03-08 18:27:44 UTC)
#21
Message was sent while issue was closed.
Description was changed from
==========
Takeover MT initiated animations from the compositor
This is a followup CL to https://crrev.com/1734063003/. It finishes a
MT initiated animation running on the compositor, on the MT.
BUG=581875
==========
to
==========
Takeover MT initiated animations from the compositor
This is a followup CL to https://crrev.com/1734063003/. It finishes a
MT initiated animation running on the compositor, on the MT.
BUG=581875
Committed: https://crrev.com/d0eaee288867a6e00e4a9c3fa65d28e4de9e922a
Cr-Commit-Position: refs/heads/master@{#379868}
==========
commit-bot: I haz the power
Patchset 6 (id:??) landed as https://crrev.com/d0eaee288867a6e00e4a9c3fa65d28e4de9e922a Cr-Commit-Position: refs/heads/master@{#379868}
4 years, 9 months ago
(2016-03-08 18:27:45 UTC)
#22
Issue 1770443002: Takeover MT initiated animations from the compositor
(Closed)
Created 4 years, 9 months ago by ymalik
Modified 4 years, 9 months ago
Reviewers: jbroman, ajuma
Base URL: https://chromium.googlesource.com/chromium/src.git@master
Comments: 11