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

Issue 1916923004: Request context sharing via content::ContextProviderCommandBuffer (Closed)

Created:
4 years, 8 months ago by danakj
Modified:
4 years, 7 months ago
Reviewers:
no sievers, piman
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, creis+watch_chromium.org, yusukes+watch_chromium.org, feature-media-reviews_chromium.org, posciak+watch_chromium.org, shuchen+watch_chromium.org, nasko+codewatch_chromium.org, jam, sievers+watch_chromium.org, jbauman+watch_chromium.org, nona+watch_chromium.org, darin-cc_chromium.org, mcasas+watch+vc_chromium.org, kalyank, mkwst+moarreviews-renderer_chromium.org, piman+watch_chromium.org, danakj+watch_chromium.org, James Su, dcheng, Ken Russell (switch to Gerrit), piman
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Request context sharing via content::ContextProviderCommandBuffer Current context sharing is done in 1 of 2 ways: 1) Pass share_resources=true to the constructor of WebGraphicsContext3DCommandBufferImpl. 2) Pass a WebGraphicsContext3DCommandBufferImpl* to the constructor or WebGraphicsContext3DCommandBufferImpl. FBOFW, this patch is conceptually 3 in 1.. a) Delete |share_resources| and make sharing requests always use option 2 from above. This is possible now that checking context loss checks if any context in the share group has been lost. b) Make RenderThreadImpl return a ContextProviderCommandBuffer for the shared main thread context. Since this context is given to blink in a WebGraphicsContext3DProvider, and blink specifies a provider when requesting to share contexts, we need a ContextProviderCommandBuffer in the provider. c) Move the client-side share group tracking vector to the ContextProviderCommandBuffer from the WebGraphicsContext3DCommandBufferImpl class. We simplify the code a bit, and just make it a simple struct. The lock ends up being held for a larger number of commands for now, until things in WebGraphicsContext3DCommandBufferImpl::InitializeOnCurrentThread ends up moving out to ContextProviderCommandBuffer::BindToCurrentThread. At this point the WebGraphicsContext3D base class is unused, and the WebGraphicsContext3DProvider will return null for it, so we can remove the class from blink. R=piman@chromium.org, sievers@chromium.org BUG=584497 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/615aac2acd5f4aa12f42a8174e4636eb7d894de7 Cr-Commit-Position: refs/heads/master@{#390766}

Patch Set 1 : sharegroup: . #

Patch Set 2 : sharegroup: . #

Patch Set 3 : sharegroup: . #

Total comments: 10

Patch Set 4 : sharegroup: . #

Patch Set 5 : sharegroup: rebase #

Patch Set 6 : sharegroup: 1moremove #

Patch Set 7 : sharegroup: rebase #

Patch Set 8 : sharegroup: . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+204 lines, -259 lines) Patch
M content/browser/compositor/gpu_process_transport_factory.cc View 1 2 3 4 5 6 4 chunks +19 lines, -21 lines 0 comments Download
M content/browser/gpu/gpu_ipc_browsertests.cc View 4 chunks +4 lines, -5 lines 0 comments Download
M content/browser/renderer_host/compositor_impl_android.cc View 1 2 3 4 2 chunks +2 lines, -4 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_android.cc View 1 2 3 4 5 6 2 chunks +4 lines, -4 lines 0 comments Download
M content/common/gpu/client/context_provider_command_buffer.h View 3 chunks +15 lines, -0 lines 0 comments Download
M content/common/gpu/client/context_provider_command_buffer.cc View 1 2 3 4 chunks +60 lines, -3 lines 0 comments Download
M content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h View 7 chunks +13 lines, -52 lines 0 comments Download
M content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc View 1 2 3 10 chunks +21 lines, -92 lines 0 comments Download
M content/renderer/media/webmediaplayer_ms.cc View 2 chunks +2 lines, -1 line 0 comments Download
M content/renderer/media/webmediaplayer_ms_compositor.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M content/renderer/pepper/video_decoder_shim.h View 3 chunks +2 lines, -5 lines 0 comments Download
M content/renderer/pepper/video_decoder_shim.cc View 4 chunks +5 lines, -5 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 4 5 6 3 chunks +2 lines, -2 lines 0 comments Download
M content/renderer/render_thread_impl.h View 2 chunks +1 line, -6 lines 0 comments Download
M content/renderer/render_thread_impl.cc View 5 chunks +7 lines, -10 lines 0 comments Download
M content/renderer/render_widget.cc View 1 2 3 4 3 chunks +7 lines, -6 lines 0 comments Download
M content/renderer/renderer_blink_platform_impl.cc View 1 2 3 4 5 6 7 4 chunks +17 lines, -15 lines 0 comments Download
M content/renderer/webgraphicscontext3d_provider_impl.h View 3 chunks +7 lines, -6 lines 0 comments Download
M content/renderer/webgraphicscontext3d_provider_impl.cc View 1 chunk +4 lines, -5 lines 0 comments Download
M gpu/command_buffer/client/gles2_implementation.h View 1 2 3 4 5 6 2 chunks +2 lines, -4 lines 0 comments Download
M gpu/command_buffer/client/gles2_implementation.cc View 1 2 3 4 5 6 2 chunks +2 lines, -2 lines 0 comments Download
M gpu/command_buffer/tests/gl_manager.cc View 5 6 2 chunks +6 lines, -9 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 19 (9 generated)
danakj
> FBOFW, this patch is conceptually 3 in 1.. I'm happy to do these as ...
4 years, 8 months ago (2016-04-27 02:23:14 UTC) #3
piman
https://codereview.chromium.org/1916923004/diff/60001/content/browser/compositor/gpu_process_transport_factory.cc File content/browser/compositor/gpu_process_transport_factory.cc (right): https://codereview.chromium.org/1916923004/diff/60001/content/browser/compositor/gpu_process_transport_factory.cc#newcode353 content/browser/compositor/gpu_process_transport_factory.cc:353: // compositor. It shares resources with the worker context. ...
4 years, 7 months ago (2016-04-27 22:09:34 UTC) #4
danakj
PTAL. Will rebase also. https://codereview.chromium.org/1916923004/diff/60001/content/browser/compositor/gpu_process_transport_factory.cc File content/browser/compositor/gpu_process_transport_factory.cc (right): https://codereview.chromium.org/1916923004/diff/60001/content/browser/compositor/gpu_process_transport_factory.cc#newcode353 content/browser/compositor/gpu_process_transport_factory.cc:353: // compositor. It shares resources ...
4 years, 7 months ago (2016-04-28 00:25:58 UTC) #5
piman
lgtm
4 years, 7 months ago (2016-04-28 02:09:22 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1916923004/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1916923004/120001
4 years, 7 months ago (2016-04-29 18:33:23 UTC) #8
commit-bot: I haz the power
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/206331)
4 years, 7 months ago (2016-04-29 19:22:18 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1916923004/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1916923004/140001
4 years, 7 months ago (2016-04-29 20:18:41 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1916923004/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1916923004/160001
4 years, 7 months ago (2016-04-29 20:21:15 UTC) #16
commit-bot: I haz the power
Committed patchset #8 (id:160001)
4 years, 7 months ago (2016-04-29 21:28:34 UTC) #17
commit-bot: I haz the power
4 years, 7 months ago (2016-04-30 17:29:12 UTC) #18
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/615aac2acd5f4aa12f42a8174e4636eb7d894de7
Cr-Commit-Position: refs/heads/master@{#390766}

Powered by Google App Engine
This is Rietveld 408576698