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

Issue 1143393007: Teach GPU command buffer whether a context is webgl. (Closed)

Created:
5 years, 6 months ago by Zhenyao Mo
Modified:
5 years, 6 months ago
CC:
chromium-reviews, jam, sievers+watch_chromium.org, jbauman+watch_chromium.org, darin-cc_chromium.org, kalyank, piman+watch_chromium.org, danakj+watch_chromium.org, no sievers, vmiura
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Teach GPU command buffer whether a context is webgl. Then we initialize it differently. For example, if it's WebGL 1, we disallow NPOT support. Also, we initialize shader translator correctly once (before we have to initialize it to the default ES spec and then reset a new one with WebGL spec), so this is a speedup at WebGL context creation time. Also, we separate the idea of whether a context is ES2/ES3 or WebGL1/WebGL2. This is necessary because before we assume ES3==WebGL2, which isn't true, say, we may always want to use ES3, for WebGL 2 and for compositor, etc. BUG=497464 TEST=gpu_unittests, webgl_conformance, gl_tests R=kbr@chromium.org,piman@chromium.org Committed: https://crrev.com/539d22c09d9ff40d132998b1d955ffc57bbfc05c Cr-Commit-Position: refs/heads/master@{#333439}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 8

Patch Set 4 : #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+156 lines, -89 lines) Patch
M content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc View 1 chunk +0 lines, -3 lines 0 comments Download
M gpu/blink/webgraphicscontext3d_impl.cc View 1 1 chunk +1 line, -2 lines 0 comments Download
M gpu/blink/webgraphicscontext3d_in_process_command_buffer_impl.h View 1 chunk +0 lines, -1 line 0 comments Download
M gpu/blink/webgraphicscontext3d_in_process_command_buffer_impl.cc View 2 chunks +0 lines, -4 lines 0 comments Download
M gpu/command_buffer/common/gles2_cmd_utils.h View 1 1 chunk +2 lines, -1 line 0 comments Download
M gpu/command_buffer/common/gles2_cmd_utils.cc View 1 4 chunks +7 lines, -6 lines 0 comments Download
M gpu/command_buffer/service/context_group.h View 1 2 3 3 chunks +12 lines, -0 lines 2 comments Download
M gpu/command_buffer/service/context_group.cc View 1 2 3 2 chunks +31 lines, -1 line 0 comments Download
M gpu/command_buffer/service/context_group_unittest.cc View 1 2 3 2 chunks +13 lines, -3 lines 0 comments Download
M gpu/command_buffer/service/feature_info.cc View 1 chunk +5 lines, -4 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder.h View 1 2 3 1 chunk +3 lines, -1 line 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder.cc View 1 2 3 12 chunks +43 lines, -26 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc View 1 2 3 4 chunks +11 lines, -9 lines 0 comments Download
M gpu/command_buffer/tests/gl_manager.h View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M gpu/command_buffer/tests/gl_manager.cc View 1 2 2 chunks +3 lines, -1 line 0 comments Download
M gpu/command_buffer/tests/gl_program_unittest.cc View 1 2 4 chunks +19 lines, -27 lines 0 comments Download

Messages

