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

Issue 205193006: gpu: Remove map_image field from gpu::Capabilities. (Closed)

Created:
6 years, 9 months ago by reveman
Modified:
4 years, 9 months ago
Reviewers:
danakj, jbates, piman
CC:
chromium-reviews, joi+watch-content_chromium.org, viettrungluu+watch_chromium.org, jam, sievers+watch_chromium.org, jbauman+watch_chromium.org, Aaron Boodman, darin-cc_chromium.org, kalyank, darin (slow to review), piman+watch_chromium.org, cc-bugs_chromium.org, abarth-chromium, ben+mojo_chromium.org, danakj+watch_chromium.org
Visibility:
Public.

Description

gpu: Remove map_image field from gpu::Capabilities. As far as our current usage of this extension cares, it's now supported by all command buffer implementations. BUG=354833

Patch Set 1 #

Total comments: 1

Patch Set 2 : #

Patch Set 3 : #

Total comments: 2

Patch Set 4 : move TODO #

Unified diffs Side-by-side diffs Delta from patch set Stats (+45 lines, -83 lines) Patch
M cc/output/delegating_renderer.cc View 1 chunk +1 line, -2 lines 0 comments Download
M cc/output/gl_renderer.cc View 1 chunk +1 line, -2 lines 0 comments Download
M content/common/gpu/client/command_buffer_proxy_impl.h View 3 chunks +3 lines, -1 line 0 comments Download
M content/common/gpu/client/command_buffer_proxy_impl.cc View 2 chunks +0 lines, -6 lines 0 comments Download
M content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc View 1 chunk +2 lines, -1 line 0 comments Download
M content/common/gpu/gpu_command_buffer_stub.cc View 2 chunks +2 lines, -3 lines 0 comments Download
M content/common/gpu/gpu_messages.h View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M gpu/command_buffer/client/client_test_helper.h View 1 chunk +0 lines, -1 line 0 comments Download
M gpu/command_buffer/client/gl_in_process_context.cc View 1 chunk +2 lines, -1 line 0 comments Download
M gpu/command_buffer/client/gles2_implementation.h View 1 chunk +2 lines, -1 line 0 comments Download
M gpu/command_buffer/client/gles2_implementation.cc View 3 chunks +4 lines, -6 lines 0 comments Download
M gpu/command_buffer/client/gles2_implementation_unittest.cc View 3 chunks +3 lines, -3 lines 0 comments Download
M gpu/command_buffer/common/capabilities.h View 1 chunk +0 lines, -3 lines 0 comments Download
M gpu/command_buffer/common/capabilities.cc View 1 chunk +1 line, -2 lines 0 comments Download
M gpu/command_buffer/common/gpu_control.h View 2 chunks +0 lines, -3 lines 0 comments Download
M gpu/command_buffer/service/gpu_control_service.h View 2 chunks +1 line, -5 lines 0 comments Download
M gpu/command_buffer/service/gpu_control_service.cc View 3 chunks +4 lines, -11 lines 0 comments Download
M gpu/command_buffer/service/in_process_command_buffer.h View 3 chunks +3 lines, -1 line 0 comments Download
M gpu/command_buffer/service/in_process_command_buffer.cc View 2 chunks +2 lines, -7 lines 0 comments Download
M gpu/command_buffer/tests/gl_manager.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M gpu/gles2_conform_support/egl/display.cc View 1 2 2 chunks +3 lines, -2 lines 0 comments Download
M mojo/gles2/command_buffer_client_impl.h View 1 chunk +0 lines, -1 line 0 comments Download
M mojo/gles2/command_buffer_client_impl.cc View 1 chunk +0 lines, -6 lines 0 comments Download
M mojo/gles2/gles2_context.cc View 1 2 3 1 chunk +3 lines, -1 line 0 comments Download
M mojo/services/gles2/command_buffer_impl.cc View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download
M ppapi/proxy/ppapi_command_buffer_proxy.h View 1 chunk +0 lines, -1 line 0 comments Download
M ppapi/proxy/ppapi_command_buffer_proxy.cc View 1 chunk +0 lines, -6 lines 0 comments Download
M ppapi/shared_impl/ppb_graphics_3d_shared.cc View 1 chunk +4 lines, -1 line 0 comments Download

Messages

