Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(328)

Side by Side Diff: ui/gfx/skia_util.h

Issue 1752953003: Replace uses of SkFixed for HarfBuzz conversions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/gfx/render_text_harfbuzz.cc ('k') | ui/gfx/skia_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « ui/gfx/render_text_harfbuzz.cc ('k') | ui/gfx/skia_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698