Chromium Code Reviews| 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 #ifndef REMOTING_BASE_UTIL_H_ | 5 #ifndef REMOTING_BASE_UTIL_H_ |
| 6 #define REMOTING_BASE_UTIL_H_ | 6 #define REMOTING_BASE_UTIL_H_ |
| 7 | 7 |
| 8 #include "media/base/video_frame.h" | 8 #include "media/base/video_frame.h" |
| 9 #include "third_party/skia/include/core/SkRect.h" | 9 #include "third_party/skia/include/core/SkRect.h" |
| 10 | 10 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 45 int height, | 45 int height, |
| 46 int rgb_stride, | 46 int rgb_stride, |
| 47 int y_stride, | 47 int y_stride, |
| 48 int uv_stride); | 48 int uv_stride); |
| 49 | 49 |
| 50 int RoundToTwosMultiple(int x); | 50 int RoundToTwosMultiple(int x); |
| 51 | 51 |
| 52 // Align the sides of the rectangle to multiples of 2 (expanding outwards). | 52 // Align the sides of the rectangle to multiples of 2 (expanding outwards). |
| 53 SkIRect AlignRect(const SkIRect& rect); | 53 SkIRect AlignRect(const SkIRect& rect); |
| 54 | 54 |
| 55 // Return a scaled rectangle using the horizontal and vertical scale | 55 // Return a scaled rectangle using the horizontal and vertical scale |
|
Sergey Ulanov
2011/12/20 00:05:35
please update this comment
Wez
2011/12/20 07:14:14
Done.
| |
| 56 // factors. | 56 // factors. |
| 57 SkIRect ScaleRect(const SkIRect& rect, | 57 SkIRect ScaleRect(const SkIRect& rect, |
| 58 double horizontal_ratio, | 58 const SkISize& in_size, |
| 59 double vertical_ratio); | 59 const SkISize& out_size); |
| 60 | 60 |
| 61 // Copy pixels in the rectangle from source to destination. | 61 // Copy pixels in the rectangle from source to destination. |
| 62 void CopyRect(const uint8* src_plane, | 62 void CopyRect(const uint8* src_plane, |
| 63 int src_plane_stride, | 63 int src_plane_stride, |
| 64 uint8* dest_plane, | 64 uint8* dest_plane, |
| 65 int dest_plane_stride, | 65 int dest_plane_stride, |
| 66 int bytes_per_pixel, | 66 int bytes_per_pixel, |
| 67 const SkIRect& rect); | 67 const SkIRect& rect); |
| 68 | 68 |
| 69 } // namespace remoting | 69 } // namespace remoting |
| 70 | 70 |
| 71 #endif // REMOTING_BASE_UTIL_H_ | 71 #endif // REMOTING_BASE_UTIL_H_ |
| OLD | NEW |