summaryrefslogtreecommitdiffstats
path: root/remoting/client/rectangle_update_decoder.cc
diff options
context:
space:
mode:
authorwez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-22 10:20:33 +0000
committerwez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-22 10:20:33 +0000
commit15e7b6c7f10e09714e47179015acce8ba87164e8 (patch)
tree5c4951dab6847f5652ad087e0027fbb1df3706ec /remoting/client/rectangle_update_decoder.cc
parent6bede3d585e84feb3b21f97d0b09559b40b21af9 (diff)
downloadchromium_src-15e7b6c7f10e09714e47179015acce8ba87164e8.zip
chromium_src-15e7b6c7f10e09714e47179015acce8ba87164e8.tar.gz
chromium_src-15e7b6c7f10e09714e47179015acce8ba87164e8.tar.bz2
Refactoring of the client-side input pipeline and scaling dimension management.
The main changes are: * Express key-release, mouse coordinate scaling and clamping as InputStubs. * KeyEventTracker handles key release. * MouseInputFilter handles mouse scaling & clamping. * PepperInputHandler converts Pepper events to InputStub events. * Replace scaling ratios with host and view dimensions. This resulted in some related changes * The DecoderVp8 enforces a <=1:1 output-size before converting the frame. * The setScaleToFit() API now has no effect. * ChromotingView has become a pure interface again. Things this CL is currently missing: * Unit-tests for the new components. Future work: * Move the non-Pepper-specific input pipeline components to ChromotingClient. * Rework the decode / convert / scale / render pipeline. BUG=93552 TEST=remoting_unittests, and manual testing. Review URL: http://codereview.chromium.org/8985007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115511 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/client/rectangle_update_decoder.cc')
-rw-r--r--remoting/client/rectangle_update_decoder.cc16
1 files changed, 7 insertions, 9 deletions
diff --git a/remoting/client/rectangle_update_decoder.cc b/remoting/client/rectangle_update_decoder.cc
index 09dfb4c..8b7ca9e 100644
--- a/remoting/client/rectangle_update_decoder.cc
+++ b/remoting/client/rectangle_update_decoder.cc
@@ -131,12 +131,11 @@ void RectangleUpdateDecoder::ProcessPacketData(
SubmitToConsumer();
}
-void RectangleUpdateDecoder::SetScaleRatios(double horizontal_ratio,
- double vertical_ratio) {
+void RectangleUpdateDecoder::SetOutputSize(const SkISize& size) {
if (message_loop_ != MessageLoop::current()) {
message_loop_->PostTask(
- FROM_HERE, base::Bind(&RectangleUpdateDecoder::SetScaleRatios,
- this, horizontal_ratio, vertical_ratio));
+ FROM_HERE, base::Bind(&RectangleUpdateDecoder::SetOutputSize,
+ this, size));
return;
}
@@ -149,11 +148,10 @@ void RectangleUpdateDecoder::SetScaleRatios(double horizontal_ratio,
// TODO(hclam): If the scale ratio has changed we should reallocate a
// VideoFrame of different size. However if the scale ratio is always
// smaller than 1.0 we can use the same video frame.
- decoder_->SetScaleRatios(horizontal_ratio, vertical_ratio);
-
- // TODO(wez): Defer refresh, so that resize, which will affect both scale
- // factor and clip rect, doesn't lead to unnecessary refreshes.
- DoRefresh();
+ if (decoder_.get()) {
+ decoder_->SetOutputSize(size);
+ RefreshFullFrame();
+ }
}
void RectangleUpdateDecoder::UpdateClipRect(const SkIRect& new_clip_rect) {