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
3 // found in the LICENSE file.
5 #ifndef SKIA_EXT_SKIA_UTILS_BASE_H_
6 #define SKIA_EXT_SKIA_UTILS_BASE_H_
8 #include "base/pickle.h"
9 #include "third_party/skia/include/ports/SkFontConfigInterface.h"
10 #include "third_party/skia/include/core/SkFontHost.h"
11 #include "third_party/skia/include/core/SkSurfaceProps.h"
15 // Return true if the pickle/iterator contains a string. If so, and if str
16 // is not null, copy that string into str.
17 SK_API
bool ReadSkString(base::PickleIterator
* iter
, SkString
* str
);
19 // Return true if the pickle/iterator contains a FontIdentity. If so, and if
20 // identity is not null, copy it into identity.
21 SK_API
bool ReadSkFontIdentity(base::PickleIterator
* iter
,
22 SkFontConfigInterface::FontIdentity
* identity
);
24 // Return true if str can be written into the request pickle.
25 SK_API
bool WriteSkString(base::Pickle
* pickle
, const SkString
& str
);
27 // Return true if identity can be written into the request pickle.
28 SK_API
bool WriteSkFontIdentity(
30 const SkFontConfigInterface::FontIdentity
& identity
);
32 // Determine the default pixel geometry (for LCD) by querying the font host
33 SK_API SkPixelGeometry
ComputeDefaultPixelGeometry();
37 #endif // SKIA_EXT_SKIA_UTILS_BASE_H_