diff options
Diffstat (limited to 'WebCore/platform/graphics/cairo/RefPtrCairo.cpp')
-rw-r--r-- | WebCore/platform/graphics/cairo/RefPtrCairo.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/WebCore/platform/graphics/cairo/RefPtrCairo.cpp b/WebCore/platform/graphics/cairo/RefPtrCairo.cpp index a6c983e..c8b242c 100644 --- a/WebCore/platform/graphics/cairo/RefPtrCairo.cpp +++ b/WebCore/platform/graphics/cairo/RefPtrCairo.cpp @@ -76,6 +76,18 @@ template<> void derefIfNotNull(cairo_scaled_font_t* ptr) cairo_scaled_font_destroy(ptr); } +template<> void refIfNotNull(cairo_pattern_t* ptr) +{ + if (LIKELY(ptr != 0)) + cairo_pattern_reference(ptr); +} + +template<> void derefIfNotNull(cairo_pattern_t* ptr) +{ + if (LIKELY(ptr != 0)) + cairo_pattern_destroy(ptr); +} + #if defined(USE_FREETYPE) template<> void refIfNotNull(FcPattern* ptr) { |