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

Side by Side Diff: webrtc/modules/video_render/mac/video_render_nsopengl.h

Issue 1476453002: Clean up PlatformThread. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: IsRunning DCHECK Created 5 years 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
OLDNEW
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
(...skipping 12 matching lines...) Expand all
23 #include <map> 23 #include <map>
24 24
25 #include "webrtc/base/thread_annotations.h" 25 #include "webrtc/base/thread_annotations.h"
26 #include "webrtc/modules/video_render/video_render_defines.h" 26 #include "webrtc/modules/video_render/video_render_defines.h"
27 27
28 #import "webrtc/modules/video_render/mac/cocoa_full_screen_window.h" 28 #import "webrtc/modules/video_render/mac/cocoa_full_screen_window.h"
29 #import "webrtc/modules/video_render/mac/cocoa_render_view.h" 29 #import "webrtc/modules/video_render/mac/cocoa_render_view.h"
30 30
31 class Trace; 31 class Trace;
32 32
33 namespace rtc {
34 class PlatformThread;
35 } // namespace rtc
36
33 namespace webrtc { 37 namespace webrtc {
34 class EventTimerWrapper; 38 class EventTimerWrapper;
35 class PlatformThread;
36 class VideoRenderNSOpenGL; 39 class VideoRenderNSOpenGL;
37 class CriticalSectionWrapper; 40 class CriticalSectionWrapper;
38 41
39 class VideoChannelNSOpenGL : public VideoRenderCallback { 42 class VideoChannelNSOpenGL : public VideoRenderCallback {
40 public: 43 public:
41 VideoChannelNSOpenGL(NSOpenGLContext *nsglContext, int iId, VideoRenderNSOpe nGL* owner); 44 VideoChannelNSOpenGL(NSOpenGLContext *nsglContext, int iId, VideoRenderNSOpe nGL* owner);
42 virtual ~VideoChannelNSOpenGL(); 45 virtual ~VideoChannelNSOpenGL();
43 46
44 // A new frame is delivered 47 // A new frame is delivered
45 virtual int DeliverFrame(const VideoFrame& videoFrame); 48 virtual int DeliverFrame(const VideoFrame& videoFrame);
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 int RenderOffScreenBuffers(); 162 int RenderOffScreenBuffers();
160 int DisplayBuffers(); 163 int DisplayBuffers();
161 164
162 private: // variables 165 private: // variables
163 166
164 167
165 CocoaRenderView* _windowRef; 168 CocoaRenderView* _windowRef;
166 bool _fullScreen; 169 bool _fullScreen;
167 int _id; 170 int _id;
168 CriticalSectionWrapper& _nsglContextCritSec; 171 CriticalSectionWrapper& _nsglContextCritSec;
169 rtc::scoped_ptr<PlatformThread> _screenUpdateThread; 172 // TODO(pbos): Remove scoped_ptr and use PlatformThread directly.
173 rtc::scoped_ptr<rtc::PlatformThread> _screenUpdateThread;
170 EventTimerWrapper* _screenUpdateEvent; 174 EventTimerWrapper* _screenUpdateEvent;
171 NSOpenGLContext* _nsglContext; 175 NSOpenGLContext* _nsglContext;
172 NSOpenGLContext* _nsglFullScreenContext; 176 NSOpenGLContext* _nsglFullScreenContext;
173 CocoaFullScreenWindow* _fullScreenWindow; 177 CocoaFullScreenWindow* _fullScreenWindow;
174 Rect _windowRect; // The size of the window 178 Rect _windowRect; // The size of the window
175 int _windowWidth; 179 int _windowWidth;
176 int _windowHeight; 180 int _windowHeight;
177 std::map<int, VideoChannelNSOpenGL*> _nsglChannels; 181 std::map<int, VideoChannelNSOpenGL*> _nsglChannels;
178 std::multimap<int, int> _zOrderToChannel; 182 std::multimap<int, int> _zOrderToChannel;
179 bool _renderingIsPaused; 183 bool _renderingIsPaused;
180 NSView* _windowRefSuperView; 184 NSView* _windowRefSuperView;
181 NSRect _windowRefSuperViewFrame; 185 NSRect _windowRefSuperViewFrame;
182 }; 186 };
183 187
184 } // namespace webrtc 188 } // namespace webrtc
185 189
186 #endif // WEBRTC_MODULES_VIDEO_RENDER_MAIN_SOURCE_MAC_VIDEO_RENDER_NSOPENGL_H_ 190 #endif // WEBRTC_MODULES_VIDEO_RENDER_MAIN_SOURCE_MAC_VIDEO_RENDER_NSOPENGL_H_
187 #endif // COCOA_RENDERING 191 #endif // COCOA_RENDERING
OLDNEW
« no previous file with comments | « webrtc/modules/video_render/mac/video_render_agl.cc ('k') | webrtc/modules/video_render/mac/video_render_nsopengl.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698