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

Issue 1831513003: Pull gpu service/client shared memory buffer code to GpuMemoryBufferSupport (Closed)

Created:
4 years, 9 months ago by Fady Samuel
Modified:
4 years, 9 months ago
Reviewers:
reveman, dcheng, piman
CC:
chromium-reviews, darin-cc_chromium.org, jam, piman+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Pull gpu service/client shared memory buffer code to GpuMemoryBufferSupport GpuMemoryBufferFactory is a gpu service concept and should not be accessed from the client. Client code accessed GpuMemoryBufferFactory to get the native GPU buffer type and to check whether a provided buffer is supported. Depending on GpuMemoryBufferFactory ends up pulling in other service-only bits. This CL addresses this issue. The two static methods accessed by clients are pulled into a new class: GpuMemoryBufferSupport placed in gpu/ipc/common. BUG=597170 CQ_INCLUDE_TRYBOTS=tryserver.chromium.win:win_optional_gpu_tests_rel Committed: https://crrev.com/c27742238e78f1e2f7f6fe37f101eb0d07483416 Cr-Commit-Position: refs/heads/master@{#382987}

Patch Set 1 #

Patch Set 2 : More cleanup #

Patch Set 3 : Fix Ozone builds #

Total comments: 2

Patch Set 4 : Addressed reveman's comments #

Total comments: 1

Patch Set 5 : Fixed ifdef mixup #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+140 lines, -124 lines) Patch
M content/browser/gpu/browser_gpu_memory_buffer_manager.cc View 1 2 3 4 chunks +5 lines, -28 lines 0 comments Download
M content/common/gpu/client/gpu_memory_buffer_impl_io_surface.cc View 1 2 3 2 chunks +2 lines, -3 lines 0 comments Download
M content/common/gpu/client/gpu_memory_buffer_impl_ozone_native_pixmap.cc View 1 2 3 2 chunks +2 lines, -3 lines 0 comments Download
M content/common/gpu/client/gpu_memory_buffer_impl_surface_texture.cc View 1 2 3 2 chunks +2 lines, -3 lines 0 comments Download
M content/common/gpu/gpu_memory_buffer_factory.h View 1 chunk +0 lines, -4 lines 0 comments Download
M content/common/gpu/gpu_memory_buffer_factory.cc View 1 chunk +0 lines, -14 lines 0 comments Download
M content/common/gpu/gpu_memory_buffer_factory_io_surface.h View 1 chunk +0 lines, -3 lines 0 comments Download
M content/common/gpu/gpu_memory_buffer_factory_io_surface.cc View 1 chunk +0 lines, -20 lines 0 comments Download
M content/common/gpu/gpu_memory_buffer_factory_ozone_native_pixmap.h View 1 chunk +0 lines, -3 lines 0 comments Download
M content/common/gpu/gpu_memory_buffer_factory_ozone_native_pixmap.cc View 1 chunk +0 lines, -12 lines 0 comments Download
M content/common/gpu/gpu_memory_buffer_factory_surface_texture.h View 1 chunk +0 lines, -3 lines 0 comments Download
M content/common/gpu/gpu_memory_buffer_factory_surface_texture.cc View 1 chunk +0 lines, -16 lines 0 comments Download
M content/common/gpu/gpu_memory_buffer_factory_test_template.h View 1 2 3 3 chunks +3 lines, -2 lines 0 comments Download
M content/gpu/gpu_main.cc View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download
M content/gpu/in_process_gpu_thread.cc View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download
M gpu/gpu_ipc_common.gypi View 1 2 2 chunks +15 lines, -8 lines 0 comments Download
M gpu/ipc/common/BUILD.gn View 1 2 3 chunks +8 lines, -0 lines 0 comments Download
A gpu/ipc/common/gpu_memory_buffer_support.h View 1 2 3 1 chunk +25 lines, -0 lines 0 comments Download
A gpu/ipc/common/gpu_memory_buffer_support.cc View 1 2 3 4 1 chunk +74 lines, -0 lines 4 comments Download

Messages

