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

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

Issue 2345163002: Several minor improvements of DirectX capturer (Closed)
Patch Set: 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_texture_staging.cc
diff --git a/webrtc/modules/desktop_capture/win/dxgi_texture_staging.cc b/webrtc/modules/desktop_capture/win/dxgi_texture_staging.cc
index 7478728143d0d8f93c274709e5d9207fc67073d4..9e82542ddf36821e80d3ded01d4553e9bb8cbdec 100644
--- a/webrtc/modules/desktop_capture/win/dxgi_texture_staging.cc
+++ b/webrtc/modules/desktop_capture/win/dxgi_texture_staging.cc
@@ -38,9 +38,13 @@ bool DxgiTextureStaging::InitializeStage(ID3D11Texture2D* texture) {
return false;
}
+ desc.ArraySize = 1;
desc.BindFlags = 0;
desc.CPUAccessFlags = D3D11_CPU_ACCESS_READ;
+ desc.MipLevels = 1;
desc.MiscFlags = 0;
+ desc.SampleDesc.Count = 1;
+ desc.SampleDesc.Quality = 0;
desc.Usage = D3D11_USAGE_STAGING;
if (stage_) {
AssertStageAndSurfaceAreSameObject();
@@ -58,7 +62,7 @@ bool DxgiTextureStaging::InitializeStage(ID3D11Texture2D* texture) {
RTC_DCHECK(!surface_);
}
- _com_error error = _com_error(device_.d3d_device()->CreateTexture2D(
+ _com_error error(device_.d3d_device()->CreateTexture2D(
&desc, nullptr, stage_.GetAddressOf()));
if (error.Error() != S_OK || !stage_) {
LOG(LS_ERROR) << "Failed to create a new ID3D11Texture2D as stage, error "

Powered by Google App Engine
This is Rietveld 408576698