OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "remoting/client/rectangle_update_decoder.h" | 5 #include "remoting/client/rectangle_update_decoder.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "remoting/base/decoder.h" | 10 #include "remoting/base/decoder.h" |
11 #include "remoting/base/decoder_row_based.h" | 11 #include "remoting/base/decoder_row_based.h" |
12 #include "remoting/base/decoder_vp8.h" | 12 #include "remoting/base/decoder_vp8.h" |
13 #include "remoting/base/util.h" | 13 #include "remoting/base/util.h" |
14 #include "remoting/client/frame_consumer.h" | 14 #include "remoting/client/frame_consumer.h" |
15 #include "remoting/protocol/session_config.h" | 15 #include "remoting/protocol/session_config.h" |
16 | 16 |
17 using remoting::protocol::ChannelConfig; | 17 using remoting::protocol::ChannelConfig; |
18 using remoting::protocol::SessionConfig; | 18 using remoting::protocol::SessionConfig; |
19 | 19 |
20 namespace remoting { | 20 namespace remoting { |
21 | 21 |
22 RectangleUpdateDecoder::RectangleUpdateDecoder(MessageLoop* message_loop, | 22 RectangleUpdateDecoder::RectangleUpdateDecoder(MessageLoop* message_loop, |
23 FrameConsumer* consumer) | 23 FrameConsumer* consumer) |
24 : message_loop_(message_loop), | 24 : message_loop_(message_loop), |
25 consumer_(consumer), | 25 consumer_(consumer), |
| 26 initial_screen_size_(SkISize::Make(0, 0)), |
| 27 clip_rect_(SkIRect::MakeEmpty()), |
26 frame_is_new_(false), | 28 frame_is_new_(false), |
27 frame_is_consuming_(false) { | 29 frame_is_consuming_(false) { |
28 } | 30 } |
29 | 31 |
30 RectangleUpdateDecoder::~RectangleUpdateDecoder() { | 32 RectangleUpdateDecoder::~RectangleUpdateDecoder() { |
31 } | 33 } |
32 | 34 |
33 void RectangleUpdateDecoder::Initialize(const SessionConfig& config) { | 35 void RectangleUpdateDecoder::Initialize(const SessionConfig& config) { |
34 initial_screen_size_ = SkISize::Make(config.initial_resolution().width, | 36 initial_screen_size_ = SkISize::Make(config.initial_resolution().width, |
35 config.initial_resolution().height); | 37 config.initial_resolution().height); |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 return; | 231 return; |
230 } | 232 } |
231 | 233 |
232 delete rects; | 234 delete rects; |
233 | 235 |
234 frame_is_consuming_ = false; | 236 frame_is_consuming_ = false; |
235 DoRefresh(); | 237 DoRefresh(); |
236 } | 238 } |
237 | 239 |
238 } // namespace remoting | 240 } // namespace remoting |
OLD | NEW |