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

Issue 1589463002: compositor worker: Use a WebThread for the compositor thread. (Closed)

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

Description

compositor worker: Use a WebThread for the compositor thread. The first attempt (crrev.com/362924) had to be reverted (crrev.com/367051) because it caused perf regressions (crbug.com/565789). It turns out, the regression was caused because of using the default task-runner from the scheduler, instead of directly using the thread's task runner. To fix this, create a slightly specialized version of WebThreadImplForWorkerScheduler that uses the thread's task runner as the default ask runner. BUG=565789, 430155 Committed: https://crrev.com/ff12c00a9fbf19fc5ab5621d8e76031d5bef7c11 Cr-Commit-Position: refs/heads/master@{#369532}

Patch Set 1 : . #

Patch Set 2 : self-nits #

Total comments: 2

Patch Set 3 : compositor-worker-scheduler #

Patch Set 4 : fix-mandoline-tests #

Total comments: 10

Patch Set 5 : . #

Patch Set 6 : self-nit #

Patch Set 7 : . #

Patch Set 8 : self.nit #

Unified diffs Side-by-side diffs Delta from patch set Stats (+182 lines, -42 lines) Patch
M components/html_viewer/blink_platform_impl.cc View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
A components/scheduler/child/compositor_worker_scheduler.h View 1 2 3 4 1 chunk +45 lines, -0 lines 0 comments Download
A components/scheduler/child/compositor_worker_scheduler.cc View 1 2 3 4 1 chunk +53 lines, -0 lines 0 comments Download
M components/scheduler/child/webthread_impl_for_worker_scheduler.h View 1 2 3 4 2 chunks +7 lines, -0 lines 0 comments Download
M components/scheduler/child/webthread_impl_for_worker_scheduler.cc View 1 2 3 4 4 chunks +19 lines, -10 lines 0 comments Download
M components/scheduler/child/webthread_impl_for_worker_scheduler_unittest.cc View 3 4 1 chunk +1 line, -0 lines 0 comments Download
M components/scheduler/scheduler.gypi View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M content/child/blink_platform_impl.h View 1 2 3 4 5 6 1 chunk +4 lines, -9 lines 0 comments Download
M content/child/blink_platform_impl.cc View 1 2 3 4 5 6 7 3 chunks +23 lines, -15 lines 0 comments Download
M content/renderer/render_thread_impl.h View 3 4 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/render_thread_impl.cc View 1 2 3 4 5 6 5 chunks +26 lines, -7 lines 0 comments Download

Messages

Total messages: 22 (10 generated)
sadrul
Hi! Would you mind reviewing the changes in components/scheduler and the WebThreadForCompositor implementation in blink_platform_impl.cc? ...
4 years, 11 months ago (2016-01-13 16:58:52 UTC) #5
Sami
https://codereview.chromium.org/1589463002/diff/40001/components/scheduler/child/webthread_impl_for_worker_scheduler.h File components/scheduler/child/webthread_impl_for_worker_scheduler.h (right): https://codereview.chromium.org/1589463002/diff/40001/components/scheduler/child/webthread_impl_for_worker_scheduler.h#newcode55 components/scheduler/child/webthread_impl_for_worker_scheduler.h:55: virtual bool UseThreadTaskRunnerAsDefault() const; This is a dangerous API ...
4 years, 11 months ago (2016-01-13 17:17:05 UTC) #7
sadrul
Appreciate the quick feedback! https://codereview.chromium.org/1589463002/diff/40001/components/scheduler/child/webthread_impl_for_worker_scheduler.h File components/scheduler/child/webthread_impl_for_worker_scheduler.h (right): https://codereview.chromium.org/1589463002/diff/40001/components/scheduler/child/webthread_impl_for_worker_scheduler.h#newcode55 components/scheduler/child/webthread_impl_for_worker_scheduler.h:55: virtual bool UseThreadTaskRunnerAsDefault() const; On ...
4 years, 11 months ago (2016-01-13 18:29:32 UTC) #8
Sami
I think having a special CompositorWorkerScheduler is fine -- mainly because of the GC issue ...
4 years, 11 months ago (2016-01-14 13:55:05 UTC) #9
sadrul
https://codereview.chromium.org/1589463002/diff/80001/components/scheduler/child/child_scheduler.h File components/scheduler/child/child_scheduler.h (right): https://codereview.chromium.org/1589463002/diff/80001/components/scheduler/child/child_scheduler.h#newcode25 components/scheduler/child/child_scheduler.h:25: virtual scoped_refptr<base::SingleThreadTaskRunner> DefaultTaskRunner() = 0; On 2016/01/14 13:55:04, Sami ...
4 years, 11 months ago (2016-01-14 15:20:40 UTC) #10
Sami
Thanks, we can land this pass-through scheduler for now and keep investigating the perf regression ...
4 years, 11 months ago (2016-01-14 17:57:08 UTC) #11
sadrul
Thank you! > I'd really love to know what is causing the performance difference though. ...
4 years, 11 months ago (2016-01-14 18:22:05 UTC) #12
sadrul
+piman@ to review the changes in content/ (I have tried to make sure the concerns ...
4 years, 11 months ago (2016-01-14 19:15:33 UTC) #14
piman
lgtm
4 years, 11 months ago (2016-01-14 19:34:11 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1589463002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1589463002/160001
4 years, 11 months ago (2016-01-14 19:56:32 UTC) #18
commit-bot: I haz the power
Committed patchset #8 (id:160001)
4 years, 11 months ago (2016-01-14 20:52:27 UTC) #20
commit-bot: I haz the power
4 years, 11 months ago (2016-01-14 20:53:50 UTC) #22
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/ff12c00a9fbf19fc5ab5621d8e76031d5bef7c11
Cr-Commit-Position: refs/heads/master@{#369532}

Powered by Google App Engine
This is Rietveld 408576698