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 #ifndef UI_GFX_SKIA_UTIL_H_ | 5 #ifndef UI_GFX_SKIA_UTIL_H_ |
6 #define UI_GFX_SKIA_UTIL_H_ | 6 #define UI_GFX_SKIA_UTIL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 | 81 |
82 // Returns true if the two bitmaps contain the same pixels. | 82 // Returns true if the two bitmaps contain the same pixels. |
83 GFX_EXPORT bool BitmapsAreEqual(const SkBitmap& bitmap1, | 83 GFX_EXPORT bool BitmapsAreEqual(const SkBitmap& bitmap1, |
84 const SkBitmap& bitmap2); | 84 const SkBitmap& bitmap2); |
85 | 85 |
86 // Converts Skia ARGB format pixels in |skia| to RGBA. | 86 // Converts Skia ARGB format pixels in |skia| to RGBA. |
87 GFX_EXPORT void ConvertSkiaToRGBA(const unsigned char* skia, | 87 GFX_EXPORT void ConvertSkiaToRGBA(const unsigned char* skia, |
88 int pixel_width, | 88 int pixel_width, |
89 unsigned char* rgba); | 89 unsigned char* rgba); |
90 | 90 |
| 91 // Converts a Skia floating-point value to an int appropriate for hb_position_t. |
| 92 GFX_EXPORT int SkiaScalarToHarfBuzzUnits(SkScalar value); |
| 93 |
| 94 // Converts an hb_position_t to a Skia floating-point value. |
| 95 GFX_EXPORT SkScalar HarfBuzzUnitsToSkiaScalar(int value); |
| 96 |
| 97 // Converts an hb_position_t to a float. |
| 98 GFX_EXPORT float HarfBuzzUnitsToFloat(int value); |
| 99 |
91 } // namespace gfx | 100 } // namespace gfx |
92 | 101 |
93 #endif // UI_GFX_SKIA_UTIL_H_ | 102 #endif // UI_GFX_SKIA_UTIL_H_ |
OLD | NEW |