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

Issue 701033005: content: Move type selection logic out of GpuMemoryBufferImpl. (Closed)

Created:
6 years, 1 month ago by reveman
Modified:
6 years, 1 month ago
CC:
chromium-reviews, darin-cc_chromium.org, jam, piman+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

content: Move type selection logic out of GpuMemoryBufferImpl. This moves the logic to determine what type of buffer to allocate out of the GpuMemoryBuffer implementation. The GpuMemoryBufferImpl class instead provides a mechanism to query supported types and check if a format/usage configuration is supported by a specific type. This allows us create a generic set of unit tests that exercise each supported buffer type and it becomes trivial to add a command line flag for selecting a preferred GPU memory buffer type. BUG=431059 TEST=content_unittests --gtest_filter=GpuMemoryBufferImplTests/GpuMemoryBufferImplTest.* Committed: https://crrev.com/bc2de2bc9f44493125df09842ce09883217cedaf Cr-Commit-Position: refs/heads/master@{#304381}

Patch Set 1 #

Patch Set 2 : wip #

Patch Set 3 : missing includes #

Patch Set 4 : ready for review #

Patch Set 5 : mac build fix #

Total comments: 3

Patch Set 6 : remove blank line and add missing CONTENT_EXPORT #

Total comments: 12

Patch Set 7 : fix ozone and android link issue #

Patch Set 8 : ozone build fix #

Patch Set 9 : build stuff #

Patch Set 10 : address review feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+736 lines, -212 lines) Patch
M content/browser/gpu/browser_gpu_memory_buffer_manager.cc View 1 2 3 4 5 4 chunks +33 lines, -0 lines 0 comments Download
M content/common/BUILD.gn View 1 2 3 4 5 6 7 8 9 1 chunk +11 lines, -7 lines 0 comments Download
M content/common/android/surface_texture_manager.h View 1 2 3 4 5 2 chunks +2 lines, -1 line 0 comments Download
M content/common/child_process_host_impl.cc View 1 2 3 4 5 6 7 8 9 1 chunk +6 lines, -9 lines 0 comments Download
M content/common/gpu/client/gpu_memory_buffer_impl.h View 1 2 3 4 chunks +27 lines, -3 lines 0 comments Download
M content/common/gpu/client/gpu_memory_buffer_impl.cc View 1 2 3 4 5 6 7 8 9 2 chunks +39 lines, -0 lines 0 comments Download
M content/common/gpu/client/gpu_memory_buffer_impl_android.cc View 1 2 3 3 chunks +56 lines, -28 lines 0 comments Download
M content/common/gpu/client/gpu_memory_buffer_impl_io_surface.h View 1 2 3 4 1 chunk +0 lines, -2 lines 0 comments Download
M content/common/gpu/client/gpu_memory_buffer_impl_io_surface.cc View 1 2 3 4 5 6 1 chunk +0 lines, -21 lines 0 comments Download
M content/common/gpu/client/gpu_memory_buffer_impl_linux.cc View 1 2 3 4 chunks +51 lines, -14 lines 0 comments Download
M content/common/gpu/client/gpu_memory_buffer_impl_mac.cc View 1 2 3 3 chunks +56 lines, -25 lines 0 comments Download
M content/common/gpu/client/gpu_memory_buffer_impl_ozone.cc View 1 2 3 3 chunks +55 lines, -28 lines 0 comments Download
M content/common/gpu/client/gpu_memory_buffer_impl_ozone_native_buffer.h View 1 2 3 3 chunks +3 lines, -4 lines 0 comments Download
M content/common/gpu/client/gpu_memory_buffer_impl_ozone_native_buffer.cc View 1 2 3 4 5 6 2 chunks +3 lines, -8 lines 0 comments Download
M content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.h View 1 1 chunk +0 lines, -4 lines 0 comments Download
M content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.cc View 1 4 chunks +11 lines, -24 lines 0 comments Download
M content/common/gpu/client/gpu_memory_buffer_impl_surface_texture.h View 1 2 3 2 chunks +7 lines, -7 lines 0 comments Download
M content/common/gpu/client/gpu_memory_buffer_impl_surface_texture.cc View 1 1 chunk +0 lines, -6 lines 0 comments Download
A content/common/gpu/client/gpu_memory_buffer_impl_unittest.cc View 1 2 3 1 chunk +287 lines, -0 lines 0 comments Download
M content/common/gpu/client/gpu_memory_buffer_impl_win.cc View 1 2 3 4 chunks +51 lines, -14 lines 0 comments Download
M content/common/gpu/gpu_memory_buffer_factory.h View 1 2 chunks +2 lines, -1 line 0 comments Download
M content/common/gpu/gpu_memory_buffer_factory_io_surface.cc View 1 2 3 4 2 chunks +15 lines, -3 lines 0 comments Download
M content/content_common.gypi View 1 2 3 4 5 6 7 8 9 2 chunks +10 lines, -3 lines 0 comments Download
M content/content_tests.gypi View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -0 lines 0 comments Download
M content/public/test/content_test_suite_base.cc View 1 2 3 4 5 6 2 chunks +9 lines, -0 lines 0 comments Download

