|
|
Chromium Code Reviews|
Created:
3 years, 9 months ago by sadrul Modified:
3 years, 9 months ago Reviewers:
Ken Rockot(use gerrit already) CC:
chromium-reviews, piman+watch_chromium.org, rjkroege Target Ref:
refs/heads/master Project:
chromium Visibility:
Public. |
Descriptionmus-gpu: Talk to the GpuHost from the IO thread.
Bind the GpuHost connection on the IO thread, so that messages
from the gpu process can still be sent to the host process (i.e.
chrome browser) while the main thread is blocked.
BUG=643746
Review-Url: https://codereview.chromium.org/2764753004
Cr-Commit-Position: refs/heads/master@{#458722}
Committed: https://chromium.googlesource.com/chromium/src/+/66d333e3d935e43745ad8ae27b5b76a3a34f4917
Patch Set 1 #
Total comments: 3
Patch Set 2 : simplify #Patch Set 3 : . #
Messages
Total messages: 33 (20 generated)
The CQ bit was checked by sadrul@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
sadrul@chromium.org changed reviewers: + rockot@chromium.org
https://codereview.chromium.org/2764753004/diff/1/services/ui/gpu/gpu_service.cc File services/ui/gpu/gpu_service.cc (right): https://codereview.chromium.org/2764753004/diff/1/services/ui/gpu/gpu_service... services/ui/gpu/gpu_service.cc:121: gpu_host_ = mojom::ThreadSafeGpuHostPtr::Create(std::move(gpu_host)); The ThreadSafeInterfacePtr itself is thread-safe, but |gpu_host_| storage is not. This would need to be guarded by a lock now, wouldn't it? You can avoid this by instead calling, in the constructor: gpu_host_ = mojom::ThreadSafeGpuHostPtr::Create(gpu_host.PassInterface(), io_runner_); I don't think you'd need a CancelableTaskTracker then either?
https://codereview.chromium.org/2764753004/diff/1/services/ui/gpu/gpu_service.cc File services/ui/gpu/gpu_service.cc (right): https://codereview.chromium.org/2764753004/diff/1/services/ui/gpu/gpu_service... services/ui/gpu/gpu_service.cc:121: gpu_host_ = mojom::ThreadSafeGpuHostPtr::Create(std::move(gpu_host)); On 2017/03/21 22:40:35, Ken Rockot wrote: > The ThreadSafeInterfacePtr itself is thread-safe, but |gpu_host_| storage is > not. This would need to be guarded by a lock now, wouldn't it? > > You can avoid this by instead calling, in the constructor: > > gpu_host_ = mojom::ThreadSafeGpuHostPtr::Create(gpu_host.PassInterface(), > io_runner_); > > I don't think you'd need a CancelableTaskTracker then either? Ooh, so ThreadSafe* can be take a task-runner of a different thread? That's awesome :) Yep, that simplifies this a lot. I will make that change. Thanks!
The CQ bit was checked by sadrul@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was checked by sadrul@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: ios-simulator-xcode-clang on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator-xco...)
https://codereview.chromium.org/2764753004/diff/1/services/ui/gpu/gpu_service.cc File services/ui/gpu/gpu_service.cc (right): https://codereview.chromium.org/2764753004/diff/1/services/ui/gpu/gpu_service... services/ui/gpu/gpu_service.cc:121: gpu_host_ = mojom::ThreadSafeGpuHostPtr::Create(std::move(gpu_host)); On 2017/03/21 22:43:10, sadrul wrote: > On 2017/03/21 22:40:35, Ken Rockot wrote: > > The ThreadSafeInterfacePtr itself is thread-safe, but |gpu_host_| storage is > > not. This would need to be guarded by a lock now, wouldn't it? > > > > You can avoid this by instead calling, in the constructor: > > > > gpu_host_ = mojom::ThreadSafeGpuHostPtr::Create(gpu_host.PassInterface(), > > io_runner_); > > > > I don't think you'd need a CancelableTaskTracker then either? > > Ooh, so ThreadSafe* can be take a task-runner of a different thread? That's > awesome :) Yep, that simplifies this a lot. I will make that change. Thanks! Done.
lgtm
The CQ bit was checked by sadrul@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: ios-simulator-xcode-clang on master.tryserver.chromium.mac (JOB_TIMED_OUT, build hasn't started yet, builder probably lacks capacity)
The CQ bit was checked by sadrul@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: ios-simulator on master.tryserver.chromium.mac (JOB_TIMED_OUT, build hasn't started yet, builder probably lacks capacity)
The CQ bit was checked by sadrul@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: ios-simulator-xcode-clang on master.tryserver.chromium.mac (JOB_TIMED_OUT, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator-xco...)
The CQ bit was checked by sadrul@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch.
Bot data: {"patchset_id": 40001, "attempt_start_ts": 1490183432030170,
"parent_rev": "9a3e6e43c4bdce4bdb64cbeb3f5bcf61d35e2ff7", "commit_rev":
"66d333e3d935e43745ad8ae27b5b76a3a34f4917"}
Message was sent while issue was closed.
Description was changed from ========== mus-gpu: Talk to the GpuHost from the IO thread. Bind the GpuHost connection on the IO thread, so that messages from the gpu process can still be sent to the host process (i.e. chrome browser) while the main thread is blocked. BUG=643746 ========== to ========== mus-gpu: Talk to the GpuHost from the IO thread. Bind the GpuHost connection on the IO thread, so that messages from the gpu process can still be sent to the host process (i.e. chrome browser) while the main thread is blocked. BUG=643746 Review-Url: https://codereview.chromium.org/2764753004 Cr-Commit-Position: refs/heads/master@{#458722} Committed: https://chromium.googlesource.com/chromium/src/+/66d333e3d935e43745ad8ae27b5b... ==========
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as https://chromium.googlesource.com/chromium/src/+/66d333e3d935e43745ad8ae27b5b... |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
