12a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// Copyright (c) 2013 The Chromium Authors. All rights reserved. 22a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be 32a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// found in the LICENSE file. 42a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 52a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#ifndef SKIA_EXT_SKIA_UTILS_BASE_H_ 62a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#define SKIA_EXT_SKIA_UTILS_BASE_H_ 72a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 82a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#include "base/pickle.h" 92a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#include "third_party/skia/include/ports/SkFontConfigInterface.h" 102a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 112a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)namespace skia { 122a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 132a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// Return true if the pickle/iterator contains a string. If so, and if str 142a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// is not null, copy that string into str. 152a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)SK_API bool ReadSkString(const Pickle& pickle, PickleIterator* iter, 162a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) SkString* str); 172a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 182a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// Return true if the pickle/iterator contains a FontIdentity. If so, and if 192a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// identity is not null, copy it into identity. 202a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)SK_API bool ReadSkFontIdentity(const Pickle& pickle, PickleIterator* iter, 212a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) SkFontConfigInterface::FontIdentity* identity); 222a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 232a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// Return true if str can be written into the request pickle. 242a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)SK_API bool WriteSkString(Pickle* pickle, const SkString& str); 252a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 262a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// Return true if identity can be written into the request pickle. 272a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)SK_API bool WriteSkFontIdentity(Pickle* pickle, 282a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) const SkFontConfigInterface::FontIdentity& identity); 292a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 302a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)} // namespace skia 312a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 322a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#endif // SKIA_EXT_SKIA_UTILS_BASE_H_ 332a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 34