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

Issue 1133563010: Add a GpuMemoryBuffer pool that creates hardware backed VideoFrames. (Closed)

Created:
5 years, 7 months ago by Daniele Castagna
Modified:
5 years, 7 months ago
Reviewers:
reveman, DaleCurtis
CC:
chromium-reviews, darin-cc_chromium.org, feature-media-reviews_chromium.org, jam, mcasas+watch_chromium.org, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-content_chromium.org, posciak+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

Add a GpuMemoryBuffer pool that creates hardware backed VideoFrames. A new pool of resources -consisting of GpuMemoryBuffers, textures and images- has been added to media/video and an instance is now allocated in VideoRendererImpl. This pool, disabled in this cl, will allow VideoRenderImpl to convert software VideoFrames into VideoFrames backed by native resources. Once we enable this conversion the software video playback will benefit from this in different ways: - Reducing the number of copies of VideoFrame buffers, potentially having only one when native GpuMemoryBuffers are available. - Moving one copy in the media thread and removing it from the critical path. BUG=485859 Committed: https://crrev.com/612cc633d1e789d92208bdacdfa22eac5a4c800a Cr-Commit-Position: refs/heads/master@{#330053}

Patch Set 1 : #

Total comments: 76

Patch Set 2 : Partially address reviews' comments. Add tests. #

Patch Set 3 : Avoid giving resources' ownerships to callbacks. Mojo something now compiles. #

Patch Set 4 : Fix a mem leak. Remove TODO in VideoRendererImpl. #

Total comments: 38

Patch Set 5 : Address dalecurtis' comments. #

Total comments: 4

Patch Set 6 : s/IsFrameResources/AreFrameResources/. Fix a typo in a comment. #

Patch Set 7 : IsTextureRGSupported. #

Patch Set 8 : Rebase on master. #

Total comments: 6

Patch Set 9 : Address reveman@'s nits. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+725 lines, -9 lines) Patch
M content/renderer/media/renderer_gpu_video_accelerator_factories.h View 1 2 3 4 5 6 3 chunks +13 lines, -0 lines 0 comments Download
M content/renderer/media/renderer_gpu_video_accelerator_factories.cc View 1 2 3 4 5 6 4 chunks +37 lines, -1 line 0 comments Download
M media/BUILD.gn View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M media/media.gyp View 1 2 3 4 5 6 7 3 chunks +4 lines, -0 lines 0 comments Download
M media/mojo/services/mojo_renderer_service.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M media/renderers/default_renderer_factory.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M media/renderers/gpu_video_accelerator_factories.h View 1 2 3 4 5 6 2 chunks +11 lines, -0 lines 0 comments Download
M media/renderers/mock_gpu_video_accelerator_factories.h View 1 2 3 4 5 6 1 chunk +8 lines, -0 lines 0 comments Download
M media/renderers/mock_gpu_video_accelerator_factories.cc View 1 1 chunk +46 lines, -0 lines 0 comments Download
M media/renderers/video_renderer_impl.h View 1 2 3 4 5 6 7 3 chunks +6 lines, -0 lines 0 comments Download
M media/renderers/video_renderer_impl.cc View 1 2 3 4 5 6 7 3 chunks +6 lines, -0 lines 0 comments Download
M media/renderers/video_renderer_impl_unittest.cc View 1 2 3 4 5 6 7 1 chunk +5 lines, -3 lines 0 comments Download
M media/test/pipeline_integration_test_base.cc View 1 chunk +1 line, -1 line 0 comments Download
A media/video/gpu_memory_buffer_video_frame_pool.h View 1 2 3 4 5 6 7 8 1 chunk +50 lines, -0 lines 0 comments Download
A media/video/gpu_memory_buffer_video_frame_pool.cc View 1 2 3 4 5 6 7 8 1 chunk +352 lines, -0 lines 0 comments Download
A media/video/gpu_memory_buffer_video_frame_pool_unittest.cc View 1 2 3 4 5 6 1 chunk +180 lines, -0 lines 0 comments Download

Messages

