| Index: remoting/client/frame_consumer_proxy.cc
|
| diff --git a/remoting/client/frame_consumer_proxy.cc b/remoting/client/frame_consumer_proxy.cc
|
| index 65b84ed70b13e9468376f9175a4570c8f83af4aa..d6e637898519eff60f3882c9d271f21d6575dc39 100644
|
| --- a/remoting/client/frame_consumer_proxy.cc
|
| +++ b/remoting/client/frame_consumer_proxy.cc
|
| @@ -6,6 +6,9 @@
|
|
|
| #include "base/bind.h"
|
| #include "base/message_loop.h"
|
| +#include "ppapi/cpp/image_data.h"
|
| +
|
| +using base::Passed;
|
|
|
| namespace remoting {
|
|
|
| @@ -19,46 +22,35 @@ FrameConsumerProxy::FrameConsumerProxy(
|
| FrameConsumerProxy::~FrameConsumerProxy() {
|
| }
|
|
|
| -void FrameConsumerProxy::AllocateFrame(
|
| - media::VideoFrame::Format format,
|
| - const SkISize& size,
|
| - scoped_refptr<media::VideoFrame>* frame_out,
|
| +void FrameConsumerProxy::OnFrameReady(
|
| + const SkISize& screen_size,
|
| + SkISize* view_size_out,
|
| + SkIRect* clip_area_out,
|
| + scoped_ptr<pp::ImageData>* backing_store_out,
|
| const base::Closure& done) {
|
| if (!frame_consumer_message_loop_->BelongsToCurrentThread()) {
|
| frame_consumer_message_loop_->PostTask(FROM_HERE, base::Bind(
|
| - &FrameConsumerProxy::AllocateFrame, this, format, size, frame_out,
|
| - done));
|
| - return;
|
| - }
|
| -
|
| - if (frame_consumer_) {
|
| - frame_consumer_->AllocateFrame(format, size, frame_out, done);
|
| - }
|
| -}
|
| -
|
| -void FrameConsumerProxy::ReleaseFrame(media::VideoFrame* frame) {
|
| - if (!frame_consumer_message_loop_->BelongsToCurrentThread()) {
|
| - frame_consumer_message_loop_->PostTask(FROM_HERE, base::Bind(
|
| - &FrameConsumerProxy::ReleaseFrame, this, make_scoped_refptr(frame)));
|
| + &FrameConsumerProxy::OnFrameReady, this,
|
| + screen_size, view_size_out, clip_area_out, backing_store_out, done));
|
| return;
|
| }
|
|
|
| if (frame_consumer_)
|
| - frame_consumer_->ReleaseFrame(frame);
|
| + frame_consumer_->OnFrameReady(screen_size, view_size_out, clip_area_out,
|
| + backing_store_out, done);
|
| }
|
|
|
| -void FrameConsumerProxy::OnPartialFrameOutput(media::VideoFrame* frame,
|
| - SkRegion* region,
|
| - const base::Closure& done) {
|
| +void FrameConsumerProxy::OnPaintDone(scoped_ptr<pp::ImageData> backing_store,
|
| + scoped_ptr<SkRegion> updated_region) {
|
| if (!frame_consumer_message_loop_->BelongsToCurrentThread()) {
|
| frame_consumer_message_loop_->PostTask(FROM_HERE, base::Bind(
|
| - &FrameConsumerProxy::OnPartialFrameOutput, this,
|
| - make_scoped_refptr(frame), region, done));
|
| + &FrameConsumerProxy::OnPaintDone, this,
|
| + Passed(&backing_store), Passed(&updated_region)));
|
| return;
|
| }
|
|
|
| if (frame_consumer_)
|
| - frame_consumer_->OnPartialFrameOutput(frame, region, done);
|
| + frame_consumer_->OnPaintDone(backing_store.Pass(), updated_region.Pass());
|
| }
|
|
|
| void FrameConsumerProxy::Detach() {
|
|
|