Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(110)

Issue 2007413002: [POC; Not for Review] Don't use PostTask queueing between compositor and main thread. (Closed)

Created:
4 years, 7 months ago by dtapuska
Modified:
4 years, 5 months ago
CC:
chromium-reviews, darin-cc_chromium.org, dtapuska+chromiumwatch_chromium.org, jam, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-content_chromium.org, ojan
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Don't use PostTask queueing between compositor and main thread. Instead put the events in the main thread event queue where they can be coalesced. Don't look at this code too much it is only proof of concept. I expect I could clean up the code substantially by using 1 underlying queue instead of 3. BUG=599152

Patch Set 1 #

Patch Set 2 : Improve mouse move by making it non blocking #

Total comments: 13
Unified diffs Side-by-side diffs Delta from patch set Stats (+186 lines, -67 lines) Patch
M content/common/input/web_input_event_traits.cc View 1 1 chunk +1 line, -0 lines 2 comments Download
M content/renderer/input/input_event_filter.h View 1 chunk +4 lines, -4 lines 0 comments Download
M content/renderer/input/input_event_filter.cc View 3 chunks +6 lines, -3 lines 2 comments Download
M content/renderer/input/main_thread_event_queue.h View 4 chunks +32 lines, -6 lines 3 comments Download
M content/renderer/input/main_thread_event_queue.cc View 3 chunks +143 lines, -54 lines 6 comments Download

Messages

Total messages: 10 (2 generated)
dtapuska
4 years, 7 months ago (2016-05-25 18:57:30 UTC) #3
dtapuska
On 2016/05/25 18:57:30, dtapuska wrote: Feel free to harp on this design; I'm sure much ...
4 years, 7 months ago (2016-05-25 18:58:13 UTC) #4
aelias_OOO_until_Jul13
Seems OK. I like that this also would make it easier to annotate the input ...
4 years, 7 months ago (2016-05-25 22:16:01 UTC) #5
tdresser
High level approach LGTM. https://codereview.chromium.org/2007413002/diff/20001/content/common/input/web_input_event_traits.cc File content/common/input/web_input_event_traits.cc (right): https://codereview.chromium.org/2007413002/diff/20001/content/common/input/web_input_event_traits.cc#newcode493 content/common/input/web_input_event_traits.cc:493: case WebInputEvent::MouseMove: Will we still ...
4 years, 6 months ago (2016-05-30 14:05:32 UTC) #6
Sami
https://codereview.chromium.org/2007413002/diff/20001/content/renderer/input/input_event_filter.cc File content/renderer/input/input_event_filter.cc (left): https://codereview.chromium.org/2007413002/diff/20001/content/renderer/input/input_event_filter.cc#oldcode242 content/renderer/input/input_event_filter.cc:242: main_task_runner_->PostTask(FROM_HERE, base::Bind(main_listener_, new_msg)); Some of the logic in the ...
4 years, 6 months ago (2016-05-31 16:49:34 UTC) #7
dtapuska
https://codereview.chromium.org/2007413002/diff/20001/content/common/input/web_input_event_traits.cc File content/common/input/web_input_event_traits.cc (right): https://codereview.chromium.org/2007413002/diff/20001/content/common/input/web_input_event_traits.cc#newcode493 content/common/input/web_input_event_traits.cc:493: case WebInputEvent::MouseMove: On 2016/05/30 14:05:32, tdresser wrote: > Will ...
4 years, 6 months ago (2016-06-01 18:22:54 UTC) #8
Rick Byers
Yes I think this approach is a good step in the right direction. In particular, ...
4 years, 6 months ago (2016-06-01 18:27:37 UTC) #9
dtapuska
4 years, 5 months ago (2016-07-19 19:46:44 UTC) #10
On 2016/06/01 18:27:37, Rick Byers (out until Aug 1) wrote:
> Yes I think this approach is a good step in the right direction.  In
particular,
> it makes sense to want to use the current co-ordinates when dispatching an
input
> event, rather than whatever the co-ordinates were when the task got posted -
> will decrease input latency when the main thread is congested.
> 
> Ultimately we want to move to a model where input events are integrated with
the
> document lifecycle (i.e. sent in the context of WebViewImpl::beginFrame like
> scroll events and raf callbacks are).
> 
> Doing that would probably make this CL simpler - prevent the need for "handle
> input now" tasks (the compositor would just need to know to schedule a main
> frame when there is pending input).  However it involves some extra
complexity. 
> In particular we'd probably want to interpolate/extrapolate the
> positions/timestamps (like BufferedInputRouter and the android framework do). 
> It also potentially hurts latency in some cases (probably only want that if we
> can disable the Android Framework's own input event queue).
> 
> So I agree that something like this patch is the right next step, improving
some
> scenarios without adding new problems / risks.

Follow on change is here: https://codereview.chromium.org/2162143002/

Powered by Google App Engine
This is Rietveld 408576698