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

Unified Diff: webrtc/modules/desktop_capture/screen_drawer_linux.h

Issue 2210443002: [WebRTC] Implement Windows ScreenDrawer to test ScreenCapturer* (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Implement ScreenDrawer for X11 Created 4 years, 4 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_drawer_linux.h
diff --git a/webrtc/modules/desktop_capture/screen_drawer_linux.h b/webrtc/modules/desktop_capture/screen_drawer_linux.h
new file mode 100644
index 0000000000000000000000000000000000000000..3542574cdc81ea45a44669754c4fa5dc0c6b5825
--- /dev/null
+++ b/webrtc/modules/desktop_capture/screen_drawer_linux.h
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef MODULES_DESKTOP_CAPTURE_SCREEN_DRAWER_LINUX_H_
Sergey Ulanov 2016/08/09 17:43:01 For platform-specific screen capturers we don't ha
Sergey Ulanov 2016/08/09 17:43:01 This file should be called screen_drawer_x11.h
Hzj_jie 2016/08/11 18:42:04 I thought linux suffix can trigger GN / GYP exclus
Hzj_jie 2016/08/11 18:42:04 Done.
+#define MODULES_DESKTOP_CAPTURE_SCREEN_DRAWER_LINUX_H_
+
+#include "webrtc/modules/desktop_capture/screen_drawer.h"
+#include "webrtc/modules/desktop_capture/x11/shared_x_display.h"
+
+namespace webrtc {
+
+// A ScreenDrawer implementation for X11dows.
Sergey Ulanov 2016/08/09 17:43:01 typo: X11dows
Hzj_jie 2016/08/11 18:42:04 Done.
+class ScreenDrawerX11 : public ScreenDrawer {
+ public:
+ ScreenDrawerX11();
+ ~ScreenDrawerX11() override;
+
+ DesktopRect DrawableRegion() override;
Sergey Ulanov 2016/08/09 17:43:01 // ScreenDrawer interface.
Hzj_jie 2016/08/11 18:42:04 Done.
+ void DrawRectangle(DesktopRect rect, uint32_t rgba) override;
+
+ private:
+ const rtc::scoped_refptr<SharedXDisplay> display_;
+ const Screen* screen_;
+ const int screen_num_;
+ const DesktopRect rect_;
+ Window window_;
+ GC context_;
+ Colormap colormap_;
+};
+
+} // namespace webrtc
+
+#endif // MODULES_DESKTOP_CAPTURE_SCREEN_DRAWER_LINUX_H_

Powered by Google App Engine
This is Rietveld 408576698