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

Issue 1912833002: Pepper takes ownership of a mailbox before passing it to the texture layer. (Closed)

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

Description

Pepper takes ownership of a mailbox before passing it to the texture layer. I replaced the IPC message GpuCommandBufferMsg_ProduceFrontBuffer with GpuCommandBufferMsg_TakeFrontBuffer and GpuCommandBufferMsg_ReturnFrontBuffer. TakeFrontBuffer gives ownership of the front buffer to the client. When the client returns it with ReturnFrontBuffer, the command buffer may choose to reuse it. This means that pepper no longer needs to use SetTextureMailboxWithoutReleaseCallback. BUG=350204, 602484 CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_optional_gpu_tests_rel;tryserver.chromium.mac:mac_optional_gpu_tests_rel;tryserver.chromium.win:win_optional_gpu_tests_rel Committed: https://crrev.com/ed5a6bb9f4321670482acc32a7cb4246a1e22f25 Cr-Commit-Position: refs/heads/master@{#390570}

Patch Set 1 #

Patch Set 2 : Remove dead code. #

Patch Set 3 : Cleanup. #

Patch Set 4 : Fix sync point. #

Patch Set 5 : #

Patch Set 6 : #

Patch Set 7 : Rebase. #

Patch Set 8 : scoped_ptr -> unique_ptr #

Patch Set 9 : #

Total comments: 7

Patch Set 10 : Comments from ccameron. #

Patch Set 11 : Compile errors. #

Patch Set 12 : Fix test. #

Total comments: 14

Patch Set 13 : Comments from piman. #

Total comments: 7

Patch Set 14 : Minor nits. #

Patch Set 15 : More nits. #

Patch Set 16 : Reuse mailboxes. #

Patch Set 17 : Fix test. #

Total comments: 6

Patch Set 18 : Comments from piman. #

Total comments: 6

