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

Issue 1189943002: content: Fix lost context handling when using native GpuMemoryBuffers. (Closed)

Created:
5 years, 6 months ago by reveman
Modified:
5 years, 6 months ago
Reviewers:
Daniele Castagna, piman
CC:
chromium-reviews, creis+watch_chromium.org, danakj+watch_chromium.org, darin-cc_chromium.org, feature-media-reviews_chromium.org, jam, jbauman+watch_chromium.org, kalyank, mcasas, mcasas+watch_chromium.org, miu+watch_chromium.org, nasko+codewatch_chromium.org, piman+watch_chromium.org, posciak+watch_chromium.org, sievers+watch_chromium.org, wjia+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

content: Fix lost context handling when using native GpuMemoryBuffers. This is a redesign of browser side management of GpuMemoryBuffers to be able to handle GPU process crashes correctly. The following changes have been made to handle these situations correctly. 1. The BrowserGpuMemoryBufferManager class talks to GpuProcessHost instances directly and will launch a new GPU process if needed. This is needed to keep track of what GPU host each buffer belongs to. Buffers can only be destroyed by the same host that created them and this change prevents us from making attempts to destroy a buffer using a different GPU host then it was created by. 2. Improved code reuse between in-process buffers and buffers allocated for child processes. The result is that we track the memory usage of not just child process buffers but all buffers allocated by the manager. 3. Shared memory backed buffers can be used to test GPU process side allocation of buffers and lost context handling on all platforms. BUG=486922 TEST=content_browsertests --gtest_also_run_disabled_tests --gtest_filter=ChildThreadImplGpuMemoryBufferBrowserTests/ChildThreadImplGpuMemoryBufferBrowserTest.*, content/test/gpu/run_gpu_test.py context_lost --extra-browser-args=--enable-native-gpu-memory-buffers --story-filter=GpuCrash.GPUProcessCrashesExactlyOnce Committed: https://crrev.com/42574bd38067c90223cc496f7aad80ebaf454d13 Cr-Commit-Position: refs/heads/master@{#335540}

Patch Set 1 #

Patch Set 2 : fix tests #

Total comments: 5

Patch Set 3 : retry logic and remove singleton #

Unified diffs Side-by-side diffs Delta from patch set Stats (+469 lines, -462 lines) Patch
M content/browser/browser_main_loop.cc View 1 2 1 chunk +0 lines, -12 lines 0 comments Download
M content/browser/compositor/buffer_queue_unittest.cc View 1 2 1 chunk +1 line, -2 lines 0 comments Download
M content/browser/compositor/gpu_process_transport_factory.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M content/browser/gpu/browser_gpu_channel_host_factory.h View 1 2 4 chunks +1 line, -35 lines 0 comments Download
M content/browser/gpu/browser_gpu_channel_host_factory.cc View 1 2 5 chunks +5 lines, -186 lines 0 comments Download
M content/browser/gpu/browser_gpu_memory_buffer_manager.h View 1 2 3 chunks +62 lines, -26 lines 0 comments Download
M content/browser/gpu/browser_gpu_memory_buffer_manager.cc View 1 2 9 chunks +344 lines, -136 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_buffer_pool_unittest.cc View 1 2 1 chunk +1 line, -2 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.cc View 1 2 4 chunks +3 lines, -4 lines 0 comments Download
D content/common/gpu/client/gpu_memory_buffer_factory_host.h View 1 chunk +0 lines, -44 lines 0 comments Download
M content/common/gpu/gpu_memory_buffer_factory_shared_memory.h View 3 chunks +12 lines, -0 lines 0 comments Download
M content/common/gpu/gpu_memory_buffer_factory_shared_memory.cc View 1 5 chunks +38 lines, -13 lines 0 comments Download
M content/common/gpu/gpu_process_launch_causes.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/content_common.gypi View 1 2 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 16 (5 generated)
reveman
5 years, 6 months ago (2015-06-17 14:16:37 UTC) #2
reveman
+mcasas FYI, I have to disable some VideoCaptureBufferPoolTest tests as they are using BrowserGpuMemoryBufferManager inappropriately. ...
5 years, 6 months ago (2015-06-17 18:28:01 UTC) #3
reveman
5 years, 6 months ago (2015-06-17 22:17:52 UTC) #5
piman
I have 2 main concerns. https://codereview.chromium.org/1189943002/diff/20001/content/browser/gpu/browser_gpu_memory_buffer_manager.cc File content/browser/gpu/browser_gpu_memory_buffer_manager.cc (right): https://codereview.chromium.org/1189943002/diff/20001/content/browser/gpu/browser_gpu_memory_buffer_manager.cc#newcode86 content/browser/gpu/browser_gpu_memory_buffer_manager.cc:86: base::LazyInstance<BrowserGpuMemoryBufferManager>::Leaky I'm not crazy ...
5 years, 6 months ago (2015-06-19 19:29:48 UTC) #6
reveman
ptal https://codereview.chromium.org/1189943002/diff/20001/content/browser/gpu/browser_gpu_memory_buffer_manager.cc File content/browser/gpu/browser_gpu_memory_buffer_manager.cc (right): https://codereview.chromium.org/1189943002/diff/20001/content/browser/gpu/browser_gpu_memory_buffer_manager.cc#newcode86 content/browser/gpu/browser_gpu_memory_buffer_manager.cc:86: base::LazyInstance<BrowserGpuMemoryBufferManager>::Leaky On 2015/06/19 at 19:29:48, piman (Very slow ...
5 years, 6 months ago (2015-06-22 17:09:12 UTC) #7
piman
lgtm
5 years, 6 months ago (2015-06-22 17:58:01 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1189943002/40001
5 years, 6 months ago (2015-06-22 18:08:47 UTC) #10
commit-bot: I haz the power
Try jobs failed on following builders: cast_shell_android on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_android/builds/22858)
5 years, 6 months ago (2015-06-22 18:28:04 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1189943002/40001
5 years, 6 months ago (2015-06-22 18:56:48 UTC) #14
commit-bot: I haz the power
Committed patchset #3 (id:40001)
5 years, 6 months ago (2015-06-22 19:19:01 UTC) #15
commit-bot: I haz the power
5 years, 6 months ago (2015-06-22 19:20:06 UTC) #16
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/42574bd38067c90223cc496f7aad80ebaf454d13
Cr-Commit-Position: refs/heads/master@{#335540}

Powered by Google App Engine
This is Rietveld 408576698