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

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

Issue 18233015: Abstract PPAPI's ImageData behind webrtc::DesktopFrame interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 5 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
« no previous file with comments | « no previous file | remoting/client/frame_consumer_proxy.h » ('j') | remoting/remoting.gyp » ('J')
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 "third_party/skia/include/core/SkRect.h" 8 #include "third_party/skia/include/core/SkRect.h"
9 #include "third_party/skia/include/core/SkRegion.h" 9 #include "third_party/skia/include/core/SkRegion.h"
10 #include "third_party/skia/include/core/SkSize.h" 10 #include "third_party/skia/include/core/SkSize.h"
11 11
12 namespace pp {
13 class ImageData;
14 } // namespace pp
15
16 namespace remoting { 12 namespace remoting {
13 class ImageBuffer;
17 14
18 class FrameConsumer { 15 class FrameConsumer {
19 public: 16 public:
20 // Accepts a buffer to be painted to the screen. The buffer's dimensions and 17 // Accepts a buffer to be painted to the screen. The buffer's dimensions and
21 // relative position within the frame are specified by |clip_area|. Only 18 // relative position within the frame are specified by |clip_area|. Only
22 // pixels falling within |region| and the current clipping area are painted. 19 // pixels falling within |region| and the current clipping area are painted.
23 // The function assumes that the passed buffer was scaled to fit a window 20 // The function assumes that the passed buffer was scaled to fit a window
24 // having |view_size| dimensions. 21 // having |view_size| dimensions.
25 // 22 //
26 // N.B. Both |clip_area| and |region| are in output coordinates relative to 23 // N.B. Both |clip_area| and |region| are in output coordinates relative to
27 // the frame. 24 // the frame.
28 virtual void ApplyBuffer(const SkISize& view_size, 25 virtual void ApplyBuffer(const SkISize& view_size,
29 const SkIRect& clip_area, 26 const SkIRect& clip_area,
30 pp::ImageData* buffer, 27 ImageBuffer* buffer,
31 const SkRegion& region) = 0; 28 const SkRegion& region) = 0;
32 29
33 // Accepts a buffer that couldn't be used for drawing for any reason (shutdown 30 // Accepts a buffer that couldn't be used for drawing for any reason (shutdown
34 // is in progress, the view area has changed, etc.). The accepted buffer can 31 // is in progress, the view area has changed, etc.). The accepted buffer can
35 // be freed or reused for another drawing operation. 32 // be freed or reused for another drawing operation.
36 virtual void ReturnBuffer(pp::ImageData* buffer) = 0; 33 virtual void ReturnBuffer(ImageBuffer* buffer) = 0;
37 34
38 // Set the dimension of the entire host screen. 35 // Set the dimension of the entire host screen.
39 virtual void SetSourceSize(const SkISize& source_size, 36 virtual void SetSourceSize(const SkISize& source_size,
40 const SkIPoint& dpi) = 0; 37 const SkIPoint& dpi) = 0;
41 38
42 protected: 39 protected:
43 FrameConsumer() {} 40 FrameConsumer() {}
44 virtual ~FrameConsumer() {} 41 virtual ~FrameConsumer() {}
45 42
46 private: 43 private:
47 DISALLOW_COPY_AND_ASSIGN(FrameConsumer); 44 DISALLOW_COPY_AND_ASSIGN(FrameConsumer);
48 }; 45 };
49 46
50 } // namespace remoting 47 } // namespace remoting
51 48
52 #endif // REMOTING_CLIENT_FRAME_CONSUMER_H_ 49 #endif // REMOTING_CLIENT_FRAME_CONSUMER_H_
OLDNEW
« no previous file with comments | « no previous file | remoting/client/frame_consumer_proxy.h » ('j') | remoting/remoting.gyp » ('J')

Powered by Google App Engine
This is Rietveld 408576698