OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 SKIA_EXT_SKIA_UTILS_BASE_H_ | 5 #ifndef SKIA_EXT_SKIA_UTILS_BASE_H_ |
6 #define SKIA_EXT_SKIA_UTILS_BASE_H_ | 6 #define SKIA_EXT_SKIA_UTILS_BASE_H_ |
7 | 7 |
8 #include "base/pickle.h" | 8 #include "base/pickle.h" |
9 #include "third_party/skia/include/ports/SkFontConfigInterface.h" | 9 #include "third_party/skia/include/ports/SkFontConfigInterface.h" |
10 #include "third_party/skia/include/core/SkFontHost.h" | 10 #include "third_party/skia/include/core/SkFontHost.h" |
11 #include "third_party/skia/include/core/SkSurfaceProps.h" | 11 #include "third_party/skia/include/core/SkSurfaceProps.h" |
12 | 12 |
13 namespace skia { | 13 namespace skia { |
14 | 14 |
15 // Return true if the pickle/iterator contains a string. If so, and if str | 15 // Return true if the pickle/iterator contains a string. If so, and if str |
16 // is not null, copy that string into str. | 16 // is not null, copy that string into str. |
17 SK_API bool ReadSkString(base::PickleIterator* iter, SkString* str); | 17 SK_API bool ReadSkString(base::PickleIterator* iter, SkString* str); |
18 | 18 |
19 // Return true if the pickle/iterator contains a FontIdentity. If so, and if | 19 // Return true if the pickle/iterator contains a FontIdentity. If so, and if |
20 // identity is not null, copy it into identity. | 20 // identity is not null, copy it into identity. |
21 SK_API bool ReadSkFontIdentity(base::PickleIterator* iter, | 21 SK_API bool ReadSkFontIdentity(base::PickleIterator* iter, |
22 SkFontConfigInterface::FontIdentity* identity); | 22 SkFontConfigInterface::FontIdentity* identity); |
23 | 23 |
| 24 // Return true if the pickle/iterator contains a SkFontStyle. If so, and if |
| 25 // style is not null, copy it into style. |
| 26 SK_API bool ReadSkFontStyle(base::PickleIterator* iter, SkFontStyle* style); |
| 27 |
24 // Return true if str can be written into the request pickle. | 28 // Return true if str can be written into the request pickle. |
25 SK_API bool WriteSkString(base::Pickle* pickle, const SkString& str); | 29 SK_API bool WriteSkString(base::Pickle* pickle, const SkString& str); |
26 | 30 |
27 // Return true if identity can be written into the request pickle. | 31 // Return true if identity can be written into the request pickle. |
28 SK_API bool WriteSkFontIdentity( | 32 SK_API bool WriteSkFontIdentity( |
29 base::Pickle* pickle, | 33 base::Pickle* pickle, |
30 const SkFontConfigInterface::FontIdentity& identity); | 34 const SkFontConfigInterface::FontIdentity& identity); |
31 | 35 |
| 36 // Return true if str can be written into the request pickle. |
| 37 SK_API bool WriteSkFontStyle(base::Pickle* pickle, SkFontStyle style); |
| 38 |
32 // Determine the default pixel geometry (for LCD) by querying the font host | 39 // Determine the default pixel geometry (for LCD) by querying the font host |
33 SK_API SkPixelGeometry ComputeDefaultPixelGeometry(); | 40 SK_API SkPixelGeometry ComputeDefaultPixelGeometry(); |
34 | 41 |
35 } // namespace skia | 42 } // namespace skia |
36 | 43 |
37 #endif // SKIA_EXT_SKIA_UTILS_BASE_H_ | 44 #endif // SKIA_EXT_SKIA_UTILS_BASE_H_ |
38 | 45 |
OLD | NEW |