Index: remoting/client/plugin/chromoting_instance.cc |
diff --git a/remoting/client/plugin/chromoting_instance.cc b/remoting/client/plugin/chromoting_instance.cc |
index e64425b9fdf1491e180a610fe73e7d79e30d41b8..cd34ed80c77a74828d63568208bbe912c7088042 100644 |
--- a/remoting/client/plugin/chromoting_instance.cc |
+++ b/remoting/client/plugin/chromoting_instance.cc |
@@ -188,15 +188,20 @@ 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); |
+ // TODO(alexeypa): Update only the changed area if possible. |
+ rectangle_decoder_->RefreshFullFrame(); |
} |
+} |
- rectangle_decoder_->UpdateClipRect( |
- SkIRect::MakeXYWH(clip.x(), clip.y(), clip.width(), clip.height())); |
+void ChromotingInstance::RefreshFullFrame() { |
+ rectangle_decoder_->RefreshFullFrame(); |
} |
bool ChromotingInstance::HandleInputEvent(const pp::InputEvent& event) { |
@@ -222,7 +227,7 @@ bool ChromotingInstance::HandleInputEvent(const pp::InputEvent& event) { |
// TODO(wez): When we have a good hook into Host dimensions changes, move |
// this there. |
- 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); |
} |