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

Issue 1419733005: gpu: Add YCbCr 420v extension. (Closed)

Created:
5 years, 1 month ago by Daniele Castagna
Modified:
5 years ago
Reviewers:
reveman, piman
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

gpu: Add YCbCr 420v extension. On Mac we currently support textures backed by GpuMemoryBuffer with UYVY_422 format when GL_APPLE_ycbcr_422 is available. This allows both to use the backing IOSurface as CALayers and to bind the IOSurface to a GL texture for sampling. 420v IOSurfaces, while being more efficient when used as a CALayer, don't support being sampled from GL. This CL adds a CHROMIUM extension, that when available, allows users of CHROMIUM command buffer to use a 420v IOSurface from GL as an RGB texture. This is achieved converting the IOSurface from YUV to RGB when it's bound to a texture on the service side. This will allow to use 420v for video playback using VideoLayerImpl (promoted to CALayer) and from SkCanvasVideoRenderer when needed (WebGL, Canvas & co.) BUG=524582 Committed: https://crrev.com/f0b514cca449dee0c89b3c3477ee567e9bb110f1 Cr-Commit-Position: refs/heads/master@{#363148}

Patch Set 1 #

Patch Set 2 : Add gl_helper. Restore GL state. #

Patch Set 3 : Actually add gl_image_io_surface_unittest.cc. #

Patch Set 4 : Clean-ups. #

Total comments: 22

Patch Set 5 : Address first round of comments. #

Patch Set 6 : Rebase on master. Add gl/gfx namespace qualifiers. #

Total comments: 32

Patch Set 7 : Set origin to crrev.com/1408753003. #

Total comments: 42

Patch Set 8 : Address reveman's comments. #

Total comments: 5

Patch Set 9 : DeleteTextures and BGRA/RGBA tests. #

Patch Set 10 : Move yuv_textures to image GL state. #

Total comments: 10

Patch Set 11 : Remove trailing whitespaces. #

Total comments: 13

Patch Set 12 : Address piman's comments. #

Total comments: 6

Patch Set 13 : Rebase on master. #

Patch Set 14 : Restore old array buffer binding. #

Patch Set 15 : ScopedCapability. Add TODO. #

Total comments: 2

Patch Set 16 : Actually enable/disable capabilities. Typo. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+619 lines, -124 lines) Patch
A + gpu/GLES2/extensions/CHROMIUM/CHROMIUM_ycbcr_420v_image.txt View 1 2 3 4 5 6 7 8 9 10 4 chunks +10 lines, -10 lines 0 comments Download
M gpu/GLES2/gl2extchromium.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +4 lines, -0 lines 0 comments Download
M gpu/command_buffer/build_gles2_cmd_buffer.py View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M gpu/command_buffer/client/gles2_implementation.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M gpu/command_buffer/service/feature_info.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M gpu/command_buffer/service/feature_info.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +3 lines, -0 lines 0 comments Download
M ui/gl/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +6 lines, -0 lines 0 comments Download
M ui/gl/gl.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -0 lines 0 comments Download
M ui/gl/gl_bindings.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +3 lines, -0 lines 0 comments Download
A + ui/gl/gl_helper.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +7 lines, -21 lines 0 comments Download
A ui/gl/gl_helper.cc View 1 2 3 4 1 chunk +71 lines, -0 lines 0 comments Download
M ui/gl/gl_image_io_surface.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +11 lines, -0 lines 0 comments Download
M ui/gl/gl_image_io_surface.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 12 chunks +173 lines, -7 lines 0 comments Download
A ui/gl/gl_image_io_surface_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +56 lines, -0 lines 0 comments Download
M ui/gl/gl_image_ref_counted_memory_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M ui/gl/gl_image_shared_memory_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +2 lines, -2 lines 0 comments Download
M ui/gl/gl_tests.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +5 lines, -0 lines 0 comments Download
M ui/gl/scoped_binders.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +108 lines, -0 lines 0 comments Download
M ui/gl/scoped_binders.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +112 lines, -1 line 0 comments Download
M ui/gl/test/gl_image_test_support.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M ui/gl/test/gl_image_test_support.cc View 1 2 3 4 5 6 7 8 9 10 11 12 6 chunks +32 lines, -1 line 0 comments Download
M ui/gl/test/gl_image_test_template.h View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +9 lines, -5 lines 0 comments Download
M ui/gl/test/gl_test_helper.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +0 lines, -16 lines 0 comments Download
M ui/gl/test/gl_test_helper.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +0 lines, -60 lines 0 comments Download