Patch Set 19 : Comments from bbudge. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+422 lines, -135 lines) Patch
M cc/layers/texture_layer.h View 1 1 chunk +0 lines, -6 lines 0 comments Download
M cc/layers/texture_layer.cc View 1 2 3 1 chunk +0 lines, -20 lines 0 comments Download
M cc/layers/texture_layer_unittest.cc View 1 2 3 4 5 6 1 chunk +0 lines, -27 lines 0 comments Download
M components/mus/gles2/command_buffer_impl.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -1 line 0 comments Download
M components/mus/gles2/command_buffer_impl.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +6 lines, -1 line 0 comments Download
M components/mus/public/interfaces/command_buffer.mojom View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -1 line 0 comments Download
M content/renderer/pepper/pepper_plugin_instance_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +22 lines, -3 lines 0 comments Download
M content/renderer/pepper/pepper_plugin_instance_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +44 lines, -16 lines 0 comments Download
M content/renderer/pepper/ppb_graphics_3d_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +14 lines, -7 lines 0 comments Download
M content/renderer/pepper/ppb_graphics_3d_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 6 chunks +40 lines, -10 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +4 lines, -1 line 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 6 chunks +121 lines, -3 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_mock.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +4 lines, -1 line 0 comments Download
M gpu/command_buffer/tests/gl_texture_mailbox_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 6 chunks +90 lines, -24 lines 0 comments Download
M gpu/ipc/client/command_buffer_proxy_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +4 lines, -1 line 0 comments Download
M gpu/ipc/client/command_buffer_proxy_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +14 lines, -4 lines 0 comments Download
M gpu/ipc/common/gpu_messages.h View 1 2 3 4 5 6 7 8 9 1 chunk +9 lines, -2 lines 0 comments Download
M gpu/ipc/service/gpu_command_buffer_stub.h View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -1 line 0 comments Download
M gpu/ipc/service/gpu_command_buffer_stub.cc View 1 2 3 4 5 6 7 8 9 2 chunks +15 lines, -6 lines 0 comments Download
M ppapi/proxy/ppapi_messages.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +7 lines, -0 lines 0 comments Download
M ppapi/proxy/ppb_graphics_3d_proxy.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +2 lines, -0 lines 0 comments Download
M ppapi/proxy/ppb_graphics_3d_proxy.cc View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +17 lines, -0 lines 0 comments Download
M ppapi/thunk/ppb_graphics_3d_api.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 72 (29 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1912833002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1912833002/80001
4 years, 8 months ago (2016-04-22 01:29:18 UTC) #4
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: ios_dbg_simulator_gn on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator_gn/builds/23362) ios_rel_device_gn on ...
4 years, 8 months ago (2016-04-22 01:30:59 UTC) #6
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1912833002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1912833002/100001
4 years, 8 months ago (2016-04-22 01:36:55 UTC) #8
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: ios_rel_device_gn on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_rel_device_gn/builds/23439) ios_rel_device_ninja on ...
4 years, 8 months ago (2016-04-22 01:39:18 UTC) #10
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1912833002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1912833002/120001
4 years, 8 months ago (2016-04-22 01:46:43 UTC) #12
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win_clang on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_clang/builds/10513)
4 years, 8 months ago (2016-04-22 01:56:58 UTC) #14
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1912833002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1912833002/140001
4 years, 8 months ago (2016-04-22 02:02:43 UTC) #16
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win_chromium_x64_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/202024)
4 years, 8 months ago (2016-04-22 02:35:13 UTC) #18
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1912833002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1912833002/160001
4 years, 8 months ago (2016-04-22 04:45:13 UTC) #20
erikchen
ccameron: Please review.
4 years, 8 months ago (2016-04-22 04:45:24 UTC) #22
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/217172)
4 years, 8 months ago (2016-04-22 06:30:20 UTC) #24
ccameron
This lg overall. That said, there may be subtleties (particularly to the command buffer stuff) ...
4 years, 8 months ago (2016-04-22 18:25:55 UTC) #25
erikchen
https://codereview.chromium.org/1912833002/diff/160001/gpu/command_buffer/service/gles2_cmd_decoder.cc File gpu/command_buffer/service/gles2_cmd_decoder.cc (right): https://codereview.chromium.org/1912833002/diff/160001/gpu/command_buffer/service/gles2_cmd_decoder.cc#newcode4381 gpu/command_buffer/service/gles2_cmd_decoder.cc:4381: Texture* texture = mailbox_manager()->ConsumeTexture(mailbox); On 2016/04/22 18:25:55, ccameron wrote: ...
4 years, 7 months ago (2016-04-25 20:58:24 UTC) #26
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1912833002/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1912833002/180001
4 years, 7 months ago (2016-04-25 20:59:10 UTC) #28
ccameron
Sounds fair, lgtm.
4 years, 7 months ago (2016-04-25 20:59:41 UTC) #29
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/218402)
4 years, 7 months ago (2016-04-25 21:18:02 UTC) #31
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1912833002/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1912833002/200001
4 years, 7 months ago (2016-04-25 21:41:11 UTC) #33
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/218439)
4 years, 7 months ago (2016-04-25 23:09:09 UTC) #35
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1912833002/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1912833002/220001
4 years, 7 months ago (2016-04-26 00:05:22 UTC) #37
erikchen
piman: Please review.
4 years, 7 months ago (2016-04-26 00:54:27 UTC) #39
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-04-26 01:09:20 UTC) #41
piman
https://codereview.chromium.org/1912833002/diff/220001/content/renderer/pepper/ppb_graphics_3d_impl.cc File content/renderer/pepper/ppb_graphics_3d_impl.cc (right): https://codereview.chromium.org/1912833002/diff/220001/content/renderer/pepper/ppb_graphics_3d_impl.cc#newcode267 content/renderer/pepper/ppb_graphics_3d_impl.cc:267: *mailbox = gpu::Mailbox::Generate(); This is kind of costly (generate ...
4 years, 7 months ago (2016-04-26 01:54:01 UTC) #42
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1912833002/280001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1912833002/280001
4 years, 7 months ago (2016-04-27 01:32:04 UTC) #44
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1912833002/300001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1912833002/300001
4 years, 7 months ago (2016-04-27 02:00:55 UTC) #46
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/219404)
4 years, 7 months ago (2016-04-27 03:45:35 UTC) #48
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1912833002/320001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1912833002/320001
4 years, 7 months ago (2016-04-27 16:20:38 UTC) #50
erikchen
piman: PTAL https://codereview.chromium.org/1912833002/diff/220001/content/renderer/pepper/ppb_graphics_3d_impl.cc File content/renderer/pepper/ppb_graphics_3d_impl.cc (right): https://codereview.chromium.org/1912833002/diff/220001/content/renderer/pepper/ppb_graphics_3d_impl.cc#newcode267 content/renderer/pepper/ppb_graphics_3d_impl.cc:267: *mailbox = gpu::Mailbox::Generate(); On 2016/04/26 01:54:01, piman ...
4 years, 7 months ago (2016-04-27 16:31:24 UTC) #51
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-04-27 17:42:21 UTC) #53
piman
https://codereview.chromium.org/1912833002/diff/220001/gpu/command_buffer/service/gles2_cmd_decoder.cc File gpu/command_buffer/service/gles2_cmd_decoder.cc (right): https://codereview.chromium.org/1912833002/diff/220001/gpu/command_buffer/service/gles2_cmd_decoder.cc#newcode4297 gpu/command_buffer/service/gles2_cmd_decoder.cc:4297: NOTREACHED(); On 2016/04/27 16:31:23, erikchen wrote: > On 2016/04/26 ...
4 years, 7 months ago (2016-04-27 23:00:58 UTC) #54
erikchen
piman: PTAL https://codereview.chromium.org/1912833002/diff/220001/gpu/command_buffer/service/gles2_cmd_decoder.cc File gpu/command_buffer/service/gles2_cmd_decoder.cc (right): https://codereview.chromium.org/1912833002/diff/220001/gpu/command_buffer/service/gles2_cmd_decoder.cc#newcode4297 gpu/command_buffer/service/gles2_cmd_decoder.cc:4297: NOTREACHED(); On 2016/04/27 23:00:58, piman wrote: > ...
4 years, 7 months ago (2016-04-27 23:59:24 UTC) #55
piman
Missing a couple of changes, I think. LGTM after they're added. https://codereview.chromium.org/1912833002/diff/240001/gpu/ipc/client/command_buffer_proxy_impl.cc File gpu/ipc/client/command_buffer_proxy_impl.cc (right): ...
4 years, 7 months ago (2016-04-28 02:15:05 UTC) #56
erikchen
https://codereview.chromium.org/1912833002/diff/240001/gpu/ipc/client/command_buffer_proxy_impl.cc File gpu/ipc/client/command_buffer_proxy_impl.cc (right): https://codereview.chromium.org/1912833002/diff/240001/gpu/ipc/client/command_buffer_proxy_impl.cc#newcode620 gpu/ipc/client/command_buffer_proxy_impl.cc:620: void CommandBufferProxyImpl::TakeFrontBuffer(const gpu::Mailbox& mailbox) { On 2016/04/28 02:15:05, piman ...
4 years, 7 months ago (2016-04-28 17:07:23 UTC) #57
erikchen
bbudge: Please review ppapi/thunk/ppb_graphics_3d_api.h. tsepez: Please review ppapi/proxy/ppapi_messages.h and gpu/ipc/common/gpu_messages.h sky: Please review components/mus
4 years, 7 months ago (2016-04-28 17:09:40 UTC) #59
Tom Sepez
https://codereview.chromium.org/1912833002/diff/330001/ppapi/proxy/ppapi_messages.h File ppapi/proxy/ppapi_messages.h (right): https://codereview.chromium.org/1912833002/diff/330001/ppapi/proxy/ppapi_messages.h#newcode1048 ppapi/proxy/ppapi_messages.h:1048: // by exactly one call to PpapiHostMsg_PPBGraphics3D_TakeFrontBuffer. The What ...
4 years, 7 months ago (2016-04-28 17:48:05 UTC) #60
erikchen
https://codereview.chromium.org/1912833002/diff/330001/ppapi/proxy/ppapi_messages.h File ppapi/proxy/ppapi_messages.h (right): https://codereview.chromium.org/1912833002/diff/330001/ppapi/proxy/ppapi_messages.h#newcode1048 ppapi/proxy/ppapi_messages.h:1048: // by exactly one call to PpapiHostMsg_PPBGraphics3D_TakeFrontBuffer. The On ...
4 years, 7 months ago (2016-04-28 17:50:10 UTC) #61
bbudge
LGTM w/nits https://codereview.chromium.org/1912833002/diff/330001/content/renderer/pepper/ppb_graphics_3d_impl.cc File content/renderer/pepper/ppb_graphics_3d_impl.cc (right): https://codereview.chromium.org/1912833002/diff/330001/content/renderer/pepper/ppb_graphics_3d_impl.cc#newcode365 content/renderer/pepper/ppb_graphics_3d_impl.cc:365: mailboxes_to_reuse_.erase(mailboxes_to_reuse_.begin()); nit: Is there any reason not ...
4 years, 7 months ago (2016-04-28 20:13:27 UTC) #62
Tom Sepez
lgtm
4 years, 7 months ago (2016-04-28 20:48:27 UTC) #63
sky
mus LGTM
4 years, 7 months ago (2016-04-29 00:30:53 UTC) #64
erikchen
https://codereview.chromium.org/1912833002/diff/330001/content/renderer/pepper/ppb_graphics_3d_impl.cc File content/renderer/pepper/ppb_graphics_3d_impl.cc (right): https://codereview.chromium.org/1912833002/diff/330001/content/renderer/pepper/ppb_graphics_3d_impl.cc#newcode365 content/renderer/pepper/ppb_graphics_3d_impl.cc:365: mailboxes_to_reuse_.erase(mailboxes_to_reuse_.begin()); On 2016/04/28 20:13:27, bbudge wrote: > nit: Is ...
4 years, 7 months ago (2016-04-29 00:38:06 UTC) #65
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1912833002/350001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1912833002/350001
4 years, 7 months ago (2016-04-29 00:38:56 UTC) #68
commit-bot: I haz the power
Committed patchset #19 (id:350001)
4 years, 7 months ago (2016-04-29 01:54:52 UTC) #69
commit-bot: I haz the power
Patchset 19 (id:??) landed as https://crrev.com/ed5a6bb9f4321670482acc32a7cb4246a1e22f25 Cr-Commit-Position: refs/heads/master@{#390570}
4 years, 7 months ago (2016-04-30 17:23:42 UTC) #70
erikchen
4 years, 7 months ago (2016-05-02 16:45:19 UTC) #72
Message was sent while issue was closed.
A revert of this CL (patchset #19 id:350001) has been created in
https://codereview.chromium.org/1937173002/ by erikchen@chromium.org.

The reason for reverting is: Top crasher on renderer and gpu processes:

https://bugs.chromium.org/p/chromium/issues/detail?id=608163.

Powered by Google App Engine
This is Rietveld 408576698