OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 i = buffers_.erase(i); | 215 i = buffers_.erase(i); |
216 } else { | 216 } else { |
217 ++i; | 217 ++i; |
218 } | 218 } |
219 } | 219 } |
220 | 220 |
221 SchedulePaint(); | 221 SchedulePaint(); |
222 } | 222 } |
223 } | 223 } |
224 | 224 |
| 225 const SkRegion* RectangleUpdateDecoder::GetBufferShape() { |
| 226 return decoder_->GetImageShape(); |
| 227 } |
| 228 |
225 void RectangleUpdateDecoder::ProcessVideoPacket(scoped_ptr<VideoPacket> packet, | 229 void RectangleUpdateDecoder::ProcessVideoPacket(scoped_ptr<VideoPacket> packet, |
226 const base::Closure& done) { | 230 const base::Closure& done) { |
227 DCHECK(main_task_runner_->BelongsToCurrentThread()); | 231 DCHECK(main_task_runner_->BelongsToCurrentThread()); |
228 | 232 |
229 // If the video packet is empty then drop it. Empty packets are used to | 233 // If the video packet is empty then drop it. Empty packets are used to |
230 // maintain activity on the network. | 234 // maintain activity on the network. |
231 if (!packet->has_data() || packet->data().size() == 0) { | 235 if (!packet->has_data() || packet->data().size() == 0) { |
232 done.Run(); | 236 done.Run(); |
233 return; | 237 return; |
234 } | 238 } |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 | 289 |
286 done.Run(); | 290 done.Run(); |
287 } | 291 } |
288 | 292 |
289 ChromotingStats* RectangleUpdateDecoder::GetStats() { | 293 ChromotingStats* RectangleUpdateDecoder::GetStats() { |
290 DCHECK(main_task_runner_->BelongsToCurrentThread()); | 294 DCHECK(main_task_runner_->BelongsToCurrentThread()); |
291 return &stats_; | 295 return &stats_; |
292 } | 296 } |
293 | 297 |
294 } // namespace remoting | 298 } // namespace remoting |
OLD | NEW |