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:
Magnus Jedvert
2017-06-05 17:58:34 +02:00
committed by Commit Bot
parent f53c4cd867
commit 6b9653e63b
4 changed files with 39 additions and 25 deletions

View File

@ -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;
}