OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 Rectangle(hdc_, rect.left(), rect.top(), rect.right(), rect.bottom()); | 143 Rectangle(hdc_, rect.left(), rect.top(), rect.right(), rect.bottom()); |
144 } | 144 } |
145 | 145 |
146 void ScreenDrawerWin::Clear() { | 146 void ScreenDrawerWin::Clear() { |
147 DrawRectangle(rect_, RgbaColor(0, 0, 0)); | 147 DrawRectangle(rect_, RgbaColor(0, 0, 0)); |
148 } | 148 } |
149 | 149 |
150 // TODO(zijiehe): Find the right signal to indicate the finish of all pending | 150 // TODO(zijiehe): Find the right signal to indicate the finish of all pending |
151 // paintings. | 151 // paintings. |
152 void ScreenDrawerWin::WaitForPendingDraws() { | 152 void ScreenDrawerWin::WaitForPendingDraws() { |
| 153 BringToFront(); |
153 SleepMs(50); | 154 SleepMs(50); |
154 } | 155 } |
155 | 156 |
156 bool ScreenDrawerWin::MayDrawIncompleteShapes() { | 157 bool ScreenDrawerWin::MayDrawIncompleteShapes() { |
157 return true; | 158 return true; |
158 } | 159 } |
159 | 160 |
160 void ScreenDrawerWin::DrawLine(DesktopVector start, | 161 void ScreenDrawerWin::DrawLine(DesktopVector start, |
161 DesktopVector end, | 162 DesktopVector end, |
162 RgbaColor color) { | 163 RgbaColor color) { |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 std::unique_ptr<ScreenDrawerLock> ScreenDrawerLock::Create() { | 195 std::unique_ptr<ScreenDrawerLock> ScreenDrawerLock::Create() { |
195 return std::unique_ptr<ScreenDrawerLock>(new ScreenDrawerLockWin()); | 196 return std::unique_ptr<ScreenDrawerLock>(new ScreenDrawerLockWin()); |
196 } | 197 } |
197 | 198 |
198 // static | 199 // static |
199 std::unique_ptr<ScreenDrawer> ScreenDrawer::Create() { | 200 std::unique_ptr<ScreenDrawer> ScreenDrawer::Create() { |
200 return std::unique_ptr<ScreenDrawer>(new ScreenDrawerWin()); | 201 return std::unique_ptr<ScreenDrawer>(new ScreenDrawerWin()); |
201 } | 202 } |
202 | 203 |
203 } // namespace webrtc | 204 } // namespace webrtc |
OLD | NEW |