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

Side by Side Diff: webrtc/modules/desktop_capture/win/screen_capturer_win_magnifier.h

Issue 1347793005: Replace Atomic32 with webrtc/base/atomicops.h. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: fix typo Created 5 years, 2 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 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_DESKTOP_CAPTURE_WIN_SCREEN_CAPTURER_WIN_MAGNIFIER_H_ 11 #ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_SCREEN_CAPTURER_WIN_MAGNIFIER_H_
12 #define WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_SCREEN_CAPTURER_WIN_MAGNIFIER_H_ 12 #define WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_SCREEN_CAPTURER_WIN_MAGNIFIER_H_
13 13
14 #include <windows.h> 14 #include <windows.h>
15 #include <magnification.h> 15 #include <magnification.h>
16 #include <wincodec.h> 16 #include <wincodec.h>
17 17
18 #include "webrtc/base/constructormagic.h" 18 #include "webrtc/base/constructormagic.h"
19 #include "webrtc/base/scoped_ptr.h" 19 #include "webrtc/base/scoped_ptr.h"
20 #include "webrtc/modules/desktop_capture/screen_capture_frame_queue.h" 20 #include "webrtc/modules/desktop_capture/screen_capture_frame_queue.h"
21 #include "webrtc/modules/desktop_capture/screen_capturer.h" 21 #include "webrtc/modules/desktop_capture/screen_capturer.h"
22 #include "webrtc/modules/desktop_capture/screen_capturer_helper.h" 22 #include "webrtc/modules/desktop_capture/screen_capturer_helper.h"
23 #include "webrtc/modules/desktop_capture/win/scoped_thread_desktop.h" 23 #include "webrtc/modules/desktop_capture/win/scoped_thread_desktop.h"
24 #include "webrtc/system_wrappers/interface/atomic32.h"
25 24
26 namespace webrtc { 25 namespace webrtc {
27 26
28 class DesktopFrame; 27 class DesktopFrame;
29 class DesktopRect; 28 class DesktopRect;
30 class Differ; 29 class Differ;
31 30
32 // Captures the screen using the Magnification API to support window exclusion. 31 // Captures the screen using the Magnification API to support window exclusion.
33 // Each capturer must run on a dedicated thread because it uses thread local 32 // Each capturer must run on a dedicated thread because it uses thread local
34 // storage for redirecting the library callback. Also the thread must have a UI 33 // storage for redirecting the library callback. Also the thread must have a UI
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 91
93 // Called by OnMagImageScalingCallback to output captured data. 92 // Called by OnMagImageScalingCallback to output captured data.
94 void OnCaptured(void* data, const MAGIMAGEHEADER& header); 93 void OnCaptured(void* data, const MAGIMAGEHEADER& header);
95 94
96 // Makes sure the current frame exists and matches |size|. 95 // Makes sure the current frame exists and matches |size|.
97 void CreateCurrentFrameIfNecessary(const DesktopSize& size); 96 void CreateCurrentFrameIfNecessary(const DesktopSize& size);
98 97
99 // Start the fallback capturer and select the screen. 98 // Start the fallback capturer and select the screen.
100 void StartFallbackCapturer(); 99 void StartFallbackCapturer();
101 100
102 static Atomic32 tls_index_; 101 static volatile int tls_index_;
103 102
104 rtc::scoped_ptr<ScreenCapturer> fallback_capturer_; 103 rtc::scoped_ptr<ScreenCapturer> fallback_capturer_;
105 bool fallback_capturer_started_; 104 bool fallback_capturer_started_;
106 Callback* callback_; 105 Callback* callback_;
107 ScreenId current_screen_id_; 106 ScreenId current_screen_id_;
108 std::wstring current_device_key_; 107 std::wstring current_device_key_;
109 HWND excluded_window_; 108 HWND excluded_window_;
110 109
111 // A thread-safe list of invalid rectangles, and the size of the most 110 // A thread-safe list of invalid rectangles, and the size of the most
112 // recently captured screen. 111 // recently captured screen.
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 // True if the last OnMagImageScalingCallback was called and handled 143 // True if the last OnMagImageScalingCallback was called and handled
145 // successfully. Reset at the beginning of each CaptureImage call. 144 // successfully. Reset at the beginning of each CaptureImage call.
146 bool magnifier_capture_succeeded_; 145 bool magnifier_capture_succeeded_;
147 146
148 RTC_DISALLOW_COPY_AND_ASSIGN(ScreenCapturerWinMagnifier); 147 RTC_DISALLOW_COPY_AND_ASSIGN(ScreenCapturerWinMagnifier);
149 }; 148 };
150 149
151 } // namespace webrtc 150 } // namespace webrtc
152 151
153 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_SCREEN_CAPTURER_WIN_MAGNIFIER_H_ 152 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_SCREEN_CAPTURER_WIN_MAGNIFIER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698