| 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/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 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 const int output_stride = frame_->stride(media::VideoFrame::kRGBPlane); | 215 const int output_stride = frame_->stride(media::VideoFrame::kRGBPlane); |
| 216 | 216 |
| 217 output_rects->reserve(input_rects.size()); | 217 output_rects->reserve(input_rects.size()); |
| 218 | 218 |
| 219 for (size_t i = 0; i < input_rects.size(); ++i) { | 219 for (size_t i = 0; i < input_rects.size(); ++i) { |
| 220 // Determine the scaled area affected by this rectangle changing. | 220 // Determine the scaled area affected by this rectangle changing. |
| 221 SkIRect output_rect = ScaleRect(input_rects[i], image_size, output_size_); | 221 SkIRect output_rect = ScaleRect(input_rects[i], image_size, output_size_); |
| 222 if (!output_rect.intersect(clip_rect)) | 222 if (!output_rect.intersect(clip_rect)) |
| 223 continue; | 223 continue; |
| 224 | 224 |
| 225 // The scaler will not read outside the input dimensions. | 225 // The scaler will not to read outside the input dimensions. |
| 226 ScaleYUVToRGB32WithRect(last_image_->planes[0], | 226 media::ScaleYUVToRGB32WithRect(last_image_->planes[0], |
| 227 last_image_->planes[1], | 227 last_image_->planes[1], |
| 228 last_image_->planes[2], | 228 last_image_->planes[2], |
| 229 output_rgb_buf, | 229 output_rgb_buf, |
| 230 input_rects[i], | 230 image_size.width(), |
| 231 output_rect, | 231 image_size.height(), |
| 232 last_image_->stride[0], | 232 output_size_.width(), |
| 233 last_image_->stride[1], | 233 output_size_.height(), |
| 234 output_stride); | 234 output_rect.x(), |
| 235 output_rect.y(), |
| 236 output_rect.right(), |
| 237 output_rect.bottom(), |
| 238 last_image_->stride[0], |
| 239 last_image_->stride[1], |
| 240 output_stride); |
| 235 output_rects->push_back(output_rect); | 241 output_rects->push_back(output_rect); |
| 236 } | 242 } |
| 237 } | 243 } |
| 238 | 244 |
| 239 } // namespace remoting | 245 } // namespace remoting |
| OLD | NEW |