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

Unified Diff: webrtc/modules/desktop_capture/win/screen_capturer_win_directx.h

Issue 2933893003: Add reference counter of DxgiDuplicatorController to unload DXGI components (Closed)
Patch Set: Avoid copy-constructor of std::atomic_int Created 3 years, 6 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/screen_capturer_win_directx.h
diff --git a/webrtc/modules/desktop_capture/win/screen_capturer_win_directx.h b/webrtc/modules/desktop_capture/win/screen_capturer_win_directx.h
index 59f457c5b4dcdd15ec6813983d1540f76b62efd5..67f177e2cadecab6b1062938fe9fdb743a723d10 100644
--- a/webrtc/modules/desktop_capture/win/screen_capturer_win_directx.h
+++ b/webrtc/modules/desktop_capture/win/screen_capturer_win_directx.h
@@ -16,6 +16,7 @@
#include <memory>
#include <vector>
+#include "webrtc/base/scoped_ref_ptr.h"
#include "webrtc/modules/desktop_capture/desktop_capturer.h"
#include "webrtc/modules/desktop_capture/desktop_capture_options.h"
#include "webrtc/modules/desktop_capture/desktop_region.h"
@@ -43,10 +44,11 @@ class ScreenCapturerWinDirectx : public DesktopCapturer {
// consumers should not cache the result returned by this function.
static bool RetrieveD3dInfo(D3dInfo* info);
- explicit ScreenCapturerWinDirectx(const DesktopCaptureOptions& options);
+ explicit ScreenCapturerWinDirectx();
~ScreenCapturerWinDirectx() override;
+ // DesktopCapturer implementation.
void Start(Callback* callback) override;
void SetSharedMemoryFactory(
std::unique_ptr<SharedMemoryFactory> shared_memory_factory) override;
@@ -55,6 +57,7 @@ class ScreenCapturerWinDirectx : public DesktopCapturer {
bool SelectSource(SourceId id) override;
private:
+ const rtc::scoped_refptr<DxgiDuplicatorController> controller_;
ScreenCaptureFrameQueue<DxgiFrame> frames_;
std::unique_ptr<SharedMemoryFactory> shared_memory_factory_;
Callback* callback_ = nullptr;

Powered by Google App Engine
This is Rietveld 408576698