OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2013 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_JNI_FRAME_CONSUMER_IMPL_H_ | |
6 #define REMOTING_CLIENT_JNI_FRAME_CONSUMER_IMPL_H_ | |
7 | |
8 #include "remoting/client/frame_consumer.h" | |
9 | |
10 #include "base/basictypes.h" | |
11 #include "base/memory/weak_ptr.h" | |
12 | |
13 namespace webrtc { | |
14 class DesktopFrame; | |
15 } // namespace webrtc | |
16 | |
17 namespace remoting { | |
18 class ChromotingJni; | |
19 class FrameProducer; | |
20 | |
21 // FrameConsumer implementation that draws onto a JNI direct byte buffer. | |
22 class FrameConsumerImpl | |
Wez
2013/07/16 02:18:12
Shouldn't this be something like e.g. JniFrameCons
solb
2013/07/16 18:00:57
Done.
| |
23 : public FrameConsumer, | |
24 public base::SupportsWeakPtr<FrameConsumerImpl> { | |
Wez
2013/07/16 02:18:12
Use WeakPtrFactory rather than SupportsWeakPtr, pl
solb
2013/07/16 18:00:57
Done.
| |
25 public: | |
26 FrameConsumerImpl(); | |
27 | |
Wez
2013/07/16 02:18:12
No need for a blank line here.
solb
2013/07/16 18:00:57
Done.
| |
28 ~FrameConsumerImpl(); | |
Wez
2013/07/16 02:18:12
virtual
solb
2013/07/16 18:00:57
Thanks!
| |
29 | |
30 // This must be called once before the producer's source size is set. | |
31 void set_frame_producer(FrameProducer* producer); | |
32 | |
33 // FrameConsumer implementation: | |
Wez
2013/07/16 02:18:12
Here and everywhere else, please end sentences wit
solb
2013/07/16 18:00:57
Done.
| |
34 virtual void ApplyBuffer(const SkISize& view_size, | |
35 const SkIRect& clip_area, | |
36 webrtc::DesktopFrame* buffer, | |
37 const SkRegion& region) OVERRIDE; | |
38 virtual void ReturnBuffer(webrtc::DesktopFrame* buffer) OVERRIDE; | |
39 virtual void SetSourceSize(const SkISize& source_size, | |
40 const SkIPoint& dpi) OVERRIDE; | |
41 | |
42 private: | |
43 // These variables are to be used from the display thread. | |
44 FrameProducer* frame_producer_; | |
45 SkISize view_size_; | |
46 SkIRect clip_area_; | |
47 webrtc::DesktopFrame* buffer_; | |
48 | |
49 DISALLOW_COPY_AND_ASSIGN(FrameConsumerImpl); | |
50 }; | |
51 | |
52 } // namespace remoting | |
53 | |
54 #endif | |
OLD | NEW |