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 1943513002: [Reland 1] Pepper takes ownership of a mailbox before passing it to the texture layer. (Closed)

Created:
4 years, 7 months ago by erikchen
Modified:
4 years, 7 months ago
CC:
chromium-reviews, rjkroege, mlamouri+watch-content_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, jam, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, darin-cc_chromium.org, mkwst+moarreviews-renderer_chromium.org, piman+watch_chromium.org, cc-bugs_chromium.org, ben+mojo_chromium.org, darin (slow to review)
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Reland 1] Pepper takes ownership of a mailbox before passing it to the texture layer. This CL makes three changes from the original. 1. Replace a call to std::remove_if() with vec.erase(std::remove_if(), ...). This was a logic error in the original CL that caused a crash any time the size of the buffer was changed. This CL also adds a test that catches this bug. 2. Add some simple reference counting to PepperPluginInstanceImpl to track the fact that a cc::TextureMailbox may be passed to |texture_layer_| more than once. 3. The SyncToken signal is now processed in the context of its own message: WaitSyncToken. > 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 TEST=Run Chromium with the Pepper Flash plugin. Visit a site that supports Flash video, such as http://vudu.com. Start playing a video, and then fullscreen the video. Observe that Chromium does not crash. Please extensively test Chromium on Flash 3D games and Flash video and make sure nothing else is working incorrectly. TBR=ccameron@chromium.org, bbudge@chromium.org, sky@chromium.org Committed: https://crrev.com/4734ed1b6740b772201b8accb3e2bd88cdea5c99 Cr-Commit-Position: refs/heads/master@{#391686}

Patch Set 1 : Copy of PS#19 from https://codereview.chromium.org/1912833002 #

Patch Set 2 : Fix bugs. #

Patch Set 3 : Add a test. #

Total comments: 2

Patch Set 4 : Fix use of sync token. #

Patch Set 5 : Fix sync token, again. Rebase. #

Patch Set 6 : Comments from piman. #

Total comments: 1

Patch Set 7 : Comment update. #

Total comments: 5