Messages

Total messages: 16 (2 generated)
reveman
6 years, 1 month ago (2014-11-11 14:59:49 UTC) #2
alexst (slow to review)
https://codereview.chromium.org/701033005/diff/80001/content/browser/gpu/browser_gpu_memory_buffer_manager.cc File content/browser/gpu/browser_gpu_memory_buffer_manager.cc (right): https://codereview.chromium.org/701033005/diff/80001/content/browser/gpu/browser_gpu_memory_buffer_manager.cc#newcode263 content/browser/gpu/browser_gpu_memory_buffer_manager.cc:263: GetPreferredGpuMemoryBufferTypeForConfiguration( Should this early out in BrowserGpuMemoryBufferManager::AllocateGpuMemoryBuffer for consistency? ...
6 years, 1 month ago (2014-11-11 18:49:23 UTC) #3
reveman
https://codereview.chromium.org/701033005/diff/80001/content/browser/gpu/browser_gpu_memory_buffer_manager.cc File content/browser/gpu/browser_gpu_memory_buffer_manager.cc (right): https://codereview.chromium.org/701033005/diff/80001/content/browser/gpu/browser_gpu_memory_buffer_manager.cc#newcode261 content/browser/gpu/browser_gpu_memory_buffer_manager.cc:261: hm, this blank line should not be here. https://codereview.chromium.org/701033005/diff/80001/content/browser/gpu/browser_gpu_memory_buffer_manager.cc#newcode263 ...
6 years, 1 month ago (2014-11-11 19:07:45 UTC) #4
alexst (slow to review)
Looks good, I just want to sort out the unittests and capabilities. https://codereview.chromium.org/701033005/diff/100001/content/common/gpu/client/gpu_memory_buffer_impl_ozone_native_buffer.cc File content/common/gpu/client/gpu_memory_buffer_impl_ozone_native_buffer.cc ...
6 years, 1 month ago (2014-11-11 21:05:49 UTC) #5
piman
https://codereview.chromium.org/701033005/diff/100001/content/common/child_process_host_impl.cc File content/common/child_process_host_impl.cc (left): https://codereview.chromium.org/701033005/diff/100001/content/common/child_process_host_impl.cc#oldcode325 content/common/child_process_host_impl.cc:325: if (!size.IsValid()) { Why removing this? https://codereview.chromium.org/701033005/diff/100001/content/common/gpu/client/gpu_memory_buffer_impl.cc File content/common/gpu/client/gpu_memory_buffer_impl.cc ...
6 years, 1 month ago (2014-11-11 22:38:30 UTC) #6
reveman
https://codereview.chromium.org/701033005/diff/100001/content/common/child_process_host_impl.cc File content/common/child_process_host_impl.cc (left): https://codereview.chromium.org/701033005/diff/100001/content/common/child_process_host_impl.cc#oldcode325 content/common/child_process_host_impl.cc:325: if (!size.IsValid()) { On 2014/11/11 22:38:30, piman (Very slow ...
6 years, 1 month ago (2014-11-12 05:09:20 UTC) #7
alexst (slow to review)
I agree that we should take a pass at refactoring (or should I say re-factory-ing) ...
6 years, 1 month ago (2014-11-13 20:13:24 UTC) #8
enne (OOO)
(Reviewer ping. This and the followup https://codereview.chromium.org/699073004/ are blocking me turning on impl-side painting for ...
6 years, 1 month ago (2014-11-13 20:17:39 UTC) #9
reveman
On 2014/11/13 20:17:39, enne wrote: > (Reviewer ping. This and the followup > https://codereview.chromium.org/699073004/ are ...
6 years, 1 month ago (2014-11-13 20:25:01 UTC) #10
piman
LGTM (sorry I was out) https://codereview.chromium.org/701033005/diff/100001/content/common/child_process_host_impl.cc File content/common/child_process_host_impl.cc (left): https://codereview.chromium.org/701033005/diff/100001/content/common/child_process_host_impl.cc#oldcode325 content/common/child_process_host_impl.cc:325: if (!size.IsValid()) { On ...
6 years, 1 month ago (2014-11-14 03:59:44 UTC) #11
reveman
https://codereview.chromium.org/701033005/diff/100001/content/common/child_process_host_impl.cc File content/common/child_process_host_impl.cc (left): https://codereview.chromium.org/701033005/diff/100001/content/common/child_process_host_impl.cc#oldcode325 content/common/child_process_host_impl.cc:325: if (!size.IsValid()) { On 2014/11/14 03:59:44, piman (Very slow ...
6 years, 1 month ago (2014-11-17 02:26:53 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/701033005/180001
6 years, 1 month ago (2014-11-17 02:27:51 UTC) #14
commit-bot: I haz the power
Committed patchset #10 (id:180001)
6 years, 1 month ago (2014-11-17 03:21:42 UTC) #15
commit-bot: I haz the power
6 years, 1 month ago (2014-11-17 03:22:22 UTC) #16
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/bc2de2bc9f44493125df09842ce09883217cedaf
Cr-Commit-Position: refs/heads/master@{#304381}

Powered by Google App Engine
This is Rietveld 408576698