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

Side by Side Diff: webrtc/sdk/objc/Framework/Classes/Video/RTCDefaultShader.mm

Issue 3011943002: Move optional.h to webrtc/api/ (Closed)
Patch Set: Created 3 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/sdk/BUILD.gn ('k') | webrtc/test/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "RTCDefaultShader.h" 11 #import "RTCDefaultShader.h"
12 12
13 #if TARGET_OS_IPHONE 13 #if TARGET_OS_IPHONE
14 #import <OpenGLES/ES3/gl.h> 14 #import <OpenGLES/ES3/gl.h>
15 #else 15 #else
16 #import <OpenGL/gl3.h> 16 #import <OpenGL/gl3.h>
17 #endif 17 #endif
18 18
19 #import "RTCOpenGLDefines.h" 19 #import "RTCOpenGLDefines.h"
20 #import "RTCShader.h" 20 #import "RTCShader.h"
21 #import "WebRTC/RTCLogging.h" 21 #import "WebRTC/RTCLogging.h"
22 22
23 #include "webrtc/rtc_base/optional.h" 23 #include "webrtc/api/optional.h"
24 24
25 static const int kYTextureUnit = 0; 25 static const int kYTextureUnit = 0;
26 static const int kUTextureUnit = 1; 26 static const int kUTextureUnit = 1;
27 static const int kVTextureUnit = 2; 27 static const int kVTextureUnit = 2;
28 static const int kUvTextureUnit = 1; 28 static const int kUvTextureUnit = 1;
29 29
30 // Fragment shader converts YUV values from input textures into a final RGB 30 // Fragment shader converts YUV values from input textures into a final RGB
31 // pixel. The conversion formula is from http://www.fourcc.org/fccyvrgb.php. 31 // pixel. The conversion formula is from http://www.fourcc.org/fccyvrgb.php.
32 static const char kI420FragmentShaderSource[] = 32 static const char kI420FragmentShaderSource[] =
33 SHADER_VERSION 33 SHADER_VERSION
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 glActiveTexture(static_cast<GLenum>(GL_TEXTURE0 + kYTextureUnit)); 198 glActiveTexture(static_cast<GLenum>(GL_TEXTURE0 + kYTextureUnit));
199 glBindTexture(GL_TEXTURE_2D, yPlane); 199 glBindTexture(GL_TEXTURE_2D, yPlane);
200 200
201 glActiveTexture(static_cast<GLenum>(GL_TEXTURE0 + kUvTextureUnit)); 201 glActiveTexture(static_cast<GLenum>(GL_TEXTURE0 + kUvTextureUnit));
202 glBindTexture(GL_TEXTURE_2D, uvPlane); 202 glBindTexture(GL_TEXTURE_2D, uvPlane);
203 203
204 glDrawArrays(GL_TRIANGLE_FAN, 0, 4); 204 glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
205 } 205 }
206 206
207 @end 207 @end
OLDNEW
« no previous file with comments | « webrtc/sdk/BUILD.gn ('k') | webrtc/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698