ObjC: Pass in frame resolution to GL shaders
Frame resolution might be interesting for a shader implementation. Bug: webrtc:7473 Change-Id: If19278b3babe2e5bab1a1f7562fa8b06ab840517 Reviewed-on: https://chromium-review.googlesource.com/524452 Reviewed-by: Daniela Jovanoska Petrenko <denicija@webrtc.org> Commit-Queue: Magnus Jedvert <magjed@webrtc.org> Cr-Commit-Position: refs/heads/master@{#18466}
This commit is contained in:
committed by
Commit Bot
parent
f53c4cd867
commit
6b9653e63b
@ -226,9 +226,11 @@
|
||||
}
|
||||
if (_nv12TextureCache) {
|
||||
[_nv12TextureCache uploadFrameToTextures:frame];
|
||||
[_shader applyShadingForFrameWithRotation:frame.rotation
|
||||
yPlane:_nv12TextureCache.yTexture
|
||||
uvPlane:_nv12TextureCache.uvTexture];
|
||||
[_shader applyShadingForFrameWithWidth:frame.width
|
||||
height:frame.height
|
||||
rotation:frame.rotation
|
||||
yPlane:_nv12TextureCache.yTexture
|
||||
uvPlane:_nv12TextureCache.uvTexture];
|
||||
[_nv12TextureCache releaseTextures];
|
||||
}
|
||||
} else {
|
||||
@ -236,10 +238,12 @@
|
||||
_i420TextureCache = [[RTCI420TextureCache alloc] initWithContext:_glContext];
|
||||
}
|
||||
[_i420TextureCache uploadFrameToTextures:frame];
|
||||
[_shader applyShadingForFrameWithRotation:frame.rotation
|
||||
yPlane:_i420TextureCache.yTexture
|
||||
uPlane:_i420TextureCache.uTexture
|
||||
vPlane:_i420TextureCache.vTexture];
|
||||
[_shader applyShadingForFrameWithWidth:frame.width
|
||||
height:frame.height
|
||||
rotation:frame.rotation
|
||||
yPlane:_i420TextureCache.yTexture
|
||||
uPlane:_i420TextureCache.uTexture
|
||||
vPlane:_i420TextureCache.vTexture];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -141,10 +141,12 @@ static CVReturn OnDisplayLinkFired(CVDisplayLinkRef displayLink,
|
||||
RTCI420TextureCache *i420TextureCache = self.i420TextureCache;
|
||||
if (i420TextureCache) {
|
||||
[i420TextureCache uploadFrameToTextures:frame];
|
||||
[_shader applyShadingForFrameWithRotation:frame.rotation
|
||||
yPlane:i420TextureCache.yTexture
|
||||
uPlane:i420TextureCache.uTexture
|
||||
vPlane:i420TextureCache.vTexture];
|
||||
[_shader applyShadingForFrameWithWidth:frame.width
|
||||
height:frame.height
|
||||
rotation:frame.rotation
|
||||
yPlane:i420TextureCache.yTexture
|
||||
uPlane:i420TextureCache.uTexture
|
||||
vPlane:i420TextureCache.vTexture];
|
||||
[context flushBuffer];
|
||||
_lastDrawnFrame = frame;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user