RESOLVED FIXED 108051
Coordinated Graphics: remove the DidChangeScrollPosition message.
https://bugs.webkit.org/show_bug.cgi?id=108051
Summary Coordinated Graphics: remove the DidChangeScrollPosition message.
Dongseong Hwang
Reported 2013-01-27 22:06:20 PST
UI Process is source as well as destination of a scroll position, so Web Process is not needed to send a scroll position via the DidChangeScrollPosition message.
Attachments
Patch (7.14 KB, patch)
2013-01-27 22:08 PST, Dongseong Hwang
no flags
Patch (13.32 KB, patch)
2013-02-05 00:51 PST, Dongseong Hwang
no flags
Patch (13.32 KB, patch)
2013-02-05 02:39 PST, Dongseong Hwang
no flags
Patch (14.22 KB, patch)
2013-02-05 18:33 PST, Dongseong Hwang
no flags
Patch (14.22 KB, patch)
2013-02-05 18:42 PST, Dongseong Hwang
no flags
Patch (14.22 KB, patch)
2013-02-06 00:21 PST, Dongseong Hwang
noam: review+
buildbot: commit-queue-
Patch for landing (14.27 KB, patch)
2013-02-11 19:19 PST, Dongseong Hwang
no flags
Dongseong Hwang
Comment 1 2013-01-27 22:08:34 PST
Noam Rosenthal
Comment 2 2013-01-29 06:45:41 PST
Comment on attachment 184939 [details] Patch I think this might cause a timing issue; setVisibleContentsRect can happen more rapidly than didChangeScrollPosition. This message is supposed to make sure we compensate for the different speed. Either I'm missing something, or we shouldn't remove it.
Dongseong Hwang
Comment 3 2013-01-29 14:30:43 PST
(In reply to comment #2) > (From update of attachment 184939 [details]) > I think this might cause a timing issue; setVisibleContentsRect can happen more rapidly than didChangeScrollPosition. > This message is supposed to make sure we compensate for the different speed. Either I'm missing something, or we shouldn't remove it. Yeah, I thought the same to you when I saw code at the first time. But LayerTreeRenderer already has code to deal with the timing issue. In detail, CoordinatedLayerTreeHostProxy calls dispatchUpdate(bind(&LayerTreeRenderer::didChangeScrollPosition, m_renderer.get(), rect.location())); void LayerTreeRenderer::didChangeScrollPosition(const FloatPoint& position) { m_pendingRenderedContentsScrollPosition = position; } and it is applied at time to flush. void LayerTreeRenderer::flushLayerChanges() { m_renderedContentsScrollPosition = m_pendingRenderedContentsScrollPosition; ... }
Noam Rosenthal
Comment 4 2013-01-30 03:02:34 PST
Comment on attachment 184939 [details] Patch As we talked on IRC, this is not the right solution.
Dongseong Hwang
Comment 5 2013-01-31 22:31:43 PST
(In reply to comment #4) > (From update of attachment 184939 [details]) > As we talked on IRC, this is not the right solution. This patch changes the behavior, so this bug is invalid. btw, IMO we have another problem. From your explanation, scroll of coordinated graphics has so long latency. There are 4 IPC messages to draw scrolled contents, as I mentioned in https://bugs.webkit.org/show_bug.cgi?id=105978#c7 UI Process Message Web Process WebPageProxy (wheel ->) WebPage PageViewportController (<- PageDidRequestScroll) WebPage PageViewportController (setVisibleContentsRect ->) CoordinatedLayerTree PageViewportController (<- didRenderFrame) CoordinatedLayerTree (thread communication) LayerTreeRenderer::paint We need to reduce the latency of scroll event. We will do it soon.
Noam Rosenthal
Comment 6 2013-01-31 22:40:26 PST
(In reply to comment #5) > (In reply to comment #4) > > (From update of attachment 184939 [details] [details]) > > As we talked on IRC, this is not the right solution. > > This patch changes the behavior, so this bug is invalid. > > btw, IMO we have another problem. > From your explanation, scroll of coordinated graphics has so long latency. > > There are 4 IPC messages to draw scrolled contents, as I mentioned in https://bugs.webkit.org/show_bug.cgi?id=105978#c7 > > UI Process Message Web Process > WebPageProxy (wheel ->) WebPage > PageViewportController (<- PageDidRequestScroll) WebPage > PageViewportController (setVisibleContentsRect ->) CoordinatedLayerTree > PageViewportController (<- didRenderFrame) CoordinatedLayerTree > (thread communication) > LayerTreeRenderer::paint > > We need to reduce the latency of scroll event. We will do it soon. With wheel, yes. But with touch we handle the scroll immediately by painting the view with an offset right away. The IPC sends messages asynchronously, but the feedback is immediate.
Dongseong Hwang
Comment 7 2013-01-31 23:56:05 PST
(In reply to comment #6) > With wheel, yes. > But with touch we handle the scroll immediately by painting the view with an offset right away. > The IPC sends messages asynchronously, but the feedback is immediate. Yeah, you are right. I missed that. It is why I filed Bug 105497 for EFL.
Dongseong Hwang
Comment 8 2013-02-05 00:51:29 PST
Reopening to attach new patch.
Dongseong Hwang
Comment 9 2013-02-05 00:51:33 PST
Dongseong Hwang
Comment 10 2013-02-05 01:29:20 PST
(In reply to comment #9) > Created an attachment (id=186568) [details] > Patch I reopen because I found the way to remove some code.
Noam Rosenthal
Comment 11 2013-02-05 02:19:05 PST
Comment on attachment 186568 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=186568&action=review Looks great! I thought of doing this a while back. Please get a WK2 owner to sign off. > Source/WebCore/ChangeLog:9 > + at the moment of flushing, so there is not a behavior change if a scrollPosition is sent not a -> no
Dongseong Hwang
Comment 12 2013-02-05 02:39:54 PST
Benjamin Poulain
Comment 13 2013-02-05 13:08:59 PST
Comment on attachment 186584 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=186584&action=review I have no problem with the change. I sign off on this if the ChangeLog is changed to have a good explanation of the change. > Source/WebKit2/ChangeLog:10 > + Coordinated Graphics: remove the DidChangeScrollPosition message. > + https://bugs.webkit.org/show_bug.cgi?id=108051 > + > + Reviewed by NOBODY (OOPS!). > + > + Currently, CoordinatedGraphicsScene::m_renderedContentsScrollPosition is updated > + at the moment of flushing, so there is no behavior change if a scrollPosition is sent > + via DidRenderFrame message instead of DidChangeScrollPosition message. This is not a good ChangeLog. You should explain why you remove DidChangeScrollPosition and how the new design solve the original problem better than DidChangeScrollPosition. You also have all the fields bellow the message to help explain the changes. Great changelogs explain both the "Why" and "What" of the change.
Dongseong Hwang
Comment 14 2013-02-05 18:33:00 PST
Dongseong Hwang
Comment 15 2013-02-05 18:33:56 PST
(In reply to comment #13) > (From update of attachment 186584 [details]) > This is not a good ChangeLog. > > You should explain why you remove DidChangeScrollPosition and how the new design solve the original problem better than DidChangeScrollPosition. > You also have all the fields bellow the message to help explain the changes. > > Great changelogs explain both the "Why" and "What" of the change. You're right. I changed changelog.
Benjamin Poulain
Comment 16 2013-02-05 18:39:55 PST
Comment on attachment 186741 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=186741&action=review > Source/WebKit2/ChangeLog:28 > + Don't send a scroll position because flushPendingLayerChanges() dose Typo: dose -> does.
Dongseong Hwang
Comment 17 2013-02-05 18:42:08 PST
Dongseong Hwang
Comment 18 2013-02-05 18:43:37 PST
noam, could you review again? benjaminp said LGTM :D
Build Bot
Comment 19 2013-02-05 19:51:33 PST
Dongseong Hwang
Comment 20 2013-02-06 00:21:03 PST
Build Bot
Comment 21 2013-02-06 01:35:33 PST
Noam Rosenthal
Comment 22 2013-02-06 01:38:07 PST
Comment on attachment 186776 [details] Patch Benjamin has signed this off for WK2.
Dongseong Hwang
Comment 23 2013-02-06 02:28:26 PST
win bot now seems to have problem. I'll commit later.
Dongseong Hwang
Comment 24 2013-02-11 19:19:33 PST
Created attachment 187757 [details] Patch for landing
WebKit Review Bot
Comment 25 2013-02-11 21:31:18 PST
Comment on attachment 187757 [details] Patch for landing Clearing flags on attachment: 187757 Committed r142578: <http://trac.webkit.org/changeset/142578>
WebKit Review Bot
Comment 26 2013-02-11 21:31:23 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.