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

Issue 2202823004: iOS: Add support for rendering native CVPixelBuffers directly (Closed)

Created:
4 years, 4 months ago by tkchin_webrtc
Modified:
4 years, 4 months ago
CC:
webrtc-reviews_webrtc.org, tterriberry_mozilla.com
Base URL:
https://chromium.googlesource.com/external/webrtc.git@master
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

iOS: Add support for rendering native CVPixelBuffers directly This CL adds support in RTCEAGLVideoView for rendering CVPixelBuffers as OpenGL ES textures directly, compared to the current code that first converts the CVPixelBuffers to I420, and then reuploads them as textures. This is only supported on iOS with the use of a CVOpenGLESTextureCache. The I420 rendering and native rendering are separated in two different implementations of a simple shader interface: @protocol Shader - (BOOL)drawFrame:(RTCVideoFrame*)frame; @end GL resources are allocated when the shader is instantiated and released when the shader is destroyed. RTCEAGLVideoView will lazily instantiate the necessary shader when it receives the first frame of that kind. This is primarily done to avoid allocating GL resources for both I420 and native rendering. Some other changes are: - Print GL shader compilation errors. - Remove updateTextureSizesForFrame() function. The textures will resize automatically anyway when the texture data is uploaded with glTexImage2D(). patch from issue 2154243002 at patchset 140001 (http://crrev.com/2154243002#ps140001) Continuing magjed@'s work since he is OOO this week. BUG= Committed: https://crrev.com/04dbb34d51aa0dfc458f29c220bf770504cd52d3 Cr-Commit-Position: refs/heads/master@{#13668}

Patch Set 1 #

Total comments: 10

Patch Set 2 : CR comments. #

Patch Set 3 : Move guard. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+674 lines, -409 lines) Patch
M webrtc/sdk/BUILD.gn View 4 chunks +6 lines, -0 lines 0 comments Download
M webrtc/sdk/objc/Framework/Classes/RTCEAGLVideoView.m View 1 chunk +3 lines, -1 line 0 comments Download
A webrtc/sdk/objc/Framework/Classes/RTCI420Shader.mm View 1 1 chunk +211 lines, -0 lines 0 comments Download
A webrtc/sdk/objc/Framework/Classes/RTCNativeNV12Shader.mm View 1 2 1 chunk +161 lines, -0 lines 0 comments Download
A webrtc/sdk/objc/Framework/Classes/RTCOpenGLDefines.h View 1 chunk +35 lines, -0 lines 0 comments Download
M webrtc/sdk/objc/Framework/Classes/RTCOpenGLVideoRenderer.mm View 6 chunks +27 lines, -405 lines 0 comments Download
A webrtc/sdk/objc/Framework/Classes/RTCShader.h View 1 chunk +43 lines, -0 lines 0 comments Download
A webrtc/sdk/objc/Framework/Classes/RTCShader.mm View 1 chunk +152 lines, -0 lines 0 comments Download
A webrtc/sdk/objc/Framework/Classes/RTCShader+Private.h View 1 chunk +27 lines, -0 lines 0 comments Download
M webrtc/sdk/sdk.gyp View 5 chunks +9 lines, -3 lines 0 comments Download

Messages

Total messages: 18 (6 generated)
tkchin_webrtc
All I did was move stuff around and rename a few things to address comments ...
4 years, 4 months ago (2016-08-02 22:18:32 UTC) #3
mflodman
Sami, I'll review this today as well, but can you take an extra look at ...
4 years, 4 months ago (2016-08-03 07:07:26 UTC) #5
sakal
I don't really know ObjC but here are my comments. https://codereview.webrtc.org/2202823004/diff/1/webrtc/sdk/objc/Framework/Classes/RTCI420Shader.mm File webrtc/sdk/objc/Framework/Classes/RTCI420Shader.mm (right): https://codereview.webrtc.org/2202823004/diff/1/webrtc/sdk/objc/Framework/Classes/RTCI420Shader.mm#newcode23 ...
4 years, 4 months ago (2016-08-03 10:53:00 UTC) #6
tkchin_webrtc
Would prefer to preserve as much as old behavior as possible at this point to ...
4 years, 4 months ago (2016-08-03 17:53:19 UTC) #7
tkchin_webrtc
On 2016/08/03 17:53:19, tkchin_webrtc wrote: > Would prefer to preserve as much as old behavior ...
4 years, 4 months ago (2016-08-04 00:11:06 UTC) #8
sakal
lgtm
4 years, 4 months ago (2016-08-04 07:01:26 UTC) #9
mflodman
LGTM Note though it has been a long time since I wrote/reviewed OpenGL and Objective-C ...
4 years, 4 months ago (2016-08-04 09:40:02 UTC) #10
tkchin_webrtc
On 2016/08/04 09:40:02, mflodman wrote: > LGTM > > Note though it has been a ...
4 years, 4 months ago (2016-08-04 17:33:53 UTC) #11
magjed_webrtc
Thanks for splitting out the shaders in their own files and addressing your own comments ...
4 years, 4 months ago (2016-08-08 09:29:22 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/2202823004/40001
4 years, 4 months ago (2016-08-08 09:29:36 UTC) #14
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 4 months ago (2016-08-08 10:10:11 UTC) #16
commit-bot: I haz the power
4 years, 4 months ago (2016-08-08 10:10:18 UTC) #18
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/04dbb34d51aa0dfc458f29c220bf770504cd52d3
Cr-Commit-Position: refs/heads/master@{#13668}

Powered by Google App Engine
This is Rietveld 408576698