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

Side by Side Diff: webrtc/modules/desktop_capture/win/dxgi_output_duplicator.cc

Issue 2494893002: Crash in DirectX capturer (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 contexts_[i] = nullptr; 290 contexts_[i] = nullptr;
291 return; 291 return;
292 } 292 }
293 } 293 }
294 294
295 RTC_NOTREACHED(); 295 RTC_NOTREACHED();
296 } 296 }
297 297
298 void DxgiOutputDuplicator::SpreadContextChange(const Context* const source) { 298 void DxgiOutputDuplicator::SpreadContextChange(const Context* const source) {
299 for (Context* dest : contexts_) { 299 for (Context* dest : contexts_) {
300 if (dest != source) { 300 if (dest && dest != source) {
Jamie 2016/11/11 00:00:41 Under what circumstances does it makes sense to al
Hzj_jie 2016/11/11 00:10:51 It's a performance trick, and totally expected. Yo
Jamie 2016/11/11 00:15:21 Thanks for the context. I think my question change
301 dest->updated_region.AddRegion(source->updated_region); 301 dest->updated_region.AddRegion(source->updated_region);
302 } 302 }
303 } 303 }
304 } 304 }
305 305
306 DesktopRect DxgiOutputDuplicator::SourceRect(DesktopRect rect) { 306 DesktopRect DxgiOutputDuplicator::SourceRect(DesktopRect rect) {
307 // |texture_|->AsDesktopFrame() starts from (0, 0). 307 // |texture_|->AsDesktopFrame() starts from (0, 0).
308 rect.Translate(-desktop_rect_.left(), -desktop_rect_.top()); 308 rect.Translate(-desktop_rect_.left(), -desktop_rect_.top());
309 return rect; 309 return rect;
310 } 310 }
311 311
312 DesktopRect DxgiOutputDuplicator::TargetRect(DesktopRect rect, 312 DesktopRect DxgiOutputDuplicator::TargetRect(DesktopRect rect,
313 DesktopVector offset) { 313 DesktopVector offset) {
314 rect = SourceRect(rect); 314 rect = SourceRect(rect);
315 rect.Translate(offset); 315 rect.Translate(offset);
316 return rect; 316 return rect;
317 } 317 }
318 318
319 } // namespace webrtc 319 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698