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

Issue 1870483003: Add command buffer support for GL_RGB CHROMIUM image emulation. (Closed)

Created:
4 years, 8 months ago by erikchen
Modified:
4 years, 8 months ago
CC:
chromium-apps-reviews_chromium.org, chromium-reviews, extensions-reviews_chromium.org, 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

Add command buffer support for GL_RGB CHROMIUM image emulation. The CHROMIUM image is always created with internal format GL_RGBA. The caller of CreateGpuMemoryBufferImageCHROMIUM is responsible for most emulation. The only support that the command buffer provides is that calls to copyTexImage2D and copyTexSubImage2D will perform parameter validation as if the internal format were RGB. BUG=595948 CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_optional_gpu_tests_rel;tryserver.chromium.mac:mac_optional_gpu_tests_rel;tryserver.chromium.win:win_optional_gpu_tests_rel Committed: https://crrev.com/6e4845661eba8e56f36aa32c788f859ebafc8403 Cr-Commit-Position: refs/heads/master@{#387779}

Patch Set 1 #

Patch Set 2 : #

Total comments: 6

Patch Set 3 : Rebase, add more comments. #

Total comments: 6

Patch Set 4 : Comments from piman. Rebase. #

Total comments: 2

Patch Set 5 : Comments from piman. #

Patch Set 6 : Fix test. Fix texture signature. #

Total comments: 4

Patch Set 7 : Add missing braces. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+225 lines, -16 lines) Patch
M content/renderer/webgraphicscontext3d_provider_impl.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/webgraphicscontext3d_provider_impl.cc View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M gpu/GLES2/extensions/CHROMIUM/CHROMIUM_gpu_memory_buffer_image.txt View 1 2 3 2 chunks +9 lines, -0 lines 0 comments Download
M gpu/command_buffer/common/capabilities.h View 1 2 3 4 1 chunk +7 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/framebuffer_manager.h View 1 chunk +1 line, -0 lines 0 comments Download
M gpu/command_buffer/service/framebuffer_manager.cc View 3 chunks +10 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder.cc View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc View 1 2 3 4 5 2 chunks +84 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/texture_manager.h View 1 2 3 3 chunks +8 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/texture_manager.cc View 1 2 3 4 5 6 8 chunks +26 lines, -3 lines 0 comments Download
M gpu/command_buffer/service/texture_manager_unittest.cc View 1 chunk +1 line, -0 lines 0 comments Download
M gpu/ipc/common/gpu_command_buffer_traits_multi.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M gpu/ipc/common/gpu_memory_buffer_support.cc View 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridgeTest.cpp View 1 2 3 4 2 chunks +6 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/DEPS View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/gpu/DEPS View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/gpu/DrawingBufferTest.cpp View 1 2 3 4 2 chunks +5 lines, -0 lines 0 comments Download
M third_party/WebKit/public/platform/WebGraphicsContext3DProvider.h View 1 2 3 4 2 chunks +3 lines, -0 lines 0 comments Download
M ui/gfx/mac/io_surface.cc View 4 chunks +2 lines, -2 lines 0 comments Download
M ui/gl/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M ui/gl/gl.gyp View 1 chunk +1 line, -0 lines 0 comments Download
M ui/gl/gl_image.h View 1 2 1 chunk +11 lines, -0 lines 0 comments Download
A + ui/gl/gl_image.cc View 1 chunk +7 lines, -5 lines 0 comments Download
M ui/gl/gl_image_io_surface.h View 1 2 2 chunks +8 lines, -0 lines 0 comments Download
M ui/gl/gl_image_io_surface.mm View 1 2 3 11 chunks +19 lines, -5 lines 0 comments Download

Messages

