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 #include <memory> |
16 | 17 |
17 #include "webrtc/base/platform_thread.h" | 18 #include "webrtc/base/platform_thread.h" |
18 #include "webrtc/base/scoped_ptr.h" | |
19 #include "webrtc/modules/video_render/ios/video_render_ios_channel.h" | 19 #include "webrtc/modules/video_render/ios/video_render_ios_channel.h" |
20 #include "webrtc/modules/video_render/ios/video_render_ios_view.h" | 20 #include "webrtc/modules/video_render/ios/video_render_ios_view.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: |
(...skipping 26 matching lines...) Expand all Loading... |
55 int StopRender(); | 55 int StopRender(); |
56 | 56 |
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 std::unique_ptr<CriticalSectionWrapper> gles_crit_sec_; |
66 EventTimerWrapper* screen_update_event_; | 66 EventTimerWrapper* screen_update_event_; |
67 // TODO(pbos): Remove scoped_ptr and use member directly. | 67 // TODO(pbos): Remove unique_ptr and use member directly. |
68 rtc::scoped_ptr<rtc::PlatformThread> screen_update_thread_; | 68 std::unique_ptr<rtc::PlatformThread> screen_update_thread_; |
69 | 69 |
70 VideoRenderIosView* view_; | 70 VideoRenderIosView* view_; |
71 Rect window_rect_; | 71 Rect window_rect_; |
72 int window_width_; | 72 int window_width_; |
73 int window_height_; | 73 int window_height_; |
74 bool is_full_screen_; | 74 bool is_full_screen_; |
75 GLint backing_width_; | 75 GLint backing_width_; |
76 GLint backing_height_; | 76 GLint backing_height_; |
77 GLuint view_renderbuffer_; | 77 GLuint view_renderbuffer_; |
78 GLuint view_framebuffer_; | 78 GLuint view_framebuffer_; |
79 GLuint depth_renderbuffer_; | 79 GLuint depth_renderbuffer_; |
80 std::map<int, VideoRenderIosChannel*> agl_channels_; | 80 std::map<int, VideoRenderIosChannel*> agl_channels_; |
81 std::multimap<int, int> z_order_to_channel_; | 81 std::multimap<int, int> z_order_to_channel_; |
82 EAGLContext* gles_context_; | 82 EAGLContext* gles_context_; |
83 bool is_rendering_; | 83 bool is_rendering_; |
84 }; | 84 }; |
85 } // namespace webrtc | 85 } // namespace webrtc |
86 | 86 |
87 #endif // WEBRTC_MODULES_VIDEO_RENDER_IOS_VIDEO_RENDER_IOS_GLES20_H_ | 87 #endif // WEBRTC_MODULES_VIDEO_RENDER_IOS_VIDEO_RENDER_IOS_GLES20_H_ |
OLD | NEW |