OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 #ifndef WEBRTC_MODULES_VIDEO_RENDER_IOS_VIDEO_RENDER_IOS_GLES20_H_ | 11 #ifndef WEBRTC_MODULES_VIDEO_RENDER_IOS_VIDEO_RENDER_IOS_GLES20_H_ |
12 #define WEBRTC_MODULES_VIDEO_RENDER_IOS_VIDEO_RENDER_IOS_GLES20_H_ | 12 #define WEBRTC_MODULES_VIDEO_RENDER_IOS_VIDEO_RENDER_IOS_GLES20_H_ |
13 | 13 |
14 #include <list> | 14 #include <list> |
15 #include <map> | 15 #include <map> |
16 | 16 |
| 17 #include "webrtc/base/platform_thread.h" |
17 #include "webrtc/base/scoped_ptr.h" | 18 #include "webrtc/base/scoped_ptr.h" |
18 #include "webrtc/modules/video_render/ios/video_render_ios_channel.h" | 19 #include "webrtc/modules/video_render/ios/video_render_ios_channel.h" |
19 #include "webrtc/modules/video_render/ios/video_render_ios_view.h" | 20 #include "webrtc/modules/video_render/ios/video_render_ios_view.h" |
20 #include "webrtc/system_wrappers/include/thread_wrapper.h" | |
21 | 21 |
22 namespace webrtc { | 22 namespace webrtc { |
23 | 23 |
24 class CriticalSectionWrapper; | 24 class CriticalSectionWrapper; |
25 class EventTimerWrapper; | 25 class EventTimerWrapper; |
26 | 26 |
27 class VideoRenderIosGles20 { | 27 class VideoRenderIosGles20 { |
28 public: | 28 public: |
29 VideoRenderIosGles20(VideoRenderIosView* view, | 29 VideoRenderIosGles20(VideoRenderIosView* view, |
30 bool full_screen, | 30 bool full_screen, |
(...skipping 26 matching lines...) Expand all Loading... |
57 protected: | 57 protected: |
58 static bool ScreenUpdateThreadProc(void* obj); | 58 static bool ScreenUpdateThreadProc(void* obj); |
59 | 59 |
60 private: | 60 private: |
61 bool RenderOffScreenBuffers(); | 61 bool RenderOffScreenBuffers(); |
62 int SwapAndDisplayBuffers(); | 62 int SwapAndDisplayBuffers(); |
63 | 63 |
64 private: | 64 private: |
65 rtc::scoped_ptr<CriticalSectionWrapper> gles_crit_sec_; | 65 rtc::scoped_ptr<CriticalSectionWrapper> gles_crit_sec_; |
66 EventTimerWrapper* screen_update_event_; | 66 EventTimerWrapper* screen_update_event_; |
67 rtc::scoped_ptr<ThreadWrapper> screen_update_thread_; | 67 rtc::scoped_ptr<PlatformThread> screen_update_thread_; |
68 | 68 |
69 VideoRenderIosView* view_; | 69 VideoRenderIosView* view_; |
70 Rect window_rect_; | 70 Rect window_rect_; |
71 int window_width_; | 71 int window_width_; |
72 int window_height_; | 72 int window_height_; |
73 bool is_full_screen_; | 73 bool is_full_screen_; |
74 GLint backing_width_; | 74 GLint backing_width_; |
75 GLint backing_height_; | 75 GLint backing_height_; |
76 GLuint view_renderbuffer_; | 76 GLuint view_renderbuffer_; |
77 GLuint view_framebuffer_; | 77 GLuint view_framebuffer_; |
78 GLuint depth_renderbuffer_; | 78 GLuint depth_renderbuffer_; |
79 std::map<int, VideoRenderIosChannel*> agl_channels_; | 79 std::map<int, VideoRenderIosChannel*> agl_channels_; |
80 std::multimap<int, int> z_order_to_channel_; | 80 std::multimap<int, int> z_order_to_channel_; |
81 EAGLContext* gles_context_; | 81 EAGLContext* gles_context_; |
82 bool is_rendering_; | 82 bool is_rendering_; |
83 }; | 83 }; |
84 } // namespace webrtc | 84 } // namespace webrtc |
85 | 85 |
86 #endif // WEBRTC_MODULES_VIDEO_RENDER_IOS_VIDEO_RENDER_IOS_GLES20_H_ | 86 #endif // WEBRTC_MODULES_VIDEO_RENDER_IOS_VIDEO_RENDER_IOS_GLES20_H_ |
OLD | NEW |