Split cairo-pattern-private into struct+inlines

References: https://bugs.freedesktop.org/show_bug.cgi?id=48577
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2012-04-19 11:59:54 +01:00
parent 306117ea7c
commit 2e7d60e0a2
8 changed files with 69 additions and 25 deletions

View file

@ -94,6 +94,7 @@ cairo_private = \
cairo-paginated-surface-private.h \
cairo-path-fixed-private.h \
cairo-path-private.h \
cairo-pattern-inline.h \
cairo-pattern-private.h \
cairo-private.h \
cairo-recording-surface-inline.h \

View file

@ -48,7 +48,7 @@
#include "cairo-compositor-private.h"
#include "cairo-error-private.h"
#include "cairo-pattern-private.h"
#include "cairo-pattern-inline.h"
#include "cairo-paginated-private.h"
#include "cairo-recording-surface-private.h"
#include "cairo-surface-observer-private.h"

View file

@ -48,7 +48,7 @@
#include "cairo-clip-inline.h"
#include "cairo-compositor-private.h"
#include "cairo-image-surface-private.h"
#include "cairo-pattern-private.h"
#include "cairo-pattern-inline.h"
#include "cairo-region-private.h"
#include "cairo-surface-observer-private.h"
#include "cairo-surface-offset-private.h"

View file

@ -0,0 +1,63 @@
/* cairo - a vector graphics library with display and print output
*
* Copyright © 2005 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it either under the terms of the GNU Lesser General Public
* License version 2.1 as published by the Free Software Foundation
* (the "LGPL") or, at your option, under the terms of the Mozilla
* Public License Version 1.1 (the "MPL"). If you do not alter this
* notice, a recipient may use your version of this file under either
* the MPL or the LGPL.
*
* You should have received a copy of the LGPL along with this library
* in the file COPYING-LGPL-2.1; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA
* You should have received a copy of the MPL along with this library
* in the file COPYING-MPL-1.1
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
* OF ANY KIND, either express or implied. See the LGPL or the MPL for
* the specific language governing rights and limitations.
*
* The Original Code is the cairo graphics library.
*
* The Initial Developer of the Original Code is Red Hat, Inc.
*
* Contributor(s):
* Carl D. Worth <cworth@redhat.com>
*/
#ifndef CAIRO_PATTERN_INLINE_H
#define CAIRO_PATTERN_INLINE_H
#include "cairo-pattern-private.h"
CAIRO_BEGIN_DECLS
static inline void
_cairo_pattern_add_observer (cairo_pattern_t *pattern,
cairo_pattern_observer_t *observer,
void (*func) (cairo_pattern_observer_t *,
cairo_pattern_t *,
unsigned int))
{
observer->notify = func;
cairo_list_add (&observer->link, &pattern->observers);
}
static inline cairo_surface_t *
_cairo_pattern_get_source (const cairo_surface_pattern_t *pattern,
cairo_rectangle_int_t *extents)
{
return _cairo_surface_get_source (pattern->surface, extents);
}
CAIRO_END_DECLS
#endif /* CAIRO_PATTERN_INLINE_H */

View file

@ -327,17 +327,6 @@ cairo_private cairo_bool_t
_cairo_pattern_equal (const cairo_pattern_t *a,
const cairo_pattern_t *b);
static inline void
_cairo_pattern_add_observer (cairo_pattern_t *pattern,
cairo_pattern_observer_t *observer,
void (*func) (cairo_pattern_observer_t *,
cairo_pattern_t *,
unsigned int))
{
observer->notify = func;
cairo_list_add (&observer->link, &pattern->observers);
}
/* cairo-mesh-pattern-rasterizer.c */
cairo_private void
@ -371,15 +360,6 @@ _cairo_raster_source_pattern_finish (cairo_pattern_t *abstract_pattern);
cairo_private void
_cairo_debug_print_pattern (FILE *file, const cairo_pattern_t *pattern);
static inline cairo_surface_t *
_cairo_pattern_get_source (const cairo_surface_pattern_t *pattern,
cairo_rectangle_int_t *extents)
{
return _cairo_surface_get_source (pattern->surface, extents);
}
CAIRO_END_DECLS
#endif /* CAIRO_PATTERN_PRIVATE */

View file

@ -46,7 +46,7 @@
#include "cairo-clip-private.h"
#include "cairo-image-surface-private.h"
#include "cairo-paginated-private.h"
#include "cairo-pattern-private.h"
#include "cairo-pattern-inline.h"
#include "cairo-region-private.h"
#include "cairo-recording-surface-inline.h"
#include "cairo-spans-compositor-private.h"

View file

@ -49,7 +49,7 @@
#include "cairo-compositor-private.h"
#include "cairo-error-private.h"
#include "cairo-image-surface-private.h"
#include "cairo-pattern-private.h"
#include "cairo-pattern-inline.h"
#include "cairo-paginated-private.h"
#include "cairo-recording-surface-inline.h"
#include "cairo-surface-subsurface-private.h"

View file

@ -48,7 +48,7 @@
#include "cairo-error-private.h"
#include "cairo-image-surface-private.h"
#include "cairo-paginated-private.h"
#include "cairo-pattern-private.h"
#include "cairo-pattern-inline.h"
#include "cairo-recording-surface-private.h"
#include "cairo-surface-backend-private.h"
#include "cairo-surface-offset-private.h"