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

Side by Side Diff: webrtc/modules/desktop_capture/desktop_frame_win.h

Issue 1678073003: Cleanup shared memory handling in DesktopCapturer interface. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 10 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_FRAME_WIN_H_ 11 #ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_FRAME_WIN_H_
12 #define WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_FRAME_WIN_H_ 12 #define WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_FRAME_WIN_H_
13 13
14 #include <windows.h> 14 #include <windows.h>
15 15
16 #include "webrtc/base/scoped_ptr.h" 16 #include "webrtc/base/scoped_ptr.h"
17 #include "webrtc/modules/desktop_capture/desktop_frame.h" 17 #include "webrtc/modules/desktop_capture/desktop_frame.h"
18 #include "webrtc/typedefs.h" 18 #include "webrtc/typedefs.h"
19 19
20 namespace webrtc { 20 namespace webrtc {
21 21
22 // DesktopFrame implementation used by screen and window captures on Windows. 22 // DesktopFrame implementation used by screen and window captures on Windows.
23 // Frame data is stored in a GDI bitmap. 23 // Frame data is stored in a GDI bitmap.
24 class DesktopFrameWin : public DesktopFrame { 24 class DesktopFrameWin : public DesktopFrame {
25 public: 25 public:
26 virtual ~DesktopFrameWin(); 26 virtual ~DesktopFrameWin();
27 static DesktopFrameWin* Create(DesktopSize size, 27 static DesktopFrameWin* Create(DesktopSize size,
28 SharedMemory* shared_memory, 28 SharedMemoryFactory* shared_memory_factory,
29 HDC hdc); 29 HDC hdc);
30 30
31 HBITMAP bitmap() { return bitmap_; } 31 HBITMAP bitmap() { return bitmap_; }
32 32
33 private: 33 private:
34 DesktopFrameWin(DesktopSize size, 34 DesktopFrameWin(DesktopSize size,
35 int stride, 35 int stride,
36 uint8_t* data, 36 uint8_t* data,
37 SharedMemory* shared_memory, 37 rtc::scoped_ptr<SharedMemory> shared_memory,
38 HBITMAP bitmap); 38 HBITMAP bitmap);
39 39
40 HBITMAP bitmap_; 40 HBITMAP bitmap_;
41 rtc::scoped_ptr<SharedMemory> owned_shared_memory_; 41 rtc::scoped_ptr<SharedMemory> owned_shared_memory_;
42 42
43 RTC_DISALLOW_COPY_AND_ASSIGN(DesktopFrameWin); 43 RTC_DISALLOW_COPY_AND_ASSIGN(DesktopFrameWin);
44 }; 44 };
45 45
46 } // namespace webrtc 46 } // namespace webrtc
47 47
48 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_FRAME_WIN_H_ 48 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_FRAME_WIN_H_
49 49
OLDNEW
« no previous file with comments | « webrtc/modules/desktop_capture/desktop_frame.cc ('k') | webrtc/modules/desktop_capture/desktop_frame_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698