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 26 matching lines...) Expand all Loading... |
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, | 46 const webrtc::DesktopRegion& region, |
47 const webrtc::DesktopRegion& shape) OVERRIDE; | 47 const webrtc::DesktopRegion& shape) override; |
48 virtual void ReturnBuffer(webrtc::DesktopFrame* buffer) OVERRIDE; | 48 virtual void ReturnBuffer(webrtc::DesktopFrame* buffer) override; |
49 virtual void SetSourceSize(const webrtc::DesktopSize& source_size, | 49 virtual void SetSourceSize(const webrtc::DesktopSize& source_size, |
50 const webrtc::DesktopVector& dpi) OVERRIDE; | 50 const webrtc::DesktopVector& dpi) override; |
51 virtual PixelFormat GetPixelFormat() OVERRIDE; | 51 virtual PixelFormat GetPixelFormat() override; |
52 | 52 |
53 private: | 53 private: |
54 // 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 |
55 // the producer to draw onto it. | 55 // the producer to draw onto it. |
56 void AllocateBuffer(const webrtc::DesktopSize& source_size); | 56 void AllocateBuffer(const webrtc::DesktopSize& source_size); |
57 | 57 |
58 // Frees a frame buffer previously allocated by AllocateBuffer. | 58 // Frees a frame buffer previously allocated by AllocateBuffer. |
59 void FreeBuffer(webrtc::DesktopFrame* buffer); | 59 void FreeBuffer(webrtc::DesktopFrame* buffer); |
60 | 60 |
61 // Variables are to be used from the display thread. | 61 // Variables are to be used from the display thread. |
(...skipping 19 matching lines...) Expand all Loading... |
81 // 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 |
82 // allocated. This provides easy access to the underlying pixels. | 82 // allocated. This provides easy access to the underlying pixels. |
83 scoped_ptr<gfx::JavaBitmap> bitmap_; | 83 scoped_ptr<gfx::JavaBitmap> bitmap_; |
84 | 84 |
85 DISALLOW_COPY_AND_ASSIGN(JniFrameConsumer); | 85 DISALLOW_COPY_AND_ASSIGN(JniFrameConsumer); |
86 }; | 86 }; |
87 | 87 |
88 } // namespace remoting | 88 } // namespace remoting |
89 | 89 |
90 #endif | 90 #endif |
OLD | NEW |