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

Unified Diff: webrtc/modules/desktop_capture/screen_capturer_win.cc

Issue 2314323002: Wrap ScreenCapturer with ScreenCapturerDifferWrapper (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/screen_capturer_win.cc
diff --git a/webrtc/modules/desktop_capture/screen_capturer_win.cc b/webrtc/modules/desktop_capture/screen_capturer_win.cc
index 6a83bec1c522218e039063fa8f3177f6ade71562..5b36a7a527b4a2ea41db346047de15f943c806b1 100644
--- a/webrtc/modules/desktop_capture/screen_capturer_win.cc
+++ b/webrtc/modules/desktop_capture/screen_capturer_win.cc
@@ -14,6 +14,7 @@
#include <utility>
#include "webrtc/modules/desktop_capture/desktop_capture_options.h"
+#include "webrtc/modules/desktop_capture/screen_capturer_differ_wrapper.h"
#include "webrtc/modules/desktop_capture/win/screen_capturer_win_directx.h"
#include "webrtc/modules/desktop_capture/win/screen_capturer_win_gdi.h"
#include "webrtc/modules/desktop_capture/win/screen_capturer_win_magnifier.h"
@@ -23,15 +24,19 @@ namespace webrtc {
// static
ScreenCapturer* ScreenCapturer::Create(const DesktopCaptureOptions& options) {
std::unique_ptr<ScreenCapturer> capturer;
- if (options.allow_directx_capturer() &&
- ScreenCapturerWinDirectx::IsSupported()) {
+ if (options.allow_directx_capturer()) {
Sergey Ulanov 2016/09/09 17:33:51 Do you still need to check IsSupported() here?
Hzj_jie 2016/09/14 19:35:31 Oh, yes, I still need to check IsSupport here. Th
capturer.reset(new ScreenCapturerWinDirectx(options));
- } else {
+ }
+ if (!capturer) {
Sergey Ulanov 2016/09/09 17:33:51 else is still appropriate here.
Hzj_jie 2016/09/14 19:35:31 Done.
capturer.reset(new ScreenCapturerWinGdi(options));
}
+ if (options.allow_use_magnification_api()) {
+ capturer.reset(new ScreenCapturerWinMagnifier(std::move(capturer)));
+ }
- if (options.allow_use_magnification_api())
- return new ScreenCapturerWinMagnifier(std::move(capturer));
+ if (options.detect_updated_region()) {
+ capturer.reset(new ScreenCapturerDifferWrapper(std::move(capturer)));
+ }
return capturer.release();
}
« no previous file with comments | « webrtc/modules/desktop_capture/screen_capturer_mac.mm ('k') | webrtc/modules/desktop_capture/screen_capturer_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698