summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorUli Schlachter <psychon@znc.in>2023-02-05 16:15:25 +0100
committerUli Schlachter <psychon@znc.in>2023-02-05 16:15:25 +0100
commit6f205ed28f29d429c28f3c544f85a90eea47ad34 (patch)
tree35ef1f29bcefc6e7cbb114ebfa27c91ac3f6b772 /src
parent338eca43428d1956216362eeb8e1715bac99d876 (diff)
downloadcairo-6f205ed28f29d429c28f3c544f85a90eea47ad34.tar.gz
Remove unused _cairo_tee_surface_find_match
A little history digging shows that we only ever had one caller of _cairo_tee_surface_find_match. Commit 658cdc7c9a "Introduce cairo_tee_surface_t" added this code to _cairo_surface_clone_similar(): if (src->type == CAIRO_SURFACE_TYPE_TEE) { cairo_surface_t *match; match = _cairo_tee_surface_find_match (src, surface->backend, content); if (match != NULL) src = match; } Then, two years later in 2011, commit af9fbd176b1 "Introduce a new compositor architecture" removed _cairo_surface_clone_similar() and thus this code became unused. This commit drops this unused code. Signed-off-by: Uli Schlachter <psychon@znc.in>
Diffstat (limited to 'src')
-rw-r--r--src/cairo-surface.c1
-rw-r--r--src/cairo-tee-surface-private.h47
-rw-r--r--src/cairo-tee-surface.c41
3 files changed, 0 insertions, 89 deletions
diff --git a/src/cairo-surface.c b/src/cairo-surface.c
index 609eb9ccf..f1292e0bb 100644
--- a/src/cairo-surface.c
+++ b/src/cairo-surface.c
@@ -49,7 +49,6 @@
#include "cairo-recording-surface-private.h"
#include "cairo-region-private.h"
#include "cairo-surface-inline.h"
-#include "cairo-tee-surface-private.h"
/**
* SECTION:cairo-surface
diff --git a/src/cairo-tee-surface-private.h b/src/cairo-tee-surface-private.h
deleted file mode 100644
index a83cfc959..000000000
--- a/src/cairo-tee-surface-private.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2009 Chris Wilson
- *
- * 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 University of Southern
- * California.
- *
- * Contributor(s):
- * Chris Wilson <chris@chris-wilson.co.uk>
- */
-
-#ifndef CAIRO_TEE_SURFACE_PRIVATE_H
-#define CAIRO_TEE_SURFACE_PRIVATE_H
-
-#include "cairoint.h"
-
-cairo_private cairo_surface_t *
-_cairo_tee_surface_find_match (void *abstract_surface,
- const cairo_surface_backend_t *backend,
- cairo_content_t content);
-
-#endif /* CAIRO_TEE_SURFACE_PRIVATE_H */
diff --git a/src/cairo-tee-surface.c b/src/cairo-tee-surface.c
index 4994a5a60..1d075a29c 100644
--- a/src/cairo-tee-surface.c
+++ b/src/cairo-tee-surface.c
@@ -44,7 +44,6 @@
#include "cairo-default-context-private.h"
#include "cairo-error-private.h"
-#include "cairo-tee-surface-private.h"
#include "cairo-recording-surface-inline.h"
#include "cairo-surface-wrapper-private.h"
#include "cairo-array-private.h"
@@ -565,43 +564,3 @@ cairo_tee_surface_index (cairo_surface_t *abstract_surface,
return slave->target;
}
}
-
-cairo_surface_t *
-_cairo_tee_surface_find_match (void *abstract_surface,
- const cairo_surface_backend_t *backend,
- cairo_content_t content)
-{
- cairo_tee_surface_t *surface = abstract_surface;
- cairo_surface_wrapper_t *slaves;
- int num_slaves, n;
-
- /* exact match first */
- if (surface->master.target->backend == backend &&
- surface->master.target->content == content)
- {
- return surface->master.target;
- }
-
- num_slaves = _cairo_array_num_elements (&surface->slaves);
- slaves = _cairo_array_index (&surface->slaves, 0);
- for (n = 0; n < num_slaves; n++) {
- if (slaves[n].target->backend == backend &&
- slaves[n].target->content == content)
- {
- return slaves[n].target;
- }
- }
-
- /* matching backend? */
- if (surface->master.target->backend == backend)
- return surface->master.target;
-
- num_slaves = _cairo_array_num_elements (&surface->slaves);
- slaves = _cairo_array_index (&surface->slaves, 0);
- for (n = 0; n < num_slaves; n++) {
- if (slaves[n].target->backend == backend)
- return slaves[n].target;
- }
-
- return NULL;
-}