Total messages: 43 (18 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1831513003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1831513003/20001
4 years, 9 months ago (2016-03-23 18:37:54 UTC) #3
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_gn_chromeos_rel on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_gn_chromeos_rel/builds/161315)
4 years, 9 months ago (2016-03-23 18:47:37 UTC) #5
Fady Samuel
4 years, 9 months ago (2016-03-23 19:24:19 UTC) #9
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1831513003/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1831513003/40001
4 years, 9 months ago (2016-03-23 19:24:34 UTC) #10
Fady Samuel
PTAL David!
4 years, 9 months ago (2016-03-23 19:24:42 UTC) #11
reveman
https://codereview.chromium.org/1831513003/diff/40001/gpu/ipc/common/gpu_memory_buffer_support.h File gpu/ipc/common/gpu_memory_buffer_support.h (right): https://codereview.chromium.org/1831513003/diff/40001/gpu/ipc/common/gpu_memory_buffer_support.h#newcode24 gpu/ipc/common/gpu_memory_buffer_support.h:24: // We shouldn't be instantiating this class. why bother ...
4 years, 9 months ago (2016-03-23 20:00:43 UTC) #12
Fady Samuel
PTAL David! https://codereview.chromium.org/1831513003/diff/40001/gpu/ipc/common/gpu_memory_buffer_support.h File gpu/ipc/common/gpu_memory_buffer_support.h (right): https://codereview.chromium.org/1831513003/diff/40001/gpu/ipc/common/gpu_memory_buffer_support.h#newcode24 gpu/ipc/common/gpu_memory_buffer_support.h:24: // We shouldn't be instantiating this class. ...
4 years, 9 months ago (2016-03-23 20:26:08 UTC) #13
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1831513003/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1831513003/60001
4 years, 9 months ago (2016-03-23 20:26:29 UTC) #15
Fady Samuel
+piman@ for OWNERS once reveman@ is happy. Thanks!
4 years, 9 months ago (2016-03-23 20:51:56 UTC) #17
piman
lgtm https://codereview.chromium.org/1831513003/diff/60001/gpu/gpu_ipc_common.gypi File gpu/gpu_ipc_common.gypi (right): https://codereview.chromium.org/1831513003/diff/60001/gpu/gpu_ipc_common.gypi#newcode48 gpu/gpu_ipc_common.gypi:48: '../ui/ozone/ozone.gyp:ozone_platform', Chalk one up for annoying dependencies. This ...
4 years, 9 months ago (2016-03-23 21:01:39 UTC) #18
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/199726)
4 years, 9 months ago (2016-03-23 22:15:43 UTC) #20
Fady Samuel
On 2016/03/23 21:01:39, piman wrote: > lgtm > > https://codereview.chromium.org/1831513003/diff/60001/gpu/gpu_ipc_common.gypi > File gpu/gpu_ipc_common.gypi (right): > ...
4 years, 9 months ago (2016-03-23 23:03:59 UTC) #21
reveman
lgtm
4 years, 9 months ago (2016-03-23 23:04:29 UTC) #22
Fady Samuel
+dcheng@ for gpu/ipc/common OWNER
4 years, 9 months ago (2016-03-23 23:04:34 UTC) #24
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1831513003/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1831513003/80001
4 years, 9 months ago (2016-03-23 23:17:19 UTC) #26
dcheng
lgtm with nits https://codereview.chromium.org/1831513003/diff/80001/gpu/ipc/common/gpu_memory_buffer_support.cc File gpu/ipc/common/gpu_memory_buffer_support.cc (right): https://codereview.chromium.org/1831513003/diff/80001/gpu/ipc/common/gpu_memory_buffer_support.cc#newcode20 gpu/ipc/common/gpu_memory_buffer_support.cc:20: #if defined(OS_ANDROID) elif? Or are these ...
4 years, 9 months ago (2016-03-23 23:42:12 UTC) #29
Fady Samuel
CQ'ing. Thanks. https://codereview.chromium.org/1831513003/diff/80001/gpu/ipc/common/gpu_memory_buffer_support.cc File gpu/ipc/common/gpu_memory_buffer_support.cc (right): https://codereview.chromium.org/1831513003/diff/80001/gpu/ipc/common/gpu_memory_buffer_support.cc#newcode20 gpu/ipc/common/gpu_memory_buffer_support.cc:20: #if defined(OS_ANDROID) On 2016/03/23 23:42:12, dcheng wrote: ...
4 years, 9 months ago (2016-03-23 23:49:54 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1831513003/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1831513003/100001
4 years, 9 months ago (2016-03-23 23:50:24 UTC) #33
commit-bot: I haz the power
Try jobs failed on following builders: ios_dbg_simulator_gn on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator_gn/builds/8565) ios_rel_device_gn on tryserver.chromium.mac (JOB_FAILED, ...
4 years, 9 months ago (2016-03-23 23:51:45 UTC) #35
Fady Samuel
On 2016/03/23 23:49:54, Fady Samuel wrote: > CQ'ing. Thanks. > > https://codereview.chromium.org/1831513003/diff/80001/gpu/ipc/common/gpu_memory_buffer_support.cc > File gpu/ipc/common/gpu_memory_buffer_support.cc ...
4 years, 9 months ago (2016-03-23 23:51:49 UTC) #36
Fady Samuel
On 2016/03/23 23:51:49, Fady Samuel wrote: > On 2016/03/23 23:49:54, Fady Samuel wrote: > > ...
4 years, 9 months ago (2016-03-23 23:52:07 UTC) #37
dcheng
On 2016/03/23 at 23:52:07, fsamuel wrote: > On 2016/03/23 23:51:49, Fady Samuel wrote: > > ...
4 years, 9 months ago (2016-03-24 00:11:44 UTC) #38
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 9 months ago (2016-03-24 00:27:22 UTC) #40
commit-bot: I haz the power
Patchset 5 (id:??) landed as https://crrev.com/c27742238e78f1e2f7f6fe37f101eb0d07483416 Cr-Commit-Position: refs/heads/master@{#382987}
4 years, 9 months ago (2016-03-24 00:28:37 UTC) #42
Fady Samuel
4 years, 9 months ago (2016-03-24 04:59:04 UTC) #43
Message was sent while issue was closed.
On 2016/03/24 00:11:44, dcheng wrote:
> On 2016/03/23 at 23:52:07, fsamuel wrote:
> > On 2016/03/23 23:51:49, Fady Samuel wrote:
> > > On 2016/03/23 23:49:54, Fady Samuel wrote:
> > > > CQ'ing. Thanks.
> > > > 
> > > >
> > >
>
https://codereview.chromium.org/1831513003/diff/80001/gpu/ipc/common/gpu_memo...
> > > > File gpu/ipc/common/gpu_memory_buffer_support.cc (right):
> > > > 
> > > >
> > >
>
https://codereview.chromium.org/1831513003/diff/80001/gpu/ipc/common/gpu_memo...
> > > > gpu/ipc/common/gpu_memory_buffer_support.cc:20: #if defined(OS_ANDROID)
> > > > On 2016/03/23 23:42:12, dcheng wrote:
> > > > > elif? Or are these not mutually exclusive?
> > > > 
> > > > They are mutually exclusive. Done.
> > > > 
> > > >
> > >
>
https://codereview.chromium.org/1831513003/diff/80001/gpu/ipc/common/gpu_memo...
> > > > gpu/ipc/common/gpu_memory_buffer_support.cc:46: #endif
> > > > On 2016/03/23 23:42:12, dcheng wrote:
> > > > > Similar comment here about #elif
> > > > 
> > > > Done.
> > > 
> > > Actually I take that bad. rjkroege@ suggested that this is a bad
assumption
> to
> > > make. OZONE can be made generic to run on any platform so no point in
baking
> the
> > > assumption in here.
> > 
> > *take that back.
> 
> As written, we'll never reach the Ozone bits if any of the other platform
> defines are set though.

Either way work has to be done. I'm fairly indifferent at the moment. If you
feel strongly about this I'll add the elifs in a separate CL.

Powered by Google App Engine
This is Rietveld 408576698