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 "ui/gfx/rect.h" | 10 #include "ui/gfx/rect.h" |
10 | 11 |
11 namespace remoting { | 12 namespace remoting { |
12 | 13 |
13 std::string GetTimestampString(); | 14 std::string GetTimestampString(); |
14 | 15 |
15 // TODO(sergeyu): Move these methods to media. | 16 // TODO(sergeyu): Move these methods to media. |
16 int GetBytesPerPixel(media::VideoFrame::Format format); | 17 int GetBytesPerPixel(media::VideoFrame::Format format); |
17 | 18 |
18 // Convert YUV to RGB32 on a specific rectangle. | 19 // Convert YUV to RGB32 on a specific rectangle. |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 gfx::Rect ScaleRect(const gfx::Rect& rect, | 58 gfx::Rect ScaleRect(const gfx::Rect& rect, |
58 double horizontal_ratio, | 59 double horizontal_ratio, |
59 double vertical_ratio); | 60 double vertical_ratio); |
60 | 61 |
61 // Copy pixels in the rectangle from source to destination. | 62 // Copy pixels in the rectangle from source to destination. |
62 void CopyRect(const uint8* src_plane, | 63 void CopyRect(const uint8* src_plane, |
63 int src_plane_stride, | 64 int src_plane_stride, |
64 uint8* dest_plane, | 65 uint8* dest_plane, |
65 int dest_plane_stride, | 66 int dest_plane_stride, |
66 int bytes_per_pixel, | 67 int bytes_per_pixel, |
67 const gfx::Rect& rect); | 68 const SkIRect& rect); |
68 | 69 |
69 } // namespace remoting | 70 } // namespace remoting |
70 | 71 |
71 #endif // REMOTING_BASE_UTIL_H_ | 72 #endif // REMOTING_BASE_UTIL_H_ |
OLD | NEW |