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

Side by Side Diff: remoting/host/capturer_mac.h

Issue 6780014: Clean up remoting project (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: got rid of ref counting on user authenticator Created 9 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « remoting/host/capturer_linux_unittest.cc ('k') | remoting/host/capturer_mac.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef REMOTING_HOST_CAPTURER_MAC_H_
6 #define REMOTING_HOST_CAPTURER_MAC_H_
7
8 #include "remoting/host/capturer.h"
9 #include "remoting/host/capturer_helper.h"
10 #include <ApplicationServices/ApplicationServices.h>
11 #include <OpenGL/OpenGL.h>
12 #include "base/memory/scoped_ptr.h"
13
14 namespace remoting {
15
16 // A class to perform capturing for mac.
17 class CapturerMac : public Capturer {
18 public:
19 CapturerMac();
20 virtual ~CapturerMac();
21
22 // Capturer interface.
23 virtual void ScreenConfigurationChanged();
24 virtual media::VideoFrame::Format pixel_format() const;
25 virtual void ClearInvalidRects();
26 virtual void InvalidateRects(const InvalidRects& inval_rects);
27 virtual void InvalidateScreen(const gfx::Size& size);
28 virtual void InvalidateFullScreen();
29 virtual void CaptureInvalidRects(CaptureCompletedCallback* callback);
30 virtual const gfx::Size& size_most_recent() const;
31
32 private:
33 void CaptureRects(const InvalidRects& rects,
34 CaptureCompletedCallback* callback);
35
36 void ScreenRefresh(CGRectCount count, const CGRect *rect_array);
37 void ScreenUpdateMove(CGScreenUpdateMoveDelta delta,
38 size_t count,
39 const CGRect *rect_array);
40 static void ScreenRefreshCallback(CGRectCount count,
41 const CGRect *rect_array,
42 void *user_parameter);
43 static void ScreenUpdateMoveCallback(CGScreenUpdateMoveDelta delta,
44 size_t count,
45 const CGRect *rect_array,
46 void *user_parameter);
47 static void DisplaysReconfiguredCallback(CGDirectDisplayID display,
48 CGDisplayChangeSummaryFlags flags,
49 void *user_parameter);
50
51 void ReleaseBuffers();
52 CGLContextObj cgl_context_;
53 static const int kNumBuffers = 2;
54 scoped_array<uint8> buffers_[kNumBuffers];
55 scoped_array<uint8> flip_buffer_;
56
57 // A thread-safe list of invalid rectangles, and the size of the most
58 // recently captured screen.
59 CapturerHelper helper_;
60
61 // Screen size.
62 int width_;
63 int height_;
64
65 int bytes_per_row_;
66
67 // The current buffer with valid data for reading.
68 int current_buffer_;
69
70 // Format of pixels returned in buffer.
71 media::VideoFrame::Format pixel_format_;
72
73 DISALLOW_COPY_AND_ASSIGN(CapturerMac);
74 };
75
76 } // namespace remoting
77
78 #endif // REMOTING_HOST_CAPTURER_MAC_H_
OLDNEW
« no previous file with comments | « remoting/host/capturer_linux_unittest.cc ('k') | remoting/host/capturer_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698