| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 #if !defined(__has_feature) || !__has_feature(objc_arc) | 11 #if !defined(__has_feature) || !__has_feature(objc_arc) |
| 12 #error "This file requires ARC support." | 12 #error "This file requires ARC support." |
| 13 #endif | 13 #endif |
| 14 | 14 |
| 15 // This files is mostly copied from | 15 // This files is mostly copied from |
| 16 // webrtc/modules/video_render/android/video_render_opengles20.h | 16 // webrtc/modules/video_render/android/video_render_opengles20.h |
| 17 | 17 |
| 18 // TODO(sjlee): unify this copy with the android one. | 18 // TODO(sjlee): unify this copy with the android one. |
| 19 #include "webrtc/modules/video_render/ios/open_gles20.h" | 19 #include "webrtc/modules/video_render/ios/open_gles20.h" |
| 20 #include "webrtc/system_wrappers/interface/trace.h" | 20 #include "webrtc/system_wrappers/include/trace.h" |
| 21 | 21 |
| 22 using namespace webrtc; | 22 using namespace webrtc; |
| 23 | 23 |
| 24 const char OpenGles20::indices_[] = {0, 3, 2, 0, 2, 1}; | 24 const char OpenGles20::indices_[] = {0, 3, 2, 0, 2, 1}; |
| 25 | 25 |
| 26 const char OpenGles20::vertext_shader_[] = { | 26 const char OpenGles20::vertext_shader_[] = { |
| 27 "attribute vec4 aPosition;\n" | 27 "attribute vec4 aPosition;\n" |
| 28 "attribute vec2 aTextureCoord;\n" | 28 "attribute vec2 aTextureCoord;\n" |
| 29 "varying vec2 vTextureCoord;\n" | 29 "varying vec2 vTextureCoord;\n" |
| 30 "void main() {\n" | 30 "void main() {\n" |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 glActiveTexture(GL_TEXTURE1); | 321 glActiveTexture(GL_TEXTURE1); |
| 322 glBindTexture(GL_TEXTURE_2D, texture_ids_[1]); | 322 glBindTexture(GL_TEXTURE_2D, texture_ids_[1]); |
| 323 GlTexSubImage2D( | 323 GlTexSubImage2D( |
| 324 width / 2, height / 2, frame.stride(kUPlane), frame.buffer(kUPlane)); | 324 width / 2, height / 2, frame.stride(kUPlane), frame.buffer(kUPlane)); |
| 325 | 325 |
| 326 glActiveTexture(GL_TEXTURE2); | 326 glActiveTexture(GL_TEXTURE2); |
| 327 glBindTexture(GL_TEXTURE_2D, texture_ids_[2]); | 327 glBindTexture(GL_TEXTURE_2D, texture_ids_[2]); |
| 328 GlTexSubImage2D( | 328 GlTexSubImage2D( |
| 329 width / 2, height / 2, frame.stride(kVPlane), frame.buffer(kVPlane)); | 329 width / 2, height / 2, frame.stride(kVPlane), frame.buffer(kVPlane)); |
| 330 } | 330 } |
| OLD | NEW |