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

Unified Diff: remoting/client/rectangle_update_decoder.cc

Issue 8985007: Refactoring of the client-side input pipeline and scaling dimension management. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 9 years 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/rectangle_update_decoder.cc
diff --git a/remoting/client/rectangle_update_decoder.cc b/remoting/client/rectangle_update_decoder.cc
index 09dfb4cf7449148887d5199aa2eb503129872e28..8b7ca9e52ea38e326609120b3efe265c84dcfac4 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) {

Powered by Google App Engine
This is Rietveld 408576698