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

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: Narrow the synchronization block 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
« no previous file with comments | « remoting/client/jni/jni_frame_consumer.cc ('k') | remoting/client/plugin/pepper_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..fd92f5f5e49333b11a0afe4cc7d62b0ad853443a 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_->Initialize(client_->GetFrameProducer());
+
if (!plugin_view_.is_null()) {
view_->SetView(plugin_view_);
}
« no previous file with comments | « remoting/client/jni/jni_frame_consumer.cc ('k') | remoting/client/plugin/pepper_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698