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

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

Issue 2345163002: Several minor improvements of DirectX capturer (Closed)
Patch Set: Resolve review comments 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/d3d_device.cc
diff --git a/webrtc/modules/desktop_capture/win/d3d_device.cc b/webrtc/modules/desktop_capture/win/d3d_device.cc
index 15233e6f5ec927f90e718cb3aa6496fe89ae495c..f7c419f891dd95a5716eb16425bb9483b3ba7976 100644
--- a/webrtc/modules/desktop_capture/win/d3d_device.cc
+++ b/webrtc/modules/desktop_capture/win/d3d_device.cc
@@ -47,7 +47,7 @@ bool D3dDevice::Initialize(const ComPtr<IDXGIAdapter>& adapter) {
return false;
}
- error = _com_error(d3d_device_.As(&dxgi_device_));
+ error = d3d_device_.As(&dxgi_device_);
if (error.Error() != S_OK || !dxgi_device_) {
LOG(LS_WARNING) << "ID3D11Device is not an implementation of IDXGIDevice, "
"this usually means the system does not support DirectX "
@@ -61,9 +61,8 @@ bool D3dDevice::Initialize(const ComPtr<IDXGIAdapter>& adapter) {
// static
std::vector<D3dDevice> D3dDevice::EnumDevices() {
ComPtr<IDXGIFactory1> factory;
- _com_error error = _com_error(
- CreateDXGIFactory1(__uuidof(IDXGIFactory1),
- reinterpret_cast<void**>(factory.GetAddressOf())));
+ _com_error error = CreateDXGIFactory1(__uuidof(IDXGIFactory1),
+ reinterpret_cast<void**>(factory.GetAddressOf()));
if (error.Error() != S_OK || !factory) {
return std::vector<D3dDevice>();
}
@@ -71,7 +70,7 @@ std::vector<D3dDevice> D3dDevice::EnumDevices() {
std::vector<D3dDevice> result;
for (int i = 0;; i++) {
ComPtr<IDXGIAdapter> adapter;
- error = _com_error(factory->EnumAdapters(i, adapter.GetAddressOf()));
+ error = factory->EnumAdapters(i, adapter.GetAddressOf());
if (error.Error() == S_OK) {
D3dDevice device;
if (!device.Initialize(adapter)) {
« no previous file with comments | « webrtc/modules/desktop_capture/win/d3d_device.h ('k') | webrtc/modules/desktop_capture/win/dxgi_adapter_duplicator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698