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

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: Integer ScaleRect 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
« no previous file with comments | « remoting/client/frame_producer.h ('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 1b0b52bdffd01990e101bfc1a364b2c18aee881b..44796db789a4d8bd27b321db6f12e4977a4a0fbc 100644
--- a/remoting/client/plugin/chromoting_instance.cc
+++ b/remoting/client/plugin/chromoting_instance.cc
@@ -197,13 +197,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());
-
- // Default to a medium grey.
- view_->SetSolidFill(0xFFCDCDCD);
+ view_.reset(new PepperView(this, &context_, rectangle_decoder_.get()));
+ consumer_proxy_->Attach(view_.get());
return true;
}
@@ -261,15 +259,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)) {
- if (mouse_input_filter_.get()) {
- mouse_input_filter_->set_input_size(new_size);
- }
- rectangle_decoder_->SetOutputSize(new_size);
- }
+ SkIRect new_clip =
+ SkIRect::MakeXYWH(clip.x(), clip.y(), clip.width(), clip.height());
- rectangle_decoder_->UpdateClipRect(
- SkIRect::MakeXYWH(clip.x(), clip.y(), clip.width(), clip.height()));
+ view_->SetView(new_size, new_clip);
+
+ if (mouse_input_filter_.get()) {
+ mouse_input_filter_->set_input_size(view_->get_view_size());
+ }
}
bool ChromotingInstance::HandleInputEvent(const pp::InputEvent& event) {
@@ -282,7 +279,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);
}
« no previous file with comments | « remoting/client/frame_producer.h ('k') | remoting/client/plugin/pepper_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698