Messages

Total messages: 43 (13 generated)
Daniele Castagna
5 years, 1 month ago (2015-10-27 01:26:09 UTC) #4
reveman
https://codereview.chromium.org/1419733005/diff/60001/ui/gl/gl_helper.cc File ui/gl/gl_helper.cc (right): https://codereview.chromium.org/1419733005/diff/60001/ui/gl/gl_helper.cc#newcode7 ui/gl/gl_helper.cc:7: #include <fstream> fstream? what is this for? https://codereview.chromium.org/1419733005/diff/60001/ui/gl/gl_helper.cc#newcode10 ui/gl/gl_helper.cc:10: ...
5 years, 1 month ago (2015-10-27 19:31:55 UTC) #5
Daniele Castagna
PTAL. https://codereview.chromium.org/1419733005/diff/60001/ui/gl/gl_helper.cc File ui/gl/gl_helper.cc (right): https://codereview.chromium.org/1419733005/diff/60001/ui/gl/gl_helper.cc#newcode7 ui/gl/gl_helper.cc:7: #include <fstream> On 2015/10/27 at 19:31:54, reveman wrote: ...
5 years, 1 month ago (2015-10-29 20:09:05 UTC) #6
reveman
Mostly nits. Patch looks good in general. I think we just need to fix the ...
5 years, 1 month ago (2015-10-29 22:08:04 UTC) #7
Daniele Castagna
On 2015/10/29 at 22:08:04, reveman wrote: > Mostly nits. Patch looks good in general. I ...
5 years, 1 month ago (2015-10-30 23:51:57 UTC) #8
reveman
this looks great, mostly nits https://codereview.chromium.org/1419733005/diff/120001/ui/gl/BUILD.gn File ui/gl/BUILD.gn (right): https://codereview.chromium.org/1419733005/diff/120001/ui/gl/BUILD.gn#newcode351 ui/gl/BUILD.gn:351: } nit: blankline before ...
5 years, 1 month ago (2015-11-01 14:19:05 UTC) #9
Daniele Castagna
https://codereview.chromium.org/1419733005/diff/120001/ui/gl/BUILD.gn File ui/gl/BUILD.gn (right): https://codereview.chromium.org/1419733005/diff/120001/ui/gl/BUILD.gn#newcode351 ui/gl/BUILD.gn:351: } On 2015/11/01 at 14:19:04, reveman wrote: > nit: ...
5 years, 1 month ago (2015-11-01 21:55:31 UTC) #10
reveman
https://codereview.chromium.org/1419733005/diff/140001/ui/gl/gl_image_io_surface.mm File ui/gl/gl_image_io_surface.mm (right): https://codereview.chromium.org/1419733005/diff/140001/ui/gl/gl_image_io_surface.mm#newcode316 ui/gl/gl_image_io_surface.mm:316: glGenTextures(2, yuv_textures); we seem to be leaking these when ...
5 years, 1 month ago (2015-11-02 01:09:44 UTC) #11
Daniele Castagna
https://codereview.chromium.org/1419733005/diff/140001/ui/gl/gl_image_io_surface.mm File ui/gl/gl_image_io_surface.mm (right): https://codereview.chromium.org/1419733005/diff/140001/ui/gl/gl_image_io_surface.mm#newcode316 ui/gl/gl_image_io_surface.mm:316: glGenTextures(2, yuv_textures); On 2015/11/02 at 01:09:44, reveman wrote: > ...
5 years, 1 month ago (2015-11-02 19:35:52 UTC) #12
reveman
lgtm https://codereview.chromium.org/1419733005/diff/140001/ui/gl/gl_image_io_surface.mm File ui/gl/gl_image_io_surface.mm (right): https://codereview.chromium.org/1419733005/diff/140001/ui/gl/gl_image_io_surface.mm#newcode316 ui/gl/gl_image_io_surface.mm:316: glGenTextures(2, yuv_textures); On 2015/11/02 at 19:35:51, Daniele Castagna ...
5 years, 1 month ago (2015-11-02 21:13:33 UTC) #13
Daniele Castagna
On 2015/11/02 at 21:13:33, reveman wrote: > lgtm > > https://codereview.chromium.org/1419733005/diff/140001/ui/gl/gl_image_io_surface.mm > File ui/gl/gl_image_io_surface.mm (right): ...
5 years, 1 month ago (2015-11-02 22:05:04 UTC) #14
Daniele Castagna
Adding owners: +piman for everything :)
5 years, 1 month ago (2015-11-02 22:07:29 UTC) #17
reveman
noticed these when applying this locally https://codereview.chromium.org/1419733005/diff/180001/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_ycbcr_420v_image.txt File gpu/GLES2/extensions/CHROMIUM/CHROMIUM_ycbcr_420v_image.txt (right): https://codereview.chromium.org/1419733005/diff/180001/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_ycbcr_420v_image.txt#newcode21 gpu/GLES2/extensions/CHROMIUM/CHROMIUM_ycbcr_420v_image.txt:21: This extension provides ...
5 years, 1 month ago (2015-11-03 00:32:35 UTC) #18
Daniele Castagna
https://codereview.chromium.org/1419733005/diff/180001/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_ycbcr_420v_image.txt File gpu/GLES2/extensions/CHROMIUM/CHROMIUM_ycbcr_420v_image.txt (right): https://codereview.chromium.org/1419733005/diff/180001/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_ycbcr_420v_image.txt#newcode21 gpu/GLES2/extensions/CHROMIUM/CHROMIUM_ycbcr_420v_image.txt:21: This extension provides a new internal image format to ...
5 years, 1 month ago (2015-11-03 00:48:06 UTC) #19
reveman
https://codereview.chromium.org/1419733005/diff/100002/ui/gl/gl_image_io_surface_unittest.cc File ui/gl/gl_image_io_surface_unittest.cc (right): https://codereview.chromium.org/1419733005/diff/100002/ui/gl/gl_image_io_surface_unittest.cc#newcode15 ui/gl/gl_image_io_surface_unittest.cc:15: class GLImageIOSurface420vTestDelegate { nit: s/GLImageIOSurface420vTestDelegate/GLImageIOSurfaceTestDelegate/
5 years, 1 month ago (2015-11-03 02:44:34 UTC) #20
reveman
https://codereview.chromium.org/1419733005/diff/100002/ui/gl/gl_image_io_surface_unittest.cc File ui/gl/gl_image_io_surface_unittest.cc (right): https://codereview.chromium.org/1419733005/diff/100002/ui/gl/gl_image_io_surface_unittest.cc#newcode21 ui/gl/gl_image_io_surface_unittest.cc:21: new gl::GLImageIOSurface(size, GL_RGB_YCBCR_420V_CHROMIUM)); nit: GL_RGB_YCBCR_420V_CHROMIUM is not correct if ...
5 years, 1 month ago (2015-11-03 02:47:19 UTC) #21
piman
https://codereview.chromium.org/1419733005/diff/100002/ui/gl/gl_image_io_surface.mm File ui/gl/gl_image_io_surface.mm (right): https://codereview.chromium.org/1419733005/diff/100002/ui/gl/gl_image_io_surface.mm#newcode189 ui/gl/gl_image_io_surface.mm:189: glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, sizeof(GLfloat) * 2, 0); What ...
5 years, 1 month ago (2015-11-03 04:12:59 UTC) #22
reveman
https://codereview.chromium.org/1419733005/diff/100002/ui/gl/gl_image_io_surface.mm File ui/gl/gl_image_io_surface.mm (right): https://codereview.chromium.org/1419733005/diff/100002/ui/gl/gl_image_io_surface.mm#newcode299 ui/gl/gl_image_io_surface.mm:299: program_ = gfx::GLHelper::SetupProgram(vertex_shader_, fragment_shader_); On 2015/11/03 at 04:12:59, piman ...
5 years, 1 month ago (2015-11-03 14:59:30 UTC) #23
Daniele Castagna
https://codereview.chromium.org/1419733005/diff/100002/ui/gl/gl_image_io_surface.mm File ui/gl/gl_image_io_surface.mm (right): https://codereview.chromium.org/1419733005/diff/100002/ui/gl/gl_image_io_surface.mm#newcode189 ui/gl/gl_image_io_surface.mm:189: glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, sizeof(GLfloat) * 2, 0); On ...
5 years, 1 month ago (2015-11-04 20:41:33 UTC) #25
piman
https://codereview.chromium.org/1419733005/diff/100002/ui/gl/gl_image_io_surface.mm File ui/gl/gl_image_io_surface.mm (right): https://codereview.chromium.org/1419733005/diff/100002/ui/gl/gl_image_io_surface.mm#newcode299 ui/gl/gl_image_io_surface.mm:299: program_ = gfx::GLHelper::SetupProgram(vertex_shader_, fragment_shader_); On 2015/11/03 14:59:30, reveman wrote: ...
5 years, 1 month ago (2015-11-04 22:49:46 UTC) #26
Daniele Castagna
On 2015/11/04 at 22:49:46, piman wrote: > https://codereview.chromium.org/1419733005/diff/100002/ui/gl/gl_image_io_surface.mm > File ui/gl/gl_image_io_surface.mm (right): > > https://codereview.chromium.org/1419733005/diff/100002/ui/gl/gl_image_io_surface.mm#newcode299 ...
5 years ago (2015-12-03 23:12:08 UTC) #27
piman
https://codereview.chromium.org/1419733005/diff/230001/ui/gl/scoped_binders.cc File ui/gl/scoped_binders.cc (right): https://codereview.chromium.org/1419733005/diff/230001/ui/gl/scoped_binders.cc#newcode161 ui/gl/scoped_binders.cc:161: GL_DITHER, GL_POLYGON_OFFSET_FILL, GL_SAMPLE_ALPHA_TO_COVERAGE, On 2015/12/03 23:12:08, Daniele Castagna wrote: ...
5 years ago (2015-12-04 00:02:16 UTC) #28
piman
On Thu, Dec 3, 2015 at 3:12 PM, <dcastagna@chromium.org> wrote: > On 2015/11/04 at 22:49:46, ...
5 years ago (2015-12-04 00:03:32 UTC) #29
Daniele Castagna
On 2015/12/04 at 00:03:32, piman wrote: > On Thu, Dec 3, 2015 at 3:12 PM, ...
5 years ago (2015-12-04 00:40:18 UTC) #30
piman
https://codereview.chromium.org/1419733005/diff/290001/ui/gl/scoped_binders.cc File ui/gl/scoped_binders.cc (right): https://codereview.chromium.org/1419733005/diff/290001/ui/gl/scoped_binders.cc#newcode163 ui/gl/scoped_binders.cc:163: enabled_ = glIsEnabled(capability_); I assume you also want to: ...
5 years ago (2015-12-04 03:23:31 UTC) #31
Daniele Castagna
https://codereview.chromium.org/1419733005/diff/290001/ui/gl/scoped_binders.cc File ui/gl/scoped_binders.cc (right): https://codereview.chromium.org/1419733005/diff/290001/ui/gl/scoped_binders.cc#newcode163 ui/gl/scoped_binders.cc:163: enabled_ = glIsEnabled(capability_); On 2015/12/04 at 03:23:31, piman (slow ...
5 years ago (2015-12-04 04:41:30 UTC) #32
piman
lgtm
5 years ago (2015-12-04 04:44:23 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1419733005/310001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1419733005/310001
5 years ago (2015-12-04 04:57:11 UTC) #40
commit-bot: I haz the power
Committed patchset #16 (id:310001)
5 years ago (2015-12-04 06:06:22 UTC) #41
commit-bot: I haz the power
5 years ago (2015-12-04 06:07:02 UTC) #43
Message was sent while issue was closed.
Patchset 16 (id:??) landed as
https://crrev.com/f0b514cca449dee0c89b3c3477ee567e9bb110f1
Cr-Commit-Position: refs/heads/master@{#363148}

Powered by Google App Engine
This is Rietveld 408576698