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

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

Issue 1288063004: Simplify FrameConsumer interface. Remove FrameProducer interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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 | « remoting/client/frame_consumer_proxy.cc ('k') | remoting/client/jni/chromoting_jni_instance.h » ('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) 2012 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_CLIENT_FRAME_PRODUCER_H_
6 #define REMOTING_CLIENT_FRAME_PRODUCER_H_
7
8 #include "base/callback_forward.h"
9
10 namespace webrtc {
11 class DesktopFrame;
12 class DesktopRect;
13 class DesktopRegion;
14 class DesktopSize;
15 } // namespace webrtc
16
17 namespace remoting {
18
19 class FrameProducer {
20 public:
21 FrameProducer() {}
22
23 // Adds an image buffer to the pool of pending buffers for subsequent drawing.
24 // Once drawing is completed the buffer will be returned to the consumer via
25 // the FrameConsumer::ApplyBuffer() call. Alternatively an empty buffer could
26 // be returned via the FrameConsumer::ReturnBuffer() call.
27 //
28 // The passed buffer must be large enough to hold the whole clipping area.
29 virtual void DrawBuffer(webrtc::DesktopFrame* buffer) = 0;
30
31 // Requests repainting of the specified |region| of the frame as soon as
32 // possible. |region| is specified in output coordinates relative to
33 // the beginning of the frame.
34 virtual void InvalidateRegion(const webrtc::DesktopRegion& region) = 0;
35
36 // Requests returing of all pending buffers to the consumer via
37 // FrameConsumer::ReturnBuffer() calls.
38 virtual void RequestReturnBuffers(const base::Closure& done) = 0;
39
40 // Notifies the producer of changes to the output view size or clipping area.
41 // Implementations must cope with empty |view_size| or |clip_area|.
42 virtual void SetOutputSizeAndClip(const webrtc::DesktopSize& view_size,
43 const webrtc::DesktopRect& clip_area) = 0;
44
45 protected:
46 virtual ~FrameProducer() {}
47
48 private:
49 DISALLOW_COPY_AND_ASSIGN(FrameProducer);
50 };
51
52 } // namespace remoting
53
54 #endif // REMOTING_CLIENT_FRAME_PRODUCER_H_
OLDNEW
« no previous file with comments | « remoting/client/frame_consumer_proxy.cc ('k') | remoting/client/jni/chromoting_jni_instance.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698