Chromium Code Reviews| 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 | |
| 23 : public FrameConsumer, | |
| 24 public base::SupportsWeakPtr<FrameConsumerImpl> { | |
| 25 public: | |
| 26 FrameConsumerImpl(); | |
| 27 | |
| 28 ~FrameConsumerImpl(); | |
| 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: | |
| 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 // State is to be used from the display thread. | |
|
garykac
2013/07/16 01:28:20
This sounds odd. Can you clarify what you mean her
| |
| 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 |