Total messages: 11 (0 generated)
reveman
https://codereview.chromium.org/205193006/diff/1/gpu/command_buffer/service/gpu_control_service.cc File gpu/command_buffer/service/gpu_control_service.cc (right): https://codereview.chromium.org/205193006/diff/1/gpu/command_buffer/service/gpu_control_service.cc#newcode35 gpu/command_buffer/service/gpu_control_service.cc:35: DCHECK(gpu_memory_buffer_factory_); Note: I change this to a DCHECK for ...
6 years, 9 months ago (2014-03-22 13:35:20 UTC) #1
reveman
6 years, 9 months ago (2014-03-22 13:37:06 UTC) #2
danakj
lgtm https://codereview.chromium.org/205193006/diff/30001/mojo/gles2/gles2_context.cc File mojo/gles2/gles2_context.cc (right): https://codereview.chromium.org/205193006/diff/30001/mojo/gles2/gles2_context.cc#newcode49 mojo/gles2/gles2_context.cc:49: gpu::Capabilities())); Can we get at the decoder caps ...
6 years, 9 months ago (2014-03-24 16:42:07 UTC) #3
reveman
https://codereview.chromium.org/205193006/diff/30001/mojo/gles2/gles2_context.cc File mojo/gles2/gles2_context.cc (right): https://codereview.chromium.org/205193006/diff/30001/mojo/gles2/gles2_context.cc#newcode49 mojo/gles2/gles2_context.cc:49: gpu::Capabilities())); On 2014/03/24 16:42:08, danakj wrote: > Can we ...
6 years, 9 months ago (2014-03-24 17:00:16 UTC) #4
piman
So, map_image isn't (currently) supported by mojo or pepper. Should we really do this?
6 years, 9 months ago (2014-03-24 19:14:26 UTC) #5
reveman
On 2014/03/24 19:14:26, piman wrote: > So, map_image isn't (currently) supported by mojo or pepper. ...
6 years, 9 months ago (2014-03-24 19:55:30 UTC) #6
piman
On Mon, Mar 24, 2014 at 12:55 PM, <reveman@chromium.org> wrote: > On 2014/03/24 19:14:26, piman ...
6 years, 9 months ago (2014-03-24 20:09:42 UTC) #7
reveman
On 2014/03/24 20:09:42, piman wrote: > On Mon, Mar 24, 2014 at 12:55 PM, <mailto:reveman@chromium.org> ...
6 years, 9 months ago (2014-03-24 21:37:03 UTC) #8
piman
On Mon, Mar 24, 2014 at 2:37 PM, <reveman@chromium.org> wrote: > On 2014/03/24 20:09:42, piman ...
6 years, 9 months ago (2014-03-24 21:44:04 UTC) #9
reveman
On 2014/03/24 21:44:04, piman wrote: > On Mon, Mar 24, 2014 at 2:37 PM, <mailto:reveman@chromium.org> ...
6 years, 9 months ago (2014-03-24 23:31:38 UTC) #10
piman
6 years, 9 months ago (2014-03-24 23:38:15 UTC) #11
On Mon, Mar 24, 2014 at 4:31 PM, <reveman@chromium.org> wrote:

> On 2014/03/24 21:44:04, piman wrote:
>
>  On Mon, Mar 24, 2014 at 2:37 PM, <mailto:reveman@chromium.org> wrote:
>>
>
>  > On 2014/03/24 20:09:42, piman wrote:
>> >
>> >  On Mon, Mar 24, 2014 at 12:55 PM, <mailto:reveman@chromium.org> wrote:
>> >>
>> >
>> >  > On 2014/03/24 19:14:26, piman wrote:
>> >> >
>> >> >> So, map_image isn't (currently) supported by mojo or pepper. Should
>> we
>> >> >> really
>> >> >>
>> >> > do
>> >> >
>> >> >> this?
>> >> >>
>> >> >
>> >> > "Supported" doesn't mean much in this case. I guess it currently
>> means
>> >> we
>> >> > have a
>> >> > framework in place to produce some type of buffer that can be used
>> with
>> >> > MapImage
>> >> > API. We can't make the decision whether it should be used or not
>> based
>> >> on
>> >> > it as
>> >> > that will have to be a high level decision that depends on platform,
>> >> > drivers,
>> >> > phase of the moon...
>> >> >
>> >> > The capabilities field is confusing as it makes it look like we can
>> >> decide
>> >> > if
>> >> > 0-copy should be used based on it. I'd rather say that this is always
>> >> > supported
>> >> > and one valid implementation is to always fail when trying to
>> allocate a
>> >> > gpu
>> >> > memory buffer. Makes it less confusing and removes some unnecessary
>> >> code.
>> >> >
>> >>
>> >
>> >  The idea of the Capabilities struct was to shortcut the testing for
>> >> extensions: avoid round trips and string parsing. Each one of the
>> fields
>> >> refers directly to an optional extension. I agree that the struct may
>> be
>> >> misnamed (though we may want to extend it to have other things that
>> would
>> >> be nice to avoid round trips for, such as maximum texture size).
>> >>
>> >
>> >  In the case of map_image, the extension is effectively not (currently)
>> >> present on pepper and mojo, because we haven't yet wired the proper
>> IPCs.
>> >> So I feel like pretending the extension is there anyway but always
>> fails
>> >> is
>> >> counter-productive.
>> >>
>> >
>> > Requiring everything that is not implemented by all existing
>> > gpu::GpuControl
>> > implementations to be a run-time optional feature is overkill IMO. I'll
>> > wire up
>> > pepper if necessary but I think we'd save ourselves some trouble by not
>> > requiring that for everything we add to the gpu::GpuControl interface.
>> >
>>
>
>  We can make it compile-time by breaking GpuControl into smaller
>> interfaces.
>>
>
> Not sure I understand how that helps. Can you explain a bit more what you
> have
> in mind?
>

Separate out CreateGpuMemoryBuffer/DestroyGpuMemoryBuffer out of
GpuControl, and make a new interface (GpuMemoryBufferInterface). Have the
places that implement the extension (in-process, CommandBufferProxyImpl)
also implement that interface. Have the places that don't implement the
extension (pepper, mojo) not implement the interface.
Then you can pass that interface explicitly to places that need it (cc?).
At compile time you know whether you're hooking things that will work vs
not.


> https://codereview.chromium.org/205193006/
>

To unsubscribe from this group and stop receiving emails from it, send an email
to chromium-reviews+unsubscribe@chromium.org.

Powered by Google App Engine
This is Rietveld 408576698