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