diff options
author | Iain Merrick <husky@google.com> | 2010-09-13 16:35:48 +0100 |
---|---|---|
committer | Iain Merrick <husky@google.com> | 2010-09-16 12:10:42 +0100 |
commit | 5abb8606fa57c3ebfc8b3c3dbc3fa4a25d2ae306 (patch) | |
tree | ddce1aa5e3b6967a69691892e500897558ff8ab6 /WebCore/platform/graphics/cairo/OwnPtrCairo.cpp | |
parent | 12bec63ec71e46baba27f0bd9bd9d8067683690a (diff) | |
download | external_webkit-5abb8606fa57c3ebfc8b3c3dbc3fa4a25d2ae306.zip external_webkit-5abb8606fa57c3ebfc8b3c3dbc3fa4a25d2ae306.tar.gz external_webkit-5abb8606fa57c3ebfc8b3c3dbc3fa4a25d2ae306.tar.bz2 |
Merge WebKit at r67178 : Initial merge by git.
Change-Id: I57e01163b6866cb029cdadf405a0394a3918bc18
Diffstat (limited to 'WebCore/platform/graphics/cairo/OwnPtrCairo.cpp')
-rw-r--r-- | WebCore/platform/graphics/cairo/OwnPtrCairo.cpp | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/WebCore/platform/graphics/cairo/OwnPtrCairo.cpp b/WebCore/platform/graphics/cairo/OwnPtrCairo.cpp new file mode 100644 index 0000000..9be8670 --- /dev/null +++ b/WebCore/platform/graphics/cairo/OwnPtrCairo.cpp @@ -0,0 +1,50 @@ +/* + * Copyright (C) 2010 Collabora Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free + * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301 USA + */ + +#include "config.h" +#include "OwnPtrCairo.h" + +#if defined(USE_FREETYPE) +#include <cairo-ft.h> +#include <fontconfig/fcfreetype.h> +#endif + +namespace WTF { + +#if defined(USE_FREETYPE) +template <> void deleteOwnedPtr<FcPattern>(FcPattern* ptr) +{ + if (ptr) + FcPatternDestroy(ptr); +} + +template <> void deleteOwnedPtr<FcObjectSet>(FcObjectSet* ptr) +{ + if (ptr) + FcObjectSetDestroy(ptr); +} + +template <> void deleteOwnedPtr<FcFontSet>(FcFontSet* ptr) +{ + if (ptr) + FcFontSetDestroy(ptr); +} +#endif + +} // namespace WTF |