Total messages: 18 (4 generated)
Zhenyao Mo
kbr, piman: please review. (Both are required as each of you are only owner of ...
5 years, 6 months ago (2015-06-07 18:35:07 UTC) #1
Zhenyao Mo
https://codereview.chromium.org/1143393007/diff/40001/gpu/command_buffer/service/feature_info.cc File gpu/command_buffer/service/feature_info.cc (right): https://codereview.chromium.org/1143393007/diff/40001/gpu/command_buffer/service/feature_info.cc#newcode526 gpu/command_buffer/service/feature_info.cc:526: if (!disallowed_features_.npot_support && This is where we disable NPOT ...
5 years, 6 months ago (2015-06-07 21:42:12 UTC) #2
piman
https://codereview.chromium.org/1143393007/diff/40001/gpu/command_buffer/service/gles2_cmd_decoder.cc File gpu/command_buffer/service/gles2_cmd_decoder.cc (left): https://codereview.chromium.org/1143393007/diff/40001/gpu/command_buffer/service/gles2_cmd_decoder.cc#oldcode2599 gpu/command_buffer/service/gles2_cmd_decoder.cc:2599: if (attrib_parser.es3_context_required && Don't we want to keep this? ...
5 years, 6 months ago (2015-06-08 21:40:21 UTC) #3
Zhenyao Mo
https://codereview.chromium.org/1143393007/diff/40001/gpu/command_buffer/service/gles2_cmd_decoder.cc File gpu/command_buffer/service/gles2_cmd_decoder.cc (left): https://codereview.chromium.org/1143393007/diff/40001/gpu/command_buffer/service/gles2_cmd_decoder.cc#oldcode2599 gpu/command_buffer/service/gles2_cmd_decoder.cc:2599: if (attrib_parser.es3_context_required && On 2015/06/08 21:40:21, piman (Very slow ...
5 years, 6 months ago (2015-06-08 22:23:22 UTC) #4
piman
On Mon, Jun 8, 2015 at 3:23 PM, <zmo@chromium.org> wrote: > > > https://codereview.chromium.org/1143393007/diff/40001/gpu/command_buffer/service/gles2_cmd_decoder.cc > ...
5 years, 6 months ago (2015-06-08 22:37:24 UTC) #5
Ken Russell (switch to Gerrit)
This direction looks good overall. There's no plan to put WebGL contexts back into client-side ...
5 years, 6 months ago (2015-06-09 01:07:57 UTC) #6
Zhenyao Mo
Revised. Please take another look.
5 years, 6 months ago (2015-06-09 01:19:13 UTC) #10
piman
lgtm https://codereview.chromium.org/1143393007/diff/100001/gpu/command_buffer/service/context_group.h File gpu/command_buffer/service/context_group.h (right): https://codereview.chromium.org/1143393007/diff/100001/gpu/command_buffer/service/context_group.h#newcode48 gpu/command_buffer/service/context_group.h:48: kContextTypeWebGL1, nit: CONTEXT_TYPE_WEBGL1 etc. per style guide.
5 years, 6 months ago (2015-06-09 02:19:37 UTC) #11
Zhenyao Mo
https://codereview.chromium.org/1143393007/diff/100001/gpu/command_buffer/service/context_group.h File gpu/command_buffer/service/context_group.h (right): https://codereview.chromium.org/1143393007/diff/100001/gpu/command_buffer/service/context_group.h#newcode48 gpu/command_buffer/service/context_group.h:48: kContextTypeWebGL1, On 2015/06/09 02:19:37, piman (Very slow to review) ...
5 years, 6 months ago (2015-06-09 03:50:23 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1143393007/100001
5 years, 6 months ago (2015-06-09 03:50:46 UTC) #14
commit-bot: I haz the power
Committed patchset #4 (id:100001)
5 years, 6 months ago (2015-06-09 04:14:30 UTC) #15
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/539d22c09d9ff40d132998b1d955ffc57bbfc05c Cr-Commit-Position: refs/heads/master@{#333439}
5 years, 6 months ago (2015-06-09 04:15:25 UTC) #16
piman
On Mon, Jun 8, 2015 at 8:50 PM, <zmo@chromium.org> wrote: > > > https://codereview.chromium.org/1143393007/diff/100001/gpu/command_buffer/service/context_group.h > ...
5 years, 6 months ago (2015-06-09 15:00:09 UTC) #17
Zhenyao Mo
5 years, 6 months ago (2015-06-09 16:31:27 UTC) #18
Message was sent while issue was closed.
On 2015/06/09 15:00:09, piman (Very slow to review) wrote:
> On Mon, Jun 8, 2015 at 8:50 PM, <mailto:zmo@chromium.org> wrote:
> 
> >
> >
> >
>
https://codereview.chromium.org/1143393007/diff/100001/gpu/command_buffer/ser...
> > File gpu/command_buffer/service/context_group.h (right):
> >
> >
> >
>
https://codereview.chromium.org/1143393007/diff/100001/gpu/command_buffer/ser...
> > gpu/command_buffer/service/context_group.h:48: kContextTypeWebGL1,
> > On 2015/06/09 02:19:37, piman (Very slow to review) wrote:
> >
> >> nit: CONTEXT_TYPE_WEBGL1 etc. per style guide.
> >>
> >
> > Actually the new style guide prefers the constant style instead of the
> > macro style for enums:
> >
> >
> >
>
http://google-styleguide.googlecode.com/svn/trunk/cppguide.html#Enumerator_Names
> 
> 
> http://dev.chromium.org/developers/coding-style#Naming overrules this for
> Chromium code.
> 
> Antoine

Thanks for the info. I'll update it in a followup CL.

> 
> 
> >
> >
> > https://codereview.chromium.org/1143393007/
> >
> 
> To unsubscribe from this group and stop receiving emails from it, send an
email
> to mailto:chromium-reviews+unsubscribe@chromium.org.

Powered by Google App Engine
This is Rietveld 408576698