| Index: webrtc/modules/desktop_capture/win/dxgi_texture_mapping.cc
|
| diff --git a/webrtc/modules/desktop_capture/win/dxgi_texture_mapping.cc b/webrtc/modules/desktop_capture/win/dxgi_texture_mapping.cc
|
| index dbe494850671db1394e1ac66c090acc62e7feecf..f60edc775e562411171edb5b76890ddc91d2ef2d 100644
|
| --- a/webrtc/modules/desktop_capture/win/dxgi_texture_mapping.cc
|
| +++ b/webrtc/modules/desktop_capture/win/dxgi_texture_mapping.cc
|
| @@ -19,21 +19,21 @@
|
|
|
| namespace webrtc {
|
|
|
| -DxgiTextureMapping::DxgiTextureMapping(const DesktopSize& desktop_size,
|
| - IDXGIOutputDuplication* duplication)
|
| - : DxgiTexture(desktop_size), duplication_(duplication) {
|
| +DxgiTextureMapping::DxgiTextureMapping(IDXGIOutputDuplication* duplication)
|
| + : duplication_(duplication) {
|
| RTC_DCHECK(duplication_);
|
| }
|
|
|
| DxgiTextureMapping::~DxgiTextureMapping() = default;
|
|
|
| -bool DxgiTextureMapping::CopyFrom(const DXGI_OUTDUPL_FRAME_INFO& frame_info,
|
| - IDXGIResource* resource) {
|
| - RTC_DCHECK(resource && frame_info.AccumulatedFrames > 0);
|
| - rect_ = {0};
|
| - _com_error error = duplication_->MapDesktopSurface(&rect_);
|
| +bool DxgiTextureMapping::CopyFromTexture(
|
| + const DXGI_OUTDUPL_FRAME_INFO& frame_info,
|
| + ID3D11Texture2D* texture) {
|
| + RTC_DCHECK(texture && frame_info.AccumulatedFrames > 0);
|
| + *rect() = {0};
|
| + _com_error error = duplication_->MapDesktopSurface(rect());
|
| if (error.Error() != S_OK) {
|
| - rect_ = {0};
|
| + *rect() = {0};
|
| LOG(LS_ERROR) << "Failed to map the IDXGIOutputDuplication to a bitmap, "
|
| "error "
|
| << error.ErrorMessage() << ", code " << error.Error();
|
|
|