| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2017 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2017 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| 11 #import "RTCI420TextureCache.h" | 11 #import "RTCI420TextureCache.h" |
| 12 | 12 |
| 13 #import "RTCShader+Private.h" | 13 #if TARGET_OS_IPHONE |
| 14 #import <OpenGLES/ES3/gl.h> |
| 15 #else |
| 16 #import <OpenGL/gl3.h> |
| 17 #endif |
| 14 | 18 |
| 15 #include <vector> | 19 #include <vector> |
| 16 | 20 |
| 17 // Two sets of 3 textures are used here, one for each of the Y, U and V planes.
Having two sets | 21 // Two sets of 3 textures are used here, one for each of the Y, U and V planes.
Having two sets |
| 18 // alleviates CPU blockage in the event that the GPU is asked to render to a tex
ture that is already | 22 // alleviates CPU blockage in the event that the GPU is asked to render to a tex
ture that is already |
| 19 // in use. | 23 // in use. |
| 20 static const GLsizei kNumTextureSets = 2; | 24 static const GLsizei kNumTextureSets = 2; |
| 21 static const GLsizei kNumTexturesPerSet = 3; | 25 static const GLsizei kNumTexturesPerSet = 3; |
| 22 static const GLsizei kNumTextures = kNumTexturesPerSet * kNumTextureSets; | 26 static const GLsizei kNumTextures = kNumTexturesPerSet * kNumTextureSets; |
| 23 | 27 |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 stride:frame.strideU]; | 144 stride:frame.strideU]; |
| 141 | 145 |
| 142 [self uploadPlane:frame.dataV | 146 [self uploadPlane:frame.dataV |
| 143 texture:self.vTexture | 147 texture:self.vTexture |
| 144 width:chromaWidth | 148 width:chromaWidth |
| 145 height:chromaHeight | 149 height:chromaHeight |
| 146 stride:frame.strideV]; | 150 stride:frame.strideV]; |
| 147 } | 151 } |
| 148 | 152 |
| 149 @end | 153 @end |
| OLD | NEW |