| 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 #include "remoting/client/frame_consumer_proxy.h" | 5 #include "remoting/client/frame_consumer_proxy.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 9 | 9 |
| 10 namespace remoting { | 10 namespace remoting { |
| 11 | 11 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 41 frame_consumer_message_loop_->PostTask(FROM_HERE, base::Bind( | 41 frame_consumer_message_loop_->PostTask(FROM_HERE, base::Bind( |
| 42 &FrameConsumerProxy::ReleaseFrame, this, make_scoped_refptr(frame))); | 42 &FrameConsumerProxy::ReleaseFrame, this, make_scoped_refptr(frame))); |
| 43 return; | 43 return; |
| 44 } | 44 } |
| 45 | 45 |
| 46 if (frame_consumer_) | 46 if (frame_consumer_) |
| 47 frame_consumer_->ReleaseFrame(frame); | 47 frame_consumer_->ReleaseFrame(frame); |
| 48 } | 48 } |
| 49 | 49 |
| 50 void FrameConsumerProxy::OnPartialFrameOutput(media::VideoFrame* frame, | 50 void FrameConsumerProxy::OnPartialFrameOutput(media::VideoFrame* frame, |
| 51 SkRegion* region, | 51 RectVector* rects, |
| 52 const base::Closure& done) { | 52 const base::Closure& done) { |
| 53 if (!frame_consumer_message_loop_->BelongsToCurrentThread()) { | 53 if (!frame_consumer_message_loop_->BelongsToCurrentThread()) { |
| 54 frame_consumer_message_loop_->PostTask(FROM_HERE, base::Bind( | 54 frame_consumer_message_loop_->PostTask(FROM_HERE, base::Bind( |
| 55 &FrameConsumerProxy::OnPartialFrameOutput, this, | 55 &FrameConsumerProxy::OnPartialFrameOutput, this, |
| 56 make_scoped_refptr(frame), region, done)); | 56 make_scoped_refptr(frame), rects, done)); |
| 57 return; | 57 return; |
| 58 } | 58 } |
| 59 | 59 |
| 60 if (frame_consumer_) | 60 if (frame_consumer_) |
| 61 frame_consumer_->OnPartialFrameOutput(frame, region, done); | 61 frame_consumer_->OnPartialFrameOutput(frame, rects, done); |
| 62 } | 62 } |
| 63 | 63 |
| 64 void FrameConsumerProxy::Detach() { | 64 void FrameConsumerProxy::Detach() { |
| 65 DCHECK(frame_consumer_message_loop_->BelongsToCurrentThread()); | 65 DCHECK(frame_consumer_message_loop_->BelongsToCurrentThread()); |
| 66 frame_consumer_ = NULL; | 66 frame_consumer_ = NULL; |
| 67 } | 67 } |
| 68 | 68 |
| 69 } // namespace remoting | 69 } // namespace remoting |
| OLD | NEW |