summaryrefslogtreecommitdiff
path: root/boilerplate
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2021-04-17 23:59:28 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2022-02-25 02:03:35 +0000
commitfc3437128d7b45ba34007abbbeea2a81b1b126fb (patch)
treec1a69a0270f1e329aa8a7f33793c5ebd538ef95a /boilerplate
parent803afe6edda17b97e3d12a20585e565a2d2a79a2 (diff)
downloadcairo-fc3437128d7b45ba34007abbbeea2a81b1b126fb.tar.gz
Remove cairo-directfb
Nobody cares about DirectFB any more, not even the people that registered and maintained the DirectFB domain.
Diffstat (limited to 'boilerplate')
-rw-r--r--boilerplate/Makefile.sources1
-rw-r--r--boilerplate/Makefile.win32.features10
-rw-r--r--boilerplate/cairo-boilerplate-directfb.c235
-rw-r--r--boilerplate/meson.build1
4 files changed, 0 insertions, 247 deletions
diff --git a/boilerplate/Makefile.sources b/boilerplate/Makefile.sources
index db3543116..ad96a89bc 100644
--- a/boilerplate/Makefile.sources
+++ b/boilerplate/Makefile.sources
@@ -19,7 +19,6 @@ cairo_boilerplate_private = \
cairo-boilerplate-private.h \
$(NULL)
-cairo_boilerplate_directfb_sources = cairo-boilerplate-directfb.c
cairo_boilerplate_glx_sources = cairo-boilerplate-glx.c
cairo_boilerplate_wgl_sources = cairo-boilerplate-wgl.c
cairo_boilerplate_egl_sources = cairo-boilerplate-egl.c
diff --git a/boilerplate/Makefile.win32.features b/boilerplate/Makefile.win32.features
index d26532c5d..0dc297a28 100644
--- a/boilerplate/Makefile.win32.features
+++ b/boilerplate/Makefile.win32.features
@@ -157,16 +157,6 @@ enabled_cairo_boilerplate_private += $(cairo_boilerplate_glesv3_private)
enabled_cairo_boilerplate_sources += $(cairo_boilerplate_glesv3_sources)
endif
-unsupported_cairo_boilerplate_headers += $(cairo_boilerplate_directfb_headers)
-all_cairo_boilerplate_headers += $(cairo_boilerplate_directfb_headers)
-all_cairo_boilerplate_private += $(cairo_boilerplate_directfb_private)
-all_cairo_boilerplate_sources += $(cairo_boilerplate_directfb_sources)
-ifeq ($(CAIRO_HAS_DIRECTFB_SURFACE),1)
-enabled_cairo_boilerplate_headers += $(cairo_boilerplate_directfb_headers)
-enabled_cairo_boilerplate_private += $(cairo_boilerplate_directfb_private)
-enabled_cairo_boilerplate_sources += $(cairo_boilerplate_directfb_sources)
-endif
-
unsupported_cairo_boilerplate_headers += $(cairo_boilerplate_vg_headers)
all_cairo_boilerplate_headers += $(cairo_boilerplate_vg_headers)
all_cairo_boilerplate_private += $(cairo_boilerplate_vg_private)
diff --git a/boilerplate/cairo-boilerplate-directfb.c b/boilerplate/cairo-boilerplate-directfb.c
deleted file mode 100644
index a479011d9..000000000
--- a/boilerplate/cairo-boilerplate-directfb.c
+++ /dev/null
@@ -1,235 +0,0 @@
-/*
-Test were run with the following script
-target can be directfb_bitmap or directfb
-
-export CAIRO_TEST_TARGET=directfb_bitmap
-export DFBARGS=quiet,no-banner,no-debug,log-file=dfblog,system=x11
-cd cairo/test
-make check
-
-*/
-
-#include "cairo-boilerplate-private.h"
-
-#include <cairo-directfb.h>
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#include <direct/debug.h>
-
-D_DEBUG_DOMAIN (CairoDFB_Boiler, "CairoDFB/Boiler", "Cairo DirectFB Boilerplate");
-
-/* macro for a safe call to DirectFB functions */
-#define DFBCHECK(x...) do{ \
- err = x; \
- if (err != DFB_OK) { \
- fprintf (stderr, "%s <%d>:\n\t", __FILE__, __LINE__); \
- goto ERROR; \
- } \
-} while (0)
-
-typedef struct _DFBInfo {
- IDirectFB *dfb;
- IDirectFBDisplayLayer *layer;
- IDirectFBWindow *window;
- IDirectFBSurface *surface;
-} DFBInfo;
-
-static void
-_cairo_boilerplate_directfb_cleanup (void *closure)
-{
- DFBInfo *info = (DFBInfo *) closure;
-
- if (info->surface)
- info->surface->Release (info->surface);
-
- if (info->window)
- info->window->Release (info->window);
-
- if (info->layer)
- info->layer->Release (info->layer);
-
- if (info->dfb)
- info->dfb->Release (info->dfb);
-
- free (info);
-}
-
-static DFBInfo *
-init (void)
-{
- DFBDisplayLayerConfig layer_config;
- DFBGraphicsDeviceDescription desc;
- int err;
- DFBInfo *info;
-
- info = xcalloc (1, sizeof (DFBInfo));
- if (info == NULL)
- return NULL;
-
- DFBCHECK (DirectFBInit (NULL, NULL));
- DFBCHECK (DirectFBCreate (&info->dfb));
- info->dfb->GetDeviceDescription (info->dfb, &desc);
-
- DFBCHECK (info->dfb->GetDisplayLayer (info->dfb,
- DLID_PRIMARY, &info->layer));
- info->layer->SetCooperativeLevel (info->layer, DLSCL_ADMINISTRATIVE);
-
- if ((desc.blitting_flags & (DSBLIT_BLEND_ALPHACHANNEL |
- DSBLIT_BLEND_COLORALPHA)) !=
- (DSBLIT_BLEND_ALPHACHANNEL | DSBLIT_BLEND_COLORALPHA))
- {
- layer_config.flags = DLCONF_BUFFERMODE;
- layer_config.buffermode = DLBM_BACKSYSTEM;
- info->layer->SetConfiguration (info->layer, &layer_config);
- }
-
- return info;
-
-ERROR:
- if (info != NULL)
- _cairo_boilerplate_directfb_cleanup (info);
- return NULL;
-}
-
-static cairo_surface_t *
-_cairo_boilerplate_directfb_window_create_surface (DFBInfo *info,
- cairo_content_t content,
- int width,
- int height)
-{
- DFBWindowDescription desc;
- int err;
-
- D_DEBUG_AT (CairoDFB_Boiler, "%s (%p, %s, %dx%d)\n", __FUNCTION__, info,
- content == CAIRO_CONTENT_ALPHA ? "ALPHA" :
- content == CAIRO_CONTENT_COLOR ? "RGB" :
- content == CAIRO_CONTENT_COLOR_ALPHA ? "ARGB" : "unknown content!",
- width, height);
-
- desc.flags = DWDESC_POSX | DWDESC_POSY |
- DWDESC_WIDTH | DWDESC_HEIGHT;
- desc.caps = DSCAPS_NONE;
- desc.posx = 0;
- desc.posy = 0;
- desc.width = width;
- desc.height = height;
- if (content == CAIRO_CONTENT_COLOR_ALPHA) {
- desc.flags |= DWDESC_CAPS | DWDESC_PIXELFORMAT;
- desc.caps |= DWCAPS_DOUBLEBUFFER | DWCAPS_ALPHACHANNEL;
- desc.pixelformat = DSPF_ARGB;
- }
-
- DFBCHECK (info->layer->CreateWindow (info->layer, &desc, &info->window));
- info->window->SetOpacity (info->window, 0xFF);
- info->window->GetSurface (info->window, &info->surface);
- info->surface->SetColor (info->surface, 0xFF, 0xFF, 0xFF, 0xFF);
- info->surface->FillRectangle (info->surface,0, 0, desc.width, desc.height);
- info->surface->Flip (info->surface, NULL, 0);
-
- return cairo_directfb_surface_create (info->dfb, info->surface);
-
-ERROR:
- _cairo_boilerplate_directfb_cleanup (info);
- return NULL;
-}
-
-static cairo_surface_t *
-_cairo_boilerplate_directfb_bitmap_create_surface (DFBInfo *info,
- cairo_content_t content,
- int width,
- int height)
-{
- int err;
- DFBSurfaceDescription desc;
-
- D_DEBUG_AT (CairoDFB_Boiler, "%s (%p, %s, %dx%d)\n", __FUNCTION__, info,
- content == CAIRO_CONTENT_ALPHA ? "ALPHA" :
- content == CAIRO_CONTENT_COLOR ? "RGB" :
- content == CAIRO_CONTENT_COLOR_ALPHA ? "ARGB" : "unknown content!",
- width, height);
-
- desc.flags = DSDESC_WIDTH | DSDESC_HEIGHT;
- desc.caps = DSCAPS_NONE;
- desc.width = width;
- desc.height = height;
- if (content == CAIRO_CONTENT_COLOR_ALPHA) {
- desc.flags |= DSDESC_PIXELFORMAT;
- desc.pixelformat = DSPF_ARGB;
- }
- DFBCHECK (info->dfb->CreateSurface (info->dfb, &desc, &info->surface));
-
- return cairo_directfb_surface_create (info->dfb, info->surface);
-
-ERROR:
- _cairo_boilerplate_directfb_cleanup (info);
- return NULL;
-}
-
-static cairo_surface_t *
-_cairo_boilerplate_directfb_create_surface (const char *name,
- cairo_content_t content,
- double width,
- double height,
- double max_width,
- double max_height,
- cairo_boilerplate_mode_t mode,
- void **closure)
-{
-
- DFBInfo *info;
-
- info = init ();
- if (info == NULL)
- return NULL;
-
- *closure = info;
-
- D_DEBUG_AT (CairoDFB_Boiler, "%s ('%s', %s, %dx%d, %s)\n",
- __FUNCTION__, name,
- content == CAIRO_CONTENT_ALPHA ? "ALPHA" :
- content == CAIRO_CONTENT_COLOR ? "RGB" :
- content == CAIRO_CONTENT_COLOR_ALPHA ? "ARGB" : "unknown content!",
- width, height,
- mode == CAIRO_BOILERPLATE_MODE_TEST ? "TEST" :
- mode == CAIRO_BOILERPLATE_MODE_PERF ? "PERF" : "unknown mode!");
-
- if (width == 0)
- width = 1;
- if (height == 0)
- height = 1;
-
- if (mode == CAIRO_BOILERPLATE_MODE_TEST)
- return _cairo_boilerplate_directfb_bitmap_create_surface (info, content, width, height);
- else /* mode == CAIRO_BOILERPLATE_MODE_PERF */
- return _cairo_boilerplate_directfb_window_create_surface (info, content, width, height);
-}
-
-static const cairo_boilerplate_target_t targets[] = {
- {
- "directfb", "directfb", NULL, NULL,
- CAIRO_SURFACE_TYPE_DIRECTFB, CAIRO_CONTENT_COLOR, 0,
- "cairo_directfb_surface_create",
- _cairo_boilerplate_directfb_create_surface,
- cairo_surface_create_similar,
- NULL, NULL,
- _cairo_boilerplate_get_image_surface,
- cairo_surface_write_to_png,
- _cairo_boilerplate_directfb_cleanup,
- NULL, NULL, TRUE, FALSE, FALSE
- },
- {
- "directfb-bitmap", "directfb", NULL, NULL,
- CAIRO_SURFACE_TYPE_DIRECTFB, CAIRO_CONTENT_COLOR_ALPHA, 0,
- "cairo_directfb_surface_create",
- _cairo_boilerplate_directfb_create_surface,
- cairo_surface_create_similar,
- NULL, NULL,
- _cairo_boilerplate_get_image_surface,
- cairo_surface_write_to_png,
- _cairo_boilerplate_directfb_cleanup,
- NULL, NULL, FALSE, FALSE, FALSE
- },
-};
-CAIRO_BOILERPLATE (directfb, targets);
diff --git a/boilerplate/meson.build b/boilerplate/meson.build
index 1ff373bb5..39432fc16 100644
--- a/boilerplate/meson.build
+++ b/boilerplate/meson.build
@@ -9,7 +9,6 @@ cairo_boilerplate_feature_sources = {
'cairo-quartz': ['cairo-boilerplate-quartz.c'],
'cairo-xcb': ['cairo-boilerplate-xcb.c'],
'cairo-win32': ['cairo-boilerplate-win32.c', 'cairo-boilerplate-win32-printing.c'],
- 'cairo-directfb': ['cairo-boilerplate-directfb.c'],
'cairo-pdf': ['cairo-boilerplate-pdf.c'],
'cairo-ps': ['cairo-boilerplate-ps.c'],
'cairo-svg': ['cairo-boilerplate-svg.c'],