| 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/base/decoder_vp8.h" | 5 #include "remoting/base/decoder_vp8.h" |
| 6 | 6 |
| 7 #include <math.h> | 7 #include <math.h> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "media/base/media.h" | 10 #include "media/base/media.h" |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 output_rects->reserve(input_rects.size()); | 223 output_rects->reserve(input_rects.size()); |
| 224 | 224 |
| 225 for (size_t i = 0; i < input_rects.size(); ++i) { | 225 for (size_t i = 0; i < input_rects.size(); ++i) { |
| 226 // Determine the scaled area affected by this rectangle changing. | 226 // Determine the scaled area affected by this rectangle changing. |
| 227 SkIRect output_rect = ScaleRect(input_rects[i], | 227 SkIRect output_rect = ScaleRect(input_rects[i], |
| 228 horizontal_scale_ratio_, | 228 horizontal_scale_ratio_, |
| 229 vertical_scale_ratio_); | 229 vertical_scale_ratio_); |
| 230 if (!output_rect.intersect(clip_rect)) | 230 if (!output_rect.intersect(clip_rect)) |
| 231 continue; | 231 continue; |
| 232 | 232 |
| 233 // The scaler will not read outside the input dimensions. | 233 // The scaler will not to read outside the input dimensions. |
| 234 ScaleYUVToRGB32WithRect(last_image_->planes[0], | 234 media::ScaleYUVToRGB32WithRect(last_image_->planes[0], |
| 235 last_image_->planes[1], | 235 last_image_->planes[1], |
| 236 last_image_->planes[2], | 236 last_image_->planes[2], |
| 237 output_rgb_buf, | 237 output_rgb_buf, |
| 238 input_rects[i], | 238 image_size.width(), |
| 239 output_rect, | 239 image_size.height(), |
| 240 last_image_->stride[0], | 240 output_size_.width(), |
| 241 last_image_->stride[1], | 241 output_size_.height(), |
| 242 output_stride); | 242 output_rect.x(), |
| 243 output_rect.y(), |
| 244 output_rect.right(), |
| 245 output_rect.bottom(), |
| 246 last_image_->stride[0], |
| 247 last_image_->stride[1], |
| 248 output_stride); |
| 243 output_rects->push_back(output_rect); | 249 output_rects->push_back(output_rect); |
| 244 } | 250 } |
| 245 } | 251 } |
| 246 | 252 |
| 247 } // namespace remoting | 253 } // namespace remoting |
| OLD | NEW |