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: trunk/src/remoting/client/frame_consumer.h

Issue 24217003: Revert 224101 "Remove dependency on Skia from chromoting client." (Closed) Base URL: svn://svn.chromium.org/chrome/
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
« no previous file with comments | « trunk/src/remoting/client/DEPS ('k') | trunk/src/remoting/client/frame_consumer_proxy.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
10 #include "third_party/skia/include/core/SkRegion.h"
11 #include "third_party/skia/include/core/SkSize.h"
9 12
10 namespace webrtc { 13 namespace webrtc {
11 class DesktopFrame; 14 class DesktopFrame;
12 class DesktopRect;
13 class DesktopRegion;
14 class DesktopSize;
15 class DesktopVector;
16 } // namespace webrtc 15 } // namespace webrtc
17 16
18 namespace remoting { 17 namespace remoting {
19 18
20 class FrameConsumer { 19 class FrameConsumer {
21 public: 20 public:
22 // Accepts a buffer to be painted to the screen. The buffer's dimensions and 21 // Accepts a buffer to be painted to the screen. The buffer's dimensions and
23 // relative position within the frame are specified by |clip_area|. Only 22 // relative position within the frame are specified by |clip_area|. Only
24 // pixels falling within |region| and the current clipping area are painted. 23 // pixels falling within |region| and the current clipping area are painted.
25 // The function assumes that the passed buffer was scaled to fit a window 24 // The function assumes that the passed buffer was scaled to fit a window
26 // having |view_size| dimensions. 25 // having |view_size| dimensions.
27 // 26 //
28 // N.B. Both |clip_area| and |region| are in output coordinates relative to 27 // N.B. Both |clip_area| and |region| are in output coordinates relative to
29 // the frame. 28 // the frame.
30 virtual void ApplyBuffer(const webrtc::DesktopSize& view_size, 29 virtual void ApplyBuffer(const SkISize& view_size,
31 const webrtc::DesktopRect& clip_area, 30 const SkIRect& clip_area,
32 webrtc::DesktopFrame* buffer, 31 webrtc::DesktopFrame* buffer,
33 const webrtc::DesktopRegion& region) = 0; 32 const SkRegion& region) = 0;
34 33
35 // Accepts a buffer that couldn't be used for drawing for any reason (shutdown 34 // Accepts a buffer that couldn't be used for drawing for any reason (shutdown
36 // is in progress, the view area has changed, etc.). The accepted buffer can 35 // is in progress, the view area has changed, etc.). The accepted buffer can
37 // be freed or reused for another drawing operation. 36 // be freed or reused for another drawing operation.
38 virtual void ReturnBuffer(webrtc::DesktopFrame* buffer) = 0; 37 virtual void ReturnBuffer(webrtc::DesktopFrame* buffer) = 0;
39 38
40 // Set the dimension of the entire host screen. 39 // Set the dimension of the entire host screen.
41 virtual void SetSourceSize(const webrtc::DesktopSize& source_size, 40 virtual void SetSourceSize(const SkISize& source_size,
42 const webrtc::DesktopVector& dpi) = 0; 41 const SkIPoint& dpi) = 0;
43 42
44 protected: 43 protected:
45 FrameConsumer() {} 44 FrameConsumer() {}
46 virtual ~FrameConsumer() {} 45 virtual ~FrameConsumer() {}
47 46
48 private: 47 private:
49 DISALLOW_COPY_AND_ASSIGN(FrameConsumer); 48 DISALLOW_COPY_AND_ASSIGN(FrameConsumer);
50 }; 49 };
51 50
52 } // namespace remoting 51 } // namespace remoting
53 52
54 #endif // REMOTING_CLIENT_FRAME_CONSUMER_H_ 53 #endif // REMOTING_CLIENT_FRAME_CONSUMER_H_
OLDNEW
« no previous file with comments | « trunk/src/remoting/client/DEPS ('k') | trunk/src/remoting/client/frame_consumer_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698