| OLD | NEW |
| 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 |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 private: | 115 private: |
| 116 bool ShouldUseScreenCapturer() override; | 116 bool ShouldUseScreenCapturer() override; |
| 117 DesktopRect GetWindowRectInVirtualScreen() override; | 117 DesktopRect GetWindowRectInVirtualScreen() override; |
| 118 | 118 |
| 119 // The region from GetWindowRgn in the desktop coordinate if the region is | 119 // The region from GetWindowRgn in the desktop coordinate if the region is |
| 120 // rectangular, or the rect from GetWindowRect if the region is not set. | 120 // rectangular, or the rect from GetWindowRect if the region is not set. |
| 121 DesktopRect window_region_rect_; | 121 DesktopRect window_region_rect_; |
| 122 }; | 122 }; |
| 123 | 123 |
| 124 bool CroppingWindowCapturerWin::ShouldUseScreenCapturer() { | 124 bool CroppingWindowCapturerWin::ShouldUseScreenCapturer() { |
| 125 if (!rtc::IsWindows8OrLater()) | 125 if (!rtc::IsWindows8OrLater() && IsAeroEnabled()) |
| 126 return false; | 126 return false; |
| 127 | 127 |
| 128 // Check if the window is a translucent layered window. | 128 // Check if the window is a translucent layered window. |
| 129 HWND selected = reinterpret_cast<HWND>(selected_window()); | 129 HWND selected = reinterpret_cast<HWND>(selected_window()); |
| 130 LONG window_ex_style = GetWindowLong(selected, GWL_EXSTYLE); | 130 LONG window_ex_style = GetWindowLong(selected, GWL_EXSTYLE); |
| 131 if (window_ex_style & WS_EX_LAYERED) { | 131 if (window_ex_style & WS_EX_LAYERED) { |
| 132 COLORREF color_ref_key = 0; | 132 COLORREF color_ref_key = 0; |
| 133 BYTE alpha = 0; | 133 BYTE alpha = 0; |
| 134 DWORD flags = 0; | 134 DWORD flags = 0; |
| 135 | 135 |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 | 207 |
| 208 } // namespace | 208 } // namespace |
| 209 | 209 |
| 210 // static | 210 // static |
| 211 WindowCapturer* | 211 WindowCapturer* |
| 212 CroppingWindowCapturer::Create(const DesktopCaptureOptions& options) { | 212 CroppingWindowCapturer::Create(const DesktopCaptureOptions& options) { |
| 213 return new CroppingWindowCapturerWin(options); | 213 return new CroppingWindowCapturerWin(options); |
| 214 } | 214 } |
| 215 | 215 |
| 216 } // namespace webrtc | 216 } // namespace webrtc |
| OLD | NEW |