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

Unified Diff: remoting/client/plugin/chromoting_instance.cc

Issue 23677011: Byte-swap the video frame pixels before passing them to Java. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove FrameConsumerProxy::Attach Created 7 years, 3 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/plugin/chromoting_instance.cc
diff --git a/remoting/client/plugin/chromoting_instance.cc b/remoting/client/plugin/chromoting_instance.cc
index 6cecbaa5bab1a621a08c5bc482b16292848f89ef..b07479597315a745d467968ebbc770ceae754699 100644
--- a/remoting/client/plugin/chromoting_instance.cc
+++ b/remoting/client/plugin/chromoting_instance.cc
@@ -603,10 +603,16 @@ void ChromotingInstance::ConnectWithConfig(const ClientConfig& config,
jingle_glue::JingleThreadWrapper::EnsureForCurrentMessageLoop();
+
+ view_.reset(new PepperView(this, &context_));
+ view_weak_factory_.reset(
+ new base::WeakPtrFactory<FrameConsumer>(view_.get()));
+
// RectangleUpdateDecoder runs on a separate thread so for now we wrap
// PepperView with a ref-counted proxy object.
scoped_refptr<FrameConsumerProxy> consumer_proxy =
- new FrameConsumerProxy(plugin_task_runner_);
+ new FrameConsumerProxy(plugin_task_runner_,
+ view_weak_factory_->GetWeakPtr());
host_connection_.reset(new protocol::ConnectionToHost(true));
scoped_ptr<AudioPlayer> audio_player(new PepperAudioPlayer(this));
@@ -614,10 +620,8 @@ void ChromotingInstance::ConnectWithConfig(const ClientConfig& config,
host_connection_.get(), this,
consumer_proxy, audio_player.Pass()));
- view_.reset(new PepperView(this, &context_, client_->GetFrameProducer()));
- view_weak_factory_.reset(
- new base::WeakPtrFactory<FrameConsumer>(view_.get()));
- consumer_proxy->Attach(view_weak_factory_->GetWeakPtr());
+ view_->InitiateDrawing(client_->GetFrameProducer());
+
if (!plugin_view_.is_null()) {
view_->SetView(plugin_view_);
}

Powered by Google App Engine
This is Rietveld 408576698