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

Side by Side Diff: remoting/client/frame_consumer.h

Issue 23440046: Remove dependency on Skia from chromoting client. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef REMOTING_CLIENT_FRAME_CONSUMER_H_ 5 #ifndef REMOTING_CLIENT_FRAME_CONSUMER_H_
6 #define REMOTING_CLIENT_FRAME_CONSUMER_H_ 6 #define REMOTING_CLIENT_FRAME_CONSUMER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "third_party/skia/include/core/SkRect.h" 9 #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h"
alexeypa (please no reviews) 2013/09/18 23:04:05 nit: Forward declare webrtc::DesktopXxx classes in
Sergey Ulanov 2013/09/18 23:26:58 Done.
10 #include "third_party/skia/include/core/SkRegion.h" 10 #include "third_party/webrtc/modules/desktop_capture/desktop_region.h"
11 #include "third_party/skia/include/core/SkSize.h"
12 11
13 namespace webrtc { 12 namespace webrtc {
14 class DesktopFrame; 13 class DesktopFrame;
15 } // namespace webrtc 14 } // namespace webrtc
16 15
17 namespace remoting { 16 namespace remoting {
18 17
19 class FrameConsumer { 18 class FrameConsumer {
20 public: 19 public:
21 // Accepts a buffer to be painted to the screen. The buffer's dimensions and 20 // Accepts a buffer to be painted to the screen. The buffer's dimensions and
22 // relative position within the frame are specified by |clip_area|. Only 21 // relative position within the frame are specified by |clip_area|. Only
23 // pixels falling within |region| and the current clipping area are painted. 22 // pixels falling within |region| and the current clipping area are painted.
24 // The function assumes that the passed buffer was scaled to fit a window 23 // The function assumes that the passed buffer was scaled to fit a window
25 // having |view_size| dimensions. 24 // having |view_size| dimensions.
26 // 25 //
27 // N.B. Both |clip_area| and |region| are in output coordinates relative to 26 // N.B. Both |clip_area| and |region| are in output coordinates relative to
28 // the frame. 27 // the frame.
29 virtual void ApplyBuffer(const SkISize& view_size, 28 virtual void ApplyBuffer(const webrtc::DesktopSize& view_size,
30 const SkIRect& clip_area, 29 const webrtc::DesktopRect& clip_area,
31 webrtc::DesktopFrame* buffer, 30 webrtc::DesktopFrame* buffer,
32 const SkRegion& region) = 0; 31 const webrtc::DesktopRegion& region) = 0;
33 32
34 // Accepts a buffer that couldn't be used for drawing for any reason (shutdown 33 // Accepts a buffer that couldn't be used for drawing for any reason (shutdown
35 // is in progress, the view area has changed, etc.). The accepted buffer can 34 // is in progress, the view area has changed, etc.). The accepted buffer can
36 // be freed or reused for another drawing operation. 35 // be freed or reused for another drawing operation.
37 virtual void ReturnBuffer(webrtc::DesktopFrame* buffer) = 0; 36 virtual void ReturnBuffer(webrtc::DesktopFrame* buffer) = 0;
38 37
39 // Set the dimension of the entire host screen. 38 // Set the dimension of the entire host screen.
40 virtual void SetSourceSize(const SkISize& source_size, 39 virtual void SetSourceSize(const webrtc::DesktopSize& source_size,
41 const SkIPoint& dpi) = 0; 40 const webrtc::DesktopVector& dpi) = 0;
42 41
43 protected: 42 protected:
44 FrameConsumer() {} 43 FrameConsumer() {}
45 virtual ~FrameConsumer() {} 44 virtual ~FrameConsumer() {}
46 45
47 private: 46 private:
48 DISALLOW_COPY_AND_ASSIGN(FrameConsumer); 47 DISALLOW_COPY_AND_ASSIGN(FrameConsumer);
49 }; 48 };
50 49
51 } // namespace remoting 50 } // namespace remoting
52 51
53 #endif // REMOTING_CLIENT_FRAME_CONSUMER_H_ 52 #endif // REMOTING_CLIENT_FRAME_CONSUMER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698