Total messages: 66 (20 generated)
erikchen
kbr, reveman: Please review. https://codereview.chromium.org/1870483003/diff/20001/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_gpu_memory_buffer_image.txt File gpu/GLES2/extensions/CHROMIUM/CHROMIUM_gpu_memory_buffer_image.txt (right): https://codereview.chromium.org/1870483003/diff/20001/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_gpu_memory_buffer_image.txt#newcode58 gpu/GLES2/extensions/CHROMIUM/CHROMIUM_gpu_memory_buffer_image.txt:58: perform paramter validation as if ...
4 years, 8 months ago (2016-04-06 23:26:30 UTC) #3
Ken Russell (switch to Gerrit)
On 2016/04/06 23:26:30, erikchen wrote: > kbr, reveman: Please review. > > https://codereview.chromium.org/1870483003/diff/20001/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_gpu_memory_buffer_image.txt > File ...
4 years, 8 months ago (2016-04-07 00:00:50 UTC) #4
reveman
https://codereview.chromium.org/1870483003/diff/20001/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_gpu_memory_buffer_image.txt File gpu/GLES2/extensions/CHROMIUM/CHROMIUM_gpu_memory_buffer_image.txt (right): https://codereview.chromium.org/1870483003/diff/20001/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_gpu_memory_buffer_image.txt#newcode58 gpu/GLES2/extensions/CHROMIUM/CHROMIUM_gpu_memory_buffer_image.txt:58: perform paramter validation as if the internal format were ...
4 years, 8 months ago (2016-04-07 13:00:56 UTC) #5
Ken Russell (switch to Gerrit)
I think we should proceed with the current direction of Erik's CL. Please see below. ...
4 years, 8 months ago (2016-04-07 21:41:15 UTC) #6
reveman
https://codereview.chromium.org/1870483003/diff/20001/ui/gl/gl_image.h File ui/gl/gl_image.h (right): https://codereview.chromium.org/1870483003/diff/20001/ui/gl/gl_image.h#newcode82 ui/gl/gl_image.h:82: virtual bool EmulatingRGB() const; On 2016/04/07 at 21:41:14, Ken ...
4 years, 8 months ago (2016-04-08 15:59:39 UTC) #7
erikchen
On 2016/04/08 15:59:39, reveman wrote: > https://codereview.chromium.org/1870483003/diff/20001/ui/gl/gl_image.h > File ui/gl/gl_image.h (right): > > https://codereview.chromium.org/1870483003/diff/20001/ui/gl/gl_image.h#newcode82 > ...
4 years, 8 months ago (2016-04-08 16:40:19 UTC) #8
erikchen
On 2016/04/08 16:40:19, erikchen wrote: > On 2016/04/08 15:59:39, reveman wrote: > > https://codereview.chromium.org/1870483003/diff/20001/ui/gl/gl_image.h > ...
4 years, 8 months ago (2016-04-11 16:28:49 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/1870483003/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1870483003/40001
4 years, 8 months ago (2016-04-12 23:55:12 UTC) #11
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 8 months ago (2016-04-13 01:21:31 UTC) #14
erikchen
reveman: PTAL
4 years, 8 months ago (2016-04-13 01:29:55 UTC) #15
reveman
sorry for the delay ui/gl/gl_image* lgtm
4 years, 8 months ago (2016-04-13 22:13:13 UTC) #16
erikchen
kbr: PTAL Note that reveman@ prefers to not change the CHROMIUM image API.
4 years, 8 months ago (2016-04-13 22:30:36 UTC) #17
Ken Russell (switch to Gerrit)
LGTM too. Thanks for pushing this forward.
4 years, 8 months ago (2016-04-13 23:21:06 UTC) #18
erikchen
piman: Please review gpu/ ccameron: Please review ui/gfx/mac/io_surface.cc
4 years, 8 months ago (2016-04-13 23:22:23 UTC) #20
erikchen
tsepez: Please review gpu/ipc/common/gpu_memory_buffer_support.cc.
4 years, 8 months ago (2016-04-13 23:23:16 UTC) #22
Tom Sepez
lgtm
4 years, 8 months ago (2016-04-13 23:31:44 UTC) #23
piman
Could you add a unit test for the GLES2 code for when an image returns ...
4 years, 8 months ago (2016-04-14 01:05:43 UTC) #24
erikchen
https://codereview.chromium.org/1870483003/diff/40001/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_gpu_memory_buffer_image.txt File gpu/GLES2/extensions/CHROMIUM/CHROMIUM_gpu_memory_buffer_image.txt (right): https://codereview.chromium.org/1870483003/diff/40001/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_gpu_memory_buffer_image.txt#newcode59 gpu/GLES2/extensions/CHROMIUM/CHROMIUM_gpu_memory_buffer_image.txt:59: the internal format were RGB. On 2016/04/14 01:05:43, piman ...
4 years, 8 months ago (2016-04-14 01:20:10 UTC) #25
piman
On 2016/04/14 01:20:10, erikchen wrote: > https://codereview.chromium.org/1870483003/diff/40001/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_gpu_memory_buffer_image.txt > File gpu/GLES2/extensions/CHROMIUM/CHROMIUM_gpu_memory_buffer_image.txt (right): > > https://codereview.chromium.org/1870483003/diff/40001/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_gpu_memory_buffer_image.txt#newcode59 > ...
4 years, 8 months ago (2016-04-14 02:54:36 UTC) #26
erikchen
piman: PTAL I added a unit test. I ended up not adding a capability because ...
4 years, 8 months ago (2016-04-14 21:24:47 UTC) #27
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1870483003/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1870483003/60001
4 years, 8 months ago (2016-04-14 21:25:41 UTC) #29
piman
For the plumbing: +danakj who changed a bunch of this recently, but if I'm not ...
4 years, 8 months ago (2016-04-14 21:51:37 UTC) #31
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: cast_shell_linux on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linux/builds/145112)
4 years, 8 months ago (2016-04-14 21:53:56 UTC) #33
danakj
On Thu, Apr 14, 2016 at 2:51 PM, <piman@chromium.org> wrote: > For the plumbing: +danakj ...
4 years, 8 months ago (2016-04-14 21:54:50 UTC) #34
erikchen
piman: PTAL I also added a new capability and plumbed it through WebGraphicsContext3DProvider.h, though it ...
4 years, 8 months ago (2016-04-15 00:17:06 UTC) #35
piman
thanks, LGTM!
4 years, 8 months ago (2016-04-15 02:00:27 UTC) #36
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1870483003/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1870483003/80001
4 years, 8 months ago (2016-04-15 02:56:59 UTC) #38
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: cast_shell_linux on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linux/builds/145292)
4 years, 8 months ago (2016-04-15 03:27:48 UTC) #40
erikchen
dcheng: Please review third_party/WebKit/public/ piman: I updated the texture signature to include the "emulating_rgb_" member. ...
4 years, 8 months ago (2016-04-15 17:29:53 UTC) #42
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1870483003/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1870483003/100001
4 years, 8 months ago (2016-04-15 17:30:44 UTC) #44
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win_chromium_compile_dbg_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_compile_dbg_ng/builds/175419)
4 years, 8 months ago (2016-04-15 18:37:07 UTC) #46
erikchen
https://codereview.chromium.org/1870483003/diff/100001/gpu/command_buffer/service/texture_manager.cc File gpu/command_buffer/service/texture_manager.cc (right): https://codereview.chromium.org/1870483003/diff/100001/gpu/command_buffer/service/texture_manager.cc#newcode878 gpu/command_buffer/service/texture_manager.cc:878: emulating_rgb_ = true; piman: Request for comment. This code ...
4 years, 8 months ago (2016-04-15 18:54:07 UTC) #47
dcheng
https://codereview.chromium.org/1870483003/diff/100001/third_party/WebKit/public/platform/WebGraphicsContext3DProvider.h File third_party/WebKit/public/platform/WebGraphicsContext3DProvider.h (right): https://codereview.chromium.org/1870483003/diff/100001/third_party/WebKit/public/platform/WebGraphicsContext3DProvider.h#newcode39 third_party/WebKit/public/platform/WebGraphicsContext3DProvider.h:39: struct Capabilities; I don't think you can use a ...
4 years, 8 months ago (2016-04-15 19:11:18 UTC) #48
dcheng
https://codereview.chromium.org/1870483003/diff/100001/third_party/WebKit/public/platform/WebGraphicsContext3DProvider.h File third_party/WebKit/public/platform/WebGraphicsContext3DProvider.h (right): https://codereview.chromium.org/1870483003/diff/100001/third_party/WebKit/public/platform/WebGraphicsContext3DProvider.h#newcode39 third_party/WebKit/public/platform/WebGraphicsContext3DProvider.h:39: struct Capabilities; On 2016/04/15 at 19:11:17, dcheng wrote: > ...
4 years, 8 months ago (2016-04-15 19:12:53 UTC) #49
dcheng
Actually, I guess this is OK so just ignore everything I just said. LGTM.
4 years, 8 months ago (2016-04-15 19:14:16 UTC) #50
piman
+brucedawson for MSVC advice https://codereview.chromium.org/1870483003/diff/100001/gpu/command_buffer/service/texture_manager.cc File gpu/command_buffer/service/texture_manager.cc (right): https://codereview.chromium.org/1870483003/diff/100001/gpu/command_buffer/service/texture_manager.cc#newcode878 gpu/command_buffer/service/texture_manager.cc:878: emulating_rgb_ = true; On 2016/04/15 ...
4 years, 8 months ago (2016-04-15 19:20:24 UTC) #52
brucedawson
Suppressing the warning seems fine. There are a few options: #pragma warning(push) #pragma warning(disable : ...
4 years, 8 months ago (2016-04-15 19:49:09 UTC) #53
piman
On Fri, Apr 15, 2016 at 12:49 PM, <brucedawson@chromium.org> wrote: > Suppressing the warning seems ...
4 years, 8 months ago (2016-04-15 20:10:50 UTC) #54
erikchen
A pair of missing braces meant that the operator++ implicit in the range based for ...
4 years, 8 months ago (2016-04-15 21:14:41 UTC) #55
ccameron
ui/gfx/mac/io_surface.cc lgtm
4 years, 8 months ago (2016-04-15 21:37:28 UTC) #56
brucedawson
On 2016/04/15 21:14:41, erikchen wrote: > A pair of missing braces meant that the operator++ ...
4 years, 8 months ago (2016-04-15 21:37:44 UTC) #59
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1870483003/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1870483003/120001
4 years, 8 months ago (2016-04-15 21:38:24 UTC) #60
piman
On Fri, Apr 15, 2016 at 2:37 PM, <brucedawson@chromium.org> wrote: > On 2016/04/15 21:14:41, erikchen ...
4 years, 8 months ago (2016-04-15 22:03:14 UTC) #61
commit-bot: I haz the power
Committed patchset #7 (id:120001)
4 years, 8 months ago (2016-04-16 01:23:58 UTC) #63
commit-bot: I haz the power
Patchset 7 (id:??) landed as https://crrev.com/6e4845661eba8e56f36aa32c788f859ebafc8403 Cr-Commit-Position: refs/heads/master@{#387779}
4 years, 8 months ago (2016-04-16 01:25:04 UTC) #65
reveman
4 years, 8 months ago (2016-04-18 22:57:42 UTC) #66
Message was sent while issue was closed.
On 2016/04/14 at 02:54:36, piman wrote:
> On 2016/04/14 01:20:10, erikchen wrote:
> >
https://codereview.chromium.org/1870483003/diff/40001/gpu/GLES2/extensions/CH...
> > File gpu/GLES2/extensions/CHROMIUM/CHROMIUM_gpu_memory_buffer_image.txt
(right):
> > 
> >
https://codereview.chromium.org/1870483003/diff/40001/gpu/GLES2/extensions/CH...
> > gpu/GLES2/extensions/CHROMIUM/CHROMIUM_gpu_memory_buffer_image.txt:59: the
> > internal format were RGB.
> > On 2016/04/14 01:05:43, piman wrote:
> > > Actually, it looks like ReadPixels is affected too.
> > 
> > For reference, this is the companion CL that implements the client side
> > workaround:
> > https://codereview.chromium.org/1856933002/
> > 
> > There's already an #ifdef OS_MACOSX, because the target needs to be
RECTANGLE
> > instead of 2D. If you want, we could expose 2 capabilities, one for RGB
> > workaround, and one for RECTANGLE instead of 2D, and then we could remove
the
> > #ifdef from DrawingBuffer.cpp
> 
> It would be nice to remove the ifdef - if done as a cap it also means we can
do this as a gpu workaround, iow possibly only on some subset of drivers/OSX
versions.
> For the texture target, I think we have a way to query it already. reveman@
would know? Otherwise, a cap bit is possible

https://code.google.com/p/chromium/codesearch#chromium/src/content/browser/gp...
can be used to find out what the texture target should be for a native GMB.
That's also shared with each renderer and ends up in cc::ResourceProvider as
ResourceProvider::GetTextureImageTarget. Some plumbing might be needed to get
that to DrawingBuffer.cpp but that is probably the right thing to do.

Powered by Google App Engine
This is Rietveld 408576698