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

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

Issue 9331003: Improving the decoder pipeline. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased 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/plugin/chromoting_instance.cc
diff --git a/remoting/client/plugin/chromoting_instance.cc b/remoting/client/plugin/chromoting_instance.cc
index d961e1ba16bd1518dadc918031f93afb073810c8..1b9e99bc64a0c42eb6c53a881fd4fb76677d119f 100644
--- a/remoting/client/plugin/chromoting_instance.cc
+++ b/remoting/client/plugin/chromoting_instance.cc
@@ -118,10 +118,11 @@ bool ChromotingInstance::Init(uint32_t argc,
// Create the chromoting objects that don't depend on the network connection.
// Because we decode on a separate thread we need a FrameConsumerProxy to
// bounce calls from the RectangleUpdateDecoder back to the plugin thread.
- view_.reset(new PepperView(this, &context_));
- consumer_proxy_ = new FrameConsumerProxy(view_.get(), plugin_message_loop_);
+ consumer_proxy_ = new FrameConsumerProxy(plugin_message_loop_);
rectangle_decoder_ = new RectangleUpdateDecoder(
context_.decode_message_loop(), consumer_proxy_.get());
+ view_.reset(new PepperView(this, &context_, rectangle_decoder_.get()));
+ consumer_proxy_->Attach(view_.get());
// Default to a medium grey.
view_->SetSolidFill(0xFFCDCDCD);
@@ -195,15 +196,14 @@ void ChromotingInstance::DidChangeView(const pp::Rect& position,
DCHECK(plugin_message_loop_->BelongsToCurrentThread());
SkISize new_size = SkISize::Make(position.width(), position.height());
- if (view_->SetViewSize(new_size)) {
+ SkIRect new_clip =
+ SkIRect::MakeXYWH(clip.x(), clip.y(), clip.width(), clip.height());
+
+ if (view_->SetView(new_size, new_clip)) {
if (mouse_input_filter_.get()) {
mouse_input_filter_->set_input_size(new_size);
}
- rectangle_decoder_->SetOutputSize(new_size);
}
-
- rectangle_decoder_->UpdateClipRect(
- SkIRect::MakeXYWH(clip.x(), clip.y(), clip.width(), clip.height()));
}
bool ChromotingInstance::HandleInputEvent(const pp::InputEvent& event) {
@@ -216,7 +216,7 @@ bool ChromotingInstance::HandleInputEvent(const pp::InputEvent& event) {
// this there.
// If |input_handler_| is valid, then |mouse_input_filter_| must also be
// since they are constructed together as part of the input pipeline
- mouse_input_filter_->set_output_size(view_->get_host_size());
+ mouse_input_filter_->set_output_size(view_->get_screen_size());
return input_handler_->HandleInputEvent(event);
}

Powered by Google App Engine
This is Rietveld 408576698