Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1349)

Unified Diff: remoting/client/frame_consumer_proxy.cc

Issue 9331003: Improving the decoder pipeline. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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() {

Powered by Google App Engine
This is Rietveld 408576698