OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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_JNI_JNI_FRAME_CONSUMER_H_ | 5 #ifndef REMOTING_CLIENT_JNI_JNI_FRAME_CONSUMER_H_ |
6 #define REMOTING_CLIENT_JNI_JNI_FRAME_CONSUMER_H_ | 6 #define REMOTING_CLIENT_JNI_JNI_FRAME_CONSUMER_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 | 9 |
10 #include "base/android/scoped_java_ref.h" | 10 #include "base/android/scoped_java_ref.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 | 36 |
37 virtual ~JniFrameConsumer(); | 37 virtual ~JniFrameConsumer(); |
38 | 38 |
39 // This must be called once before the producer's source size is set. | 39 // This must be called once before the producer's source size is set. |
40 void set_frame_producer(FrameProducer* producer); | 40 void set_frame_producer(FrameProducer* producer); |
41 | 41 |
42 // FrameConsumer implementation. | 42 // FrameConsumer implementation. |
43 virtual void ApplyBuffer(const webrtc::DesktopSize& view_size, | 43 virtual void ApplyBuffer(const webrtc::DesktopSize& view_size, |
44 const webrtc::DesktopRect& clip_area, | 44 const webrtc::DesktopRect& clip_area, |
45 webrtc::DesktopFrame* buffer, | 45 webrtc::DesktopFrame* buffer, |
46 const webrtc::DesktopRegion& region) OVERRIDE; | 46 const webrtc::DesktopRegion& region, |
| 47 const webrtc::DesktopRegion& shape) OVERRIDE; |
47 virtual void ReturnBuffer(webrtc::DesktopFrame* buffer) OVERRIDE; | 48 virtual void ReturnBuffer(webrtc::DesktopFrame* buffer) OVERRIDE; |
48 virtual void SetSourceSize(const webrtc::DesktopSize& source_size, | 49 virtual void SetSourceSize(const webrtc::DesktopSize& source_size, |
49 const webrtc::DesktopVector& dpi) OVERRIDE; | 50 const webrtc::DesktopVector& dpi) OVERRIDE; |
50 virtual PixelFormat GetPixelFormat() OVERRIDE; | 51 virtual PixelFormat GetPixelFormat() OVERRIDE; |
51 | 52 |
52 private: | 53 private: |
53 // Allocates a new buffer of |source_size|, informs Java about it, and tells | 54 // Allocates a new buffer of |source_size|, informs Java about it, and tells |
54 // the producer to draw onto it. | 55 // the producer to draw onto it. |
55 void AllocateBuffer(const webrtc::DesktopSize& source_size); | 56 void AllocateBuffer(const webrtc::DesktopSize& source_size); |
56 | 57 |
(...skipping 23 matching lines...) Expand all Loading... |
80 // Reference to the frame bitmap that is passed to Java when the frame is | 81 // Reference to the frame bitmap that is passed to Java when the frame is |
81 // allocated. This provides easy access to the underlying pixels. | 82 // allocated. This provides easy access to the underlying pixels. |
82 scoped_ptr<gfx::JavaBitmap> bitmap_; | 83 scoped_ptr<gfx::JavaBitmap> bitmap_; |
83 | 84 |
84 DISALLOW_COPY_AND_ASSIGN(JniFrameConsumer); | 85 DISALLOW_COPY_AND_ASSIGN(JniFrameConsumer); |
85 }; | 86 }; |
86 | 87 |
87 } // namespace remoting | 88 } // namespace remoting |
88 | 89 |
89 #endif | 90 #endif |
OLD | NEW |