| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // FrameConsumerProxy is used to allow a FrameConsumer on the UI thread to be | 5 // FrameConsumerProxy is used to allow a FrameConsumer on the UI thread to be |
| 6 // invoked by a Decoder on the decoder thread. The Detach() method is used by | 6 // invoked by a Decoder on the decoder thread. The Detach() method is used by |
| 7 // the proxy's owner before tearing down the FrameConsumer, to prevent any | 7 // the proxy's owner before tearing down the FrameConsumer, to prevent any |
| 8 // further invokations reaching it. | 8 // further invokations reaching it. |
| 9 | 9 |
| 10 #ifndef REMOTING_CLIENT_FRAME_CONSUMER_PROXY_H_ | 10 #ifndef REMOTING_CLIENT_FRAME_CONSUMER_PROXY_H_ |
| 11 #define REMOTING_CLIENT_FRAME_CONSUMER_PROXY_H_ | 11 #define REMOTING_CLIENT_FRAME_CONSUMER_PROXY_H_ |
| (...skipping 17 matching lines...) Expand all Loading... |
| 29 base::MessageLoopProxy* frame_consumer_message_loop); | 29 base::MessageLoopProxy* frame_consumer_message_loop); |
| 30 virtual ~FrameConsumerProxy(); | 30 virtual ~FrameConsumerProxy(); |
| 31 | 31 |
| 32 // FrameConsumer implementation. | 32 // FrameConsumer implementation. |
| 33 virtual void AllocateFrame(media::VideoFrame::Format format, | 33 virtual void AllocateFrame(media::VideoFrame::Format format, |
| 34 const SkISize& size, | 34 const SkISize& size, |
| 35 scoped_refptr<media::VideoFrame>* frame_out, | 35 scoped_refptr<media::VideoFrame>* frame_out, |
| 36 const base::Closure& done) OVERRIDE; | 36 const base::Closure& done) OVERRIDE; |
| 37 virtual void ReleaseFrame(media::VideoFrame* frame) OVERRIDE; | 37 virtual void ReleaseFrame(media::VideoFrame* frame) OVERRIDE; |
| 38 virtual void OnPartialFrameOutput(media::VideoFrame* frame, | 38 virtual void OnPartialFrameOutput(media::VideoFrame* frame, |
| 39 SkRegion* region, | 39 RectVector* rects, |
| 40 const base::Closure& done) OVERRIDE; | 40 const base::Closure& done) OVERRIDE; |
| 41 | 41 |
| 42 // Detaches from |frame_consumer_|, ensuring no further calls reach it. | 42 // Detaches from |frame_consumer_|, ensuring no further calls reach it. |
| 43 // This must only be called from |frame_consumer_message_loop_|. | 43 // This must only be called from |frame_consumer_message_loop_|. |
| 44 void Detach(); | 44 void Detach(); |
| 45 | 45 |
| 46 private: | 46 private: |
| 47 FrameConsumer* frame_consumer_; | 47 FrameConsumer* frame_consumer_; |
| 48 | 48 |
| 49 scoped_refptr<base::MessageLoopProxy> frame_consumer_message_loop_; | 49 scoped_refptr<base::MessageLoopProxy> frame_consumer_message_loop_; |
| 50 | 50 |
| 51 DISALLOW_COPY_AND_ASSIGN(FrameConsumerProxy); | 51 DISALLOW_COPY_AND_ASSIGN(FrameConsumerProxy); |
| 52 }; | 52 }; |
| 53 | 53 |
| 54 } // namespace remoting | 54 } // namespace remoting |
| 55 | 55 |
| 56 #endif // REMOTING_CLIENT_FRAME_CONSUMER_PROXY_H_ | 56 #endif // REMOTING_CLIENT_FRAME_CONSUMER_PROXY_H_ |
| OLD | NEW |