Total messages: 24 (5 generated)
Daniele Castagna
5 years, 7 months ago (2015-05-12 01:05:09 UTC) #2
reveman
https://codereview.chromium.org/1133563010/diff/20001/content/renderer/media/renderer_gpu_video_accelerator_factories.h File content/renderer/media/renderer_gpu_video_accelerator_factories.h (right): https://codereview.chromium.org/1133563010/diff/20001/content/renderer/media/renderer_gpu_video_accelerator_factories.h#newcode72 content/renderer/media/renderer_gpu_video_accelerator_factories.h:72: // thread associated with the 'task_runner' passed to the ...
5 years, 7 months ago (2015-05-12 03:20:26 UTC) #4
Daniele Castagna
+dalecurtis, PTAL.
5 years, 7 months ago (2015-05-12 03:22:33 UTC) #6
DaleCurtis
Just high level and nits I've noticed, didn't fully review details of the pool https://codereview.chromium.org/1133563010/diff/20001/media/renderers/video_renderer_impl.cc ...
5 years, 7 months ago (2015-05-12 17:23:20 UTC) #7
DaleCurtis
Also I was promised a unit test via chat :)
5 years, 7 months ago (2015-05-12 17:23:34 UTC) #8
Daniele Castagna
https://codereview.chromium.org/1133563010/diff/20001/content/renderer/media/renderer_gpu_video_accelerator_factories.h File content/renderer/media/renderer_gpu_video_accelerator_factories.h (right): https://codereview.chromium.org/1133563010/diff/20001/content/renderer/media/renderer_gpu_video_accelerator_factories.h#newcode72 content/renderer/media/renderer_gpu_video_accelerator_factories.h:72: // thread associated with the 'task_runner' passed to the ...
5 years, 7 months ago (2015-05-12 21:21:31 UTC) #9
Daniele Castagna
PTAL. The FrameResources ownerships is not passed around to callbacks. Fixed a compilation error in ...
5 years, 7 months ago (2015-05-12 23:27:21 UTC) #10
DaleCurtis
Didn't have time to review everything else tonight. https://codereview.chromium.org/1133563010/diff/20001/media/renderers/video_renderer_impl.cc File media/renderers/video_renderer_impl.cc (right): https://codereview.chromium.org/1133563010/diff/20001/media/renderers/video_renderer_impl.cc#newcode507 media/renderers/video_renderer_impl.cc:507: // ...
5 years, 7 months ago (2015-05-13 02:52:14 UTC) #11
Daniele Castagna
Thank you Dale for your first round of comments! Looking forward for the rest of ...
5 years, 7 months ago (2015-05-13 04:29:45 UTC) #12
DaleCurtis
deferring to reveman@ for the pool impl review. I'm not familiar enough with the GPU ...
5 years, 7 months ago (2015-05-14 00:58:58 UTC) #13
Daniele Castagna
PTAL. https://codereview.chromium.org/1133563010/diff/20001/media/video/gpu_memory_buffer_video_frame_pool.cc File media/video/gpu_memory_buffer_video_frame_pool.cc (right): https://codereview.chromium.org/1133563010/diff/20001/media/video/gpu_memory_buffer_video_frame_pool.cc#newcode51 media/video/gpu_memory_buffer_video_frame_pool.cc:51: unsigned texture_id = 0u; On 2015/05/14 at 00:58:57, ...
5 years, 7 months ago (2015-05-14 17:30:27 UTC) #14
DaleCurtis
lgtm on the media/ side of things. Please wait for reveman@ to approve. https://codereview.chromium.org/1133563010/diff/80001/media/renderers/video_renderer_impl.cc File ...
5 years, 7 months ago (2015-05-14 18:52:13 UTC) #15
Daniele Castagna
https://codereview.chromium.org/1133563010/diff/80001/media/video/gpu_memory_buffer_video_frame_pool.cc File media/video/gpu_memory_buffer_video_frame_pool.cc (right): https://codereview.chromium.org/1133563010/diff/80001/media/video/gpu_memory_buffer_video_frame_pool.cc#newcode218 media/video/gpu_memory_buffer_video_frame_pool.cc:218: GpuMemoryBufferVideoFramePool::PoolImpl::FrameResources* On 2015/05/14 at 18:52:13, DaleCurtis wrote: > On ...
5 years, 7 months ago (2015-05-14 19:24:17 UTC) #16
DaleCurtis
https://codereview.chromium.org/1133563010/diff/80001/media/video/gpu_memory_buffer_video_frame_pool.cc File media/video/gpu_memory_buffer_video_frame_pool.cc (right): https://codereview.chromium.org/1133563010/diff/80001/media/video/gpu_memory_buffer_video_frame_pool.cc#newcode218 media/video/gpu_memory_buffer_video_frame_pool.cc:218: GpuMemoryBufferVideoFramePool::PoolImpl::FrameResources* On 2015/05/14 19:24:16, Daniele Castagna wrote: > On ...
5 years, 7 months ago (2015-05-14 20:04:49 UTC) #17
reveman
lgtm https://codereview.chromium.org/1133563010/diff/160001/media/video/gpu_memory_buffer_video_frame_pool.cc File media/video/gpu_memory_buffer_video_frame_pool.cc (right): https://codereview.chromium.org/1133563010/diff/160001/media/video/gpu_memory_buffer_video_frame_pool.cc#newcode1 media/video/gpu_memory_buffer_video_frame_pool.cc:1: // Copyright (c) 2015 The Chromium Authors. All ...
5 years, 7 months ago (2015-05-15 05:44:03 UTC) #18
Daniele Castagna
https://codereview.chromium.org/1133563010/diff/160001/media/video/gpu_memory_buffer_video_frame_pool.cc File media/video/gpu_memory_buffer_video_frame_pool.cc (right): https://codereview.chromium.org/1133563010/diff/160001/media/video/gpu_memory_buffer_video_frame_pool.cc#newcode1 media/video/gpu_memory_buffer_video_frame_pool.cc:1: // Copyright (c) 2015 The Chromium Authors. All rights ...
5 years, 7 months ago (2015-05-15 05:52:25 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1133563010/180001
5 years, 7 months ago (2015-05-15 05:53:10 UTC) #22
commit-bot: I haz the power
Committed patchset #9 (id:180001)
5 years, 7 months ago (2015-05-15 06:42:11 UTC) #23
commit-bot: I haz the power
5 years, 7 months ago (2015-05-15 06:43:11 UTC) #24
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/612cc633d1e789d92208bdacdfa22eac5a4c800a
Cr-Commit-Position: refs/heads/master@{#330053}

Powered by Google App Engine
This is Rietveld 408576698