Patch Set 8 : Comments from sunnyps and piman. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+532 lines, -137 lines) Patch
M cc/layers/texture_layer.h View 1 chunk +0 lines, -6 lines 0 comments Download
M cc/layers/texture_layer.cc View 1 chunk +0 lines, -20 lines 0 comments Download
M cc/layers/texture_layer_unittest.cc View 1 chunk +0 lines, -27 lines 0 comments Download
M components/mus/gles2/command_buffer_impl.h View 1 chunk +2 lines, -1 line 0 comments Download
M components/mus/gles2/command_buffer_impl.cc View 1 chunk +6 lines, -1 line 0 comments Download
M components/mus/public/interfaces/command_buffer.mojom View 1 chunk +2 lines, -1 line 0 comments Download
M content/renderer/pepper/pepper_plugin_instance_impl.h View 1 4 chunks +47 lines, -3 lines 0 comments Download
M content/renderer/pepper/pepper_plugin_instance_impl.cc View 1 4 chunks +92 lines, -16 lines 0 comments Download
M content/renderer/pepper/ppb_graphics_3d_impl.h View 1 2 3 4 5 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 chunks +39 lines, -10 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder.h View 1 2 3 4 2 chunks +4 lines, -1 line 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder.cc View 1 2 3 4 6 chunks +123 lines, -3 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_mock.h View 1 2 3 4 1 chunk +4 lines, -1 line 0 comments Download
M gpu/command_buffer/tests/gl_texture_mailbox_unittest.cc View 1 2 6 chunks +114 lines, -24 lines 0 comments Download
M gpu/ipc/client/command_buffer_proxy_impl.h View 1 2 3 4 5 1 chunk +4 lines, -1 line 0 comments Download
M gpu/ipc/client/command_buffer_proxy_impl.cc View 1 2 3 4 5 1 chunk +14 lines, -4 lines 0 comments Download
M gpu/ipc/common/gpu_messages.h View 1 2 3 4 5 6 2 chunks +14 lines, -2 lines 0 comments Download
M gpu/ipc/service/gpu_channel.cc View 1 2 3 4 5 6 7 1 chunk +3 lines, -2 lines 0 comments Download
M gpu/ipc/service/gpu_command_buffer_stub.h View 1 2 3 4 5 2 chunks +4 lines, -1 line 0 comments Download
M gpu/ipc/service/gpu_command_buffer_stub.cc View 1 2 3 4 5 4 chunks +19 lines, -6 lines 0 comments Download
M ppapi/proxy/ppapi_messages.h View 1 chunk +7 lines, -0 lines 0 comments Download
M ppapi/proxy/ppb_graphics_3d_proxy.h View 2 chunks +2 lines, -0 lines 0 comments Download
M ppapi/proxy/ppb_graphics_3d_proxy.cc View 4 chunks +17 lines, -0 lines 0 comments Download
M ppapi/thunk/ppb_graphics_3d_api.h View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 47 (21 generated)
piman
lgtm
4 years, 7 months ago (2016-05-02 22:04:42 UTC) #3
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1943513002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1943513002/40001
4 years, 7 months ago (2016-05-02 22:39:44 UTC) #5
erikchen
piman: I added a test in patch set 3 which catches the bug.
4 years, 7 months ago (2016-05-02 22:41:41 UTC) #6
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win_optional_gpu_tests_rel on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_optional_gpu_tests_rel/builds/1093)
4 years, 7 months ago (2016-05-02 22:42:41 UTC) #8
erikchen
TBRing ccameron@chromium.org, bbudge@chromium.org, tsepez@chromium.org, sky@chromium.org since all changes were made in files owned by piman@.
4 years, 7 months ago (2016-05-02 22:50:51 UTC) #12
piman
lgtm
4 years, 7 months ago (2016-05-02 22:59:13 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1943513002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1943513002/40001
4 years, 7 months ago (2016-05-03 00:06:40 UTC) #15
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1943513002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1943513002/60001
4 years, 7 months ago (2016-05-03 01:29:10 UTC) #19
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1943513002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1943513002/80001
4 years, 7 months ago (2016-05-03 02:25:05 UTC) #23
erikchen
piman: Please review, again [I fixed a SyncToken processing bug]. This time, I manually tested ...
4 years, 7 months ago (2016-05-03 02:26:17 UTC) #24
piman
https://codereview.chromium.org/1943513002/diff/40001/gpu/ipc/service/gpu_command_buffer_stub.cc File gpu/ipc/service/gpu_command_buffer_stub.cc (right): https://codereview.chromium.org/1943513002/diff/40001/gpu/ipc/service/gpu_command_buffer_stub.cc#newcode732 gpu/ipc/service/gpu_command_buffer_stub.cc:732: sync_token.release_count()); Oh, duh, sorry I missed this. OnWaitFenceSync can't ...
4 years, 7 months ago (2016-05-03 02:52:04 UTC) #25
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-03 03:49:56 UTC) #27
erikchen
piman: PTAL https://codereview.chromium.org/1943513002/diff/40001/gpu/ipc/service/gpu_command_buffer_stub.cc File gpu/ipc/service/gpu_command_buffer_stub.cc (right): https://codereview.chromium.org/1943513002/diff/40001/gpu/ipc/service/gpu_command_buffer_stub.cc#newcode732 gpu/ipc/service/gpu_command_buffer_stub.cc:732: sync_token.release_count()); On 2016/05/03 02:52:04, piman wrote: > ...
4 years, 7 months ago (2016-05-03 17:24:14 UTC) #29
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1943513002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1943513002/100001
4 years, 7 months ago (2016-05-03 17:53:18 UTC) #31
Tom Sepez
RS LGTM
4 years, 7 months ago (2016-05-03 18:01:10 UTC) #32
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-03 19:55:31 UTC) #34
erikchen
On 2016/05/03 19:55:31, commit-bot: I haz the power wrote: > Dry run: This issue passed ...
4 years, 7 months ago (2016-05-03 20:03:37 UTC) #35
piman
+sunnyps in case I'm saying something dumb https://codereview.chromium.org/1943513002/diff/120001/gpu/ipc/service/gpu_channel.cc File gpu/ipc/service/gpu_channel.cc (left): https://codereview.chromium.org/1943513002/diff/120001/gpu/ipc/service/gpu_channel.cc#oldcode243 gpu/ipc/service/gpu_channel.cc:243: DCHECK(scheduled_); Oh, ...
4 years, 7 months ago (2016-05-03 20:57:52 UTC) #37
sunnyps
https://codereview.chromium.org/1943513002/diff/120001/gpu/ipc/service/gpu_channel.cc File gpu/ipc/service/gpu_channel.cc (left): https://codereview.chromium.org/1943513002/diff/120001/gpu/ipc/service/gpu_channel.cc#oldcode243 gpu/ipc/service/gpu_channel.cc:243: DCHECK(scheduled_); On 2016/05/03 20:57:52, piman wrote: > Oh, this ...
4 years, 7 months ago (2016-05-03 21:17:10 UTC) #38
erikchen
sunnyps, piman: PTAL https://codereview.chromium.org/1943513002/diff/120001/gpu/ipc/service/gpu_channel.cc File gpu/ipc/service/gpu_channel.cc (right): https://codereview.chromium.org/1943513002/diff/120001/gpu/ipc/service/gpu_channel.cc#newcode794 gpu/ipc/service/gpu_channel.cc:794: if (stub && stub->HasUnprocessedCommands()) { On ...
4 years, 7 months ago (2016-05-04 16:20:35 UTC) #39
piman
lgtm
4 years, 7 months ago (2016-05-04 21:25:40 UTC) #40
Tom Sepez
On 2016/05/04 21:25:40, piman wrote: > lgtm LGTM, a misbehaving renderer can already block the ...
4 years, 7 months ago (2016-05-04 21:47:11 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1943513002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1943513002/140001
4 years, 7 months ago (2016-05-04 21:48:37 UTC) #43
commit-bot: I haz the power
Committed patchset #8 (id:140001)
4 years, 7 months ago (2016-05-04 23:23:56 UTC) #44
commit-bot: I haz the power
Patchset 8 (id:??) landed as https://crrev.com/4734ed1b6740b772201b8accb3e2bd88cdea5c99 Cr-Commit-Position: refs/heads/master@{#391686}
4 years, 7 months ago (2016-05-04 23:25:27 UTC) #46
ilja
4 years, 7 months ago (2016-05-10 02:17:55 UTC) #47
Message was sent while issue was closed.
A revert of this CL (patchset #8 id:140001) has been created in
https://codereview.chromium.org/1964793002/ by ihf@chromium.org.

The reason for reverting is: Breaks WebGL on CrOS, crbug.com/610411..

Powered by Google App Engine
This is Rietveld 408576698