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

Unified Diff: webrtc/modules/desktop_capture/win/dxgi_output_duplicator.cc

Issue 2345163002: Several minor improvements of DirectX capturer (Closed)
Patch Set: Remove DPI awareness changes Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/desktop_capture/win/dxgi_output_duplicator.cc
diff --git a/webrtc/modules/desktop_capture/win/dxgi_output_duplicator.cc b/webrtc/modules/desktop_capture/win/dxgi_output_duplicator.cc
index d7eb335fc3cf1e193da07b977424a38920b2fe6f..7dcbbb2db6c7af1038dd3517acc6406146859f8f 100644
--- a/webrtc/modules/desktop_capture/win/dxgi_output_duplicator.cc
+++ b/webrtc/modules/desktop_capture/win/dxgi_output_duplicator.cc
@@ -147,7 +147,9 @@ bool DxgiOutputDuplicator::Duplicate(Context* context,
// after it has been merged to updated_region.
DesktopRegion updated_region;
updated_region.Swap(&context->updated_region);
- if (error.Error() == S_OK && frame_info.AccumulatedFrames > 0) {
+ if (error.Error() == S_OK &&
+ frame_info.AccumulatedFrames > 0 &&
+ resource) {
Jamie 2016/09/17 00:49:30 Please add something to the CL description for thi
Hzj_jie 2016/09/19 19:09:57 Done.
DetectUpdatedRegion(frame_info, offset, &context->updated_region);
if (!texture_->CopyFrom(frame_info, resource.Get(),
context->updated_region)) {

Powered by Google App Engine
This is Rietveld 408576698