Remove resolution_tracker_ from dxgi_texture
DxgiTexture now does not rely on a fixed resolution, so the ResolutionTracker can be removed from it. This change does not have logic impact, the upper component (DxgiDuplicatorController) always reinitializes itself once the screen resolution changes. And this check is also a legacy one: DxgiFrame now can take care of the resolution change itself without needing to return false in DxgiTexture. Bug: webrtc:8044 Change-Id: I3ad9ce175f2bc9bf03b0a3985efa2681aa55d14b Reviewed-on: https://chromium-review.googlesource.com/592247 Reviewed-by: Jamie Walch <jamiewalch@chromium.org> Commit-Queue: Zijie He <zijiehe@chromium.org> Cr-Commit-Position: refs/heads/master@{#19191}
This commit is contained in:
parent
e985b90d33
commit
5af2af36ee
@ -57,10 +57,6 @@ bool DxgiTexture::CopyFrom(const DXGI_OUTDUPL_FRAME_INFO& frame_info,
|
||||
D3D11_TEXTURE2D_DESC desc = {0};
|
||||
texture->GetDesc(&desc);
|
||||
desktop_size_.set(desc.Width, desc.Height);
|
||||
if (resolution_tracker_.SetResolution(desktop_size_)) {
|
||||
LOG(LS_ERROR) << "Texture size is not consistent with current DxgiTexture.";
|
||||
return false;
|
||||
}
|
||||
|
||||
return CopyFromTexture(frame_info, texture.Get());
|
||||
}
|
||||
|
||||
@ -18,7 +18,6 @@
|
||||
|
||||
#include "webrtc/modules/desktop_capture/desktop_frame.h"
|
||||
#include "webrtc/modules/desktop_capture/desktop_geometry.h"
|
||||
#include "webrtc/modules/desktop_capture/resolution_tracker.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
@ -67,7 +66,6 @@ class DxgiTexture {
|
||||
DXGI_MAPPED_RECT rect_ = {0};
|
||||
DesktopSize desktop_size_;
|
||||
std::unique_ptr<DesktopFrame> frame_;
|
||||
ResolutionTracker resolution_tracker_;
|
||||
};
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user