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

Issue 2924573002: [NotForReview] Convert accelerated JPEG Decoder IPC to Mojo

Created:
3 years, 6 months ago by Chandan
Modified:
3 years, 6 months ago
Reviewers:
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

[NotForReview] Convert accelerated JPEG Decoder IPC to Mojo BUG=699255 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel

Patch Set 1 #

Total comments: 2

Patch Set 2 : . #

Patch Set 3 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+313 lines, -716 lines) Patch
M content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.h View 1 3 chunks +5 lines, -15 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.cc View 1 4 chunks +22 lines, -38 lines 0 comments Download
M content/gpu/gpu_child_thread.cc View 1 2 2 chunks +7 lines, -0 lines 0 comments Download
M media/gpu/BUILD.gn View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M media/gpu/ipc/DEPS View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M media/gpu/ipc/client/gpu_jpeg_decode_accelerator_host.h View 1 2 chunks +9 lines, -24 lines 0 comments Download
M media/gpu/ipc/client/gpu_jpeg_decode_accelerator_host.cc View 1 2 4 chunks +64 lines, -149 lines 0 comments Download
M media/gpu/ipc/service/gpu_jpeg_decode_accelerator.h View 1 2 4 chunks +25 lines, -42 lines 0 comments Download
M media/gpu/ipc/service/gpu_jpeg_decode_accelerator.cc View 1 2 6 chunks +126 lines, -314 lines 0 comments Download
M media/gpu/ipc/service/gpu_jpeg_decode_accelerator_unittest.cc View 1 2 3 chunks +51 lines, -91 lines 0 comments Download
M media/gpu/ipc/service/media_gpu_channel.h View 3 chunks +0 lines, -3 lines 0 comments Download
M media/gpu/ipc/service/media_gpu_channel.cc View 1 chunk +0 lines, -38 lines 0 comments Download

Messages

Total messages: 8 (4 generated)
Chandan
This CL did not get submitted when I tried with git cl upload --gerrit. Hence, ...
3 years, 6 months ago (2017-06-05 14:28:18 UTC) #3
mcasas
On 2017/06/05 14:28:18, Chandan wrote: > This CL did not get submitted when I tried ...
3 years, 6 months ago (2017-06-06 00:20:39 UTC) #4
mcasas
https://codereview.chromium.org/2924573002/diff/1/media/gpu/ipc/client/gpu_jpeg_decode_accelerator_host.h File media/gpu/ipc/client/gpu_jpeg_decode_accelerator_host.h (right): https://codereview.chromium.org/2924573002/diff/1/media/gpu/ipc/client/gpu_jpeg_decode_accelerator_host.h#newcode31 media/gpu/ipc/client/gpu_jpeg_decode_accelerator_host.h:31: scoped_refptr<base::SingleThreadTaskRunner> io_task_runner); Don't name explicitly where a method is ...
3 years, 6 months ago (2017-06-06 00:20:48 UTC) #5
Chandan
3 years, 6 months ago (2017-06-06 10:37:15 UTC) #6
@mcasas, thank you for the suggestion.

But, I found it difficult to migrate each message seperately as creation of
GpuJpegDecodeAccelerator
is moved from MediaGpuChannel to GpuChildThread for registration. A valid
GpuChannel is necessary for
other messages to work while we migrate one. Unfortunately, it wasnt available
at the time of registration.

Currently, there are 4 ipc messages(initialize, decode, decodeack and destroy)
between browser and gpu
for jpeg decoder. As we migrate to mojo, 2 of them(decodeack and destroy) more
or less become redundant
and most probably would be removed. So, we are left with only 2 messages which
makes their replacement
with mojo calls relatively easier.

As far as unittests are concerned, please let me know which unittests I need to
take care of.
I was able to find one (gpu_jpeg_decode_accelerator_unittest.cc) which I feel
can be replaced 
with a unified unittest where we test mojo communication between GJDAH and GJDA.

I have moved this CL to gerrit.
https://chromium-review.googlesource.com/c/525672

https://codereview.chromium.org/2924573002/diff/1/media/gpu/ipc/client/gpu_jp...
File media/gpu/ipc/client/gpu_jpeg_decode_accelerator_host.h (right):

https://codereview.chromium.org/2924573002/diff/1/media/gpu/ipc/client/gpu_jp...
media/gpu/ipc/client/gpu_jpeg_decode_accelerator_host.h:31:
scoped_refptr<base::SingleThreadTaskRunner> io_task_runner);
On 2017/06/06 00:20:48, mcasas wrote:
> Don't name explicitly where a method is supposed to run:
> name instead by its inteded usage, comment that this is 
> usually the IO thread, and assert for its specific restrictions 
> using, e.g.
>
https://cs.chromium.org/chromium/src/base/threading/thread_restrictions.cc?ty...
> 
> That'll simplify unit testing ;)

Sure. But the name |io_task_runner| was already present. I did not rename it.
Also, GpuJpegDecodeAcceleratorHost does not run on IO. IO task runner is given
to GJDAH to ensure/check that it receives the ack IPC message on IO thread.

Powered by Google App Engine
This is Rietveld 408576698