WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
71638
[chromium] Fix handling of setNeedsCommit and setNeedsAnimate in threaded mode
https://bugs.webkit.org/show_bug.cgi?id=71638
Summary
[chromium] Fix handling of setNeedsCommit and setNeedsAnimate in threaded mode
Nat Duca
Reported
2011-11-06 14:55:26 PST
[chromium] Fix handling of setNeedsCommit and setNeedsAnimate in threaded mode
Attachments
Patch
(8.02 KB, patch)
2011-11-06 14:55 PST
,
Nat Duca
no flags
Details
Formatted Diff
Diff
Patch
(11.39 KB, patch)
2011-11-17 17:08 PST
,
Nat Duca
jamesr
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Nat Duca
Comment 1
2011-11-06 14:55:57 PST
Created
attachment 113805
[details]
Patch
James Robinson
Comment 2
2011-11-06 18:25:16 PST
Comment on
attachment 113805
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=113805&action=review
almost there but i see one possible issue
> Source/WebCore/platform/graphics/chromium/cc/CCThreadProxy.cpp:64 > + : m_animationRequested(false)
huh, so we had an m_animationRequested bool but weren't using it? odd i think i'd spell it m_animateRequested
> Source/WebCore/platform/graphics/chromium/cc/CCThreadProxy.cpp:202 > + if (m_animationRequested)
hm, this change means we might trigger 2 setNeedsCommit calls on the impl side whereas before we wouldn't. looking at the scheduler and state machine i think this will be fine but could you double check? i'm thinking of this case in particular: main thread: setNeedsAnimate() -> post setNeedsAnimateOnImplThread impl thread: setNeedsAnimateOnImplThread -> BFAC sent main thread: setNeedsCommit() -> post setNeedsCommitOnImplThread, clears m_needsCommit on CCSchedulerStateMachine impl thread: setNeedsCommitOnImplThread -> sets need commit on scheduler even though a BFAC is pending main thread: BFAC -> animate, layout, post BFAC on impl thread impl thread: run commit at this point we'll still have m_needsCommit set on the scheduler state machine, and i think we'll do another spurious commit once the state machine goes back to idle. i think the fix is to set m_needsCommit to false in CCSchedulerStateMachine::beginFrameComplete() instead of ::updateState()
> Source/WebCore/platform/graphics/chromium/cc/CCThreadProxy.cpp:377 > + m_layerTreeHost->applyScrollDeltas(*scrollInfo.get());
nit: i realize this was already here, but the .get() is redundant. operator* on WebKit smart pointer types does the right thing
> Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp:647 > + virtual void drawLayersOnCCThread(CCLayerTreeHostImpl* impl)
i think test should really be checking for animateAndLayout() calls, not drawing. the fact that we draw multiple times on this test is a consequence of the fact that we always draw after commit, which IMO is a bug - we should draw when the commit does something requiring drawing, but otherwise no. setNeedsAnimate() should trigger an animateAndLayout() at the right time - commit/draw interaction is a different piece of the system
Nat Duca
Comment 3
2011-11-17 17:08:15 PST
Created
attachment 115711
[details]
Patch
James Robinson
Comment 4
2011-11-17 17:28:44 PST
Comment on
attachment 115711
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=115711&action=review
R=me
> Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp:692 > + virtual void animateAndLayout(double impl)
parameter name doesn't make much sense here
Nat Duca
Comment 5
2011-11-17 18:08:52 PST
Committed
r100708
: <
http://trac.webkit.org/changeset/100708
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug