summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gmail.com>2023-01-29 01:32:55 +0000
committerEmmanuele Bassi <ebassi@gmail.com>2023-01-29 01:32:55 +0000
commit47a932bffc16323b58e3c8f9bc3fe0d821838a84 (patch)
treeb0d9cd60f7c43739d890571ecbed3d686727e189 /util
parent1e8be6bbc790aa31649a14f6e97fbab9cbd7ed53 (diff)
parentb5793081d095a13517e157d793b367e4527fd39d (diff)
downloadcairo-47a932bffc16323b58e3c8f9bc3fe0d821838a84.tar.gz
Merge branch 'no-more-gl' into 'master'
Drop cairo-gl See merge request cairo/cairo!287
Diffstat (limited to 'util')
-rw-r--r--util/cairo-script/csi-replay.c61
-rw-r--r--util/cairo-trace/trace.c188
2 files changed, 0 insertions, 249 deletions
diff --git a/util/cairo-script/csi-replay.c b/util/cairo-script/csi-replay.c
index 9d9be72c2..4460d6414 100644
--- a/util/cairo-script/csi-replay.c
+++ b/util/cairo-script/csi-replay.c
@@ -206,64 +206,6 @@ _xrender_surface_create (void *closure,
#endif
#endif
-#if CAIRO_HAS_GL_GLX_SURFACE
-#include <cairo-gl.h>
-static cairo_gl_context_t *
-_glx_get_context (cairo_content_t content)
-{
- static cairo_gl_context_t *context;
-
- if (context == NULL) {
- int rgba_attribs[] = {
- GLX_RGBA,
- GLX_RED_SIZE, 1,
- GLX_GREEN_SIZE, 1,
- GLX_BLUE_SIZE, 1,
- GLX_ALPHA_SIZE, 1,
- GLX_DOUBLEBUFFER,
- None
- };
- XVisualInfo *visinfo;
- GLXContext gl_ctx;
- Display *dpy;
-
- dpy = XOpenDisplay (NULL);
- if (dpy == NULL) {
- fprintf (stderr, "Failed to open display.\n");
- exit (1);
- }
-
- visinfo = glXChooseVisual (dpy, DefaultScreen (dpy), rgba_attribs);
- if (visinfo == NULL) {
- fprintf (stderr, "Failed to create RGBA, double-buffered visual\n");
- exit (1);
- }
-
- gl_ctx = glXCreateContext (dpy, visinfo, NULL, True);
- XFree (visinfo);
-
- context = cairo_glx_context_create (dpy, gl_ctx);
- }
-
- return context;
-}
-
-static cairo_surface_t *
-_glx_surface_create (void *closure,
- cairo_content_t content,
- double width, double height,
- long uid)
-{
- if (width == 0)
- width = 1;
- if (height == 0)
- height = 1;
-
- return cairo_gl_surface_create (_glx_get_context (content),
- content, width, height);
-}
-#endif
-
#if CAIRO_HAS_PDF_SURFACE
#include <cairo-pdf.h>
static cairo_surface_t *
@@ -341,9 +283,6 @@ main (int argc, char **argv)
#if CAIRO_HAS_XLIB_XRENDER_SURFACE
{ "--xrender", _xrender_surface_create },
#endif
-#if CAIRO_HAS_GL_GLX_SURFACE
- { "--glx", _glx_surface_create },
-#endif
#if CAIRO_HAS_XLIB_SURFACE
{ "--xlib", _xlib_surface_create },
#endif
diff --git a/util/cairo-trace/trace.c b/util/cairo-trace/trace.c
index a9181ce24..7ccdc41dc 100644
--- a/util/cairo-trace/trace.c
+++ b/util/cairo-trace/trace.c
@@ -5323,191 +5323,3 @@ cairo_recording_surface_create (cairo_content_t content,
_exit_trace ();
return ret;
}
-
-#if CAIRO_HAS_GL_SURFACE || CAIRO_HAS_GLESV2_SURFACE
-#include <cairo-gl.h>
-cairo_surface_t *
-cairo_gl_surface_create (cairo_device_t *abstract_device,
- cairo_content_t content,
- int width,
- int height)
-{
- cairo_surface_t *ret;
-
- _enter_trace ();
-
- ret = DLCALL (cairo_gl_surface_create, abstract_device, content, width, height);
-
- _emit_line_info ();
- if (_write_lock ()) {
- Object *obj = _create_surface (ret);
-
- _trace_printf ("dict\n"
- " /type /gl set\n"
- " /content //%s set\n"
- " /width %d set\n"
- " /height %d set\n"
- " surface dup /s%ld exch def\n",
- _content_to_string (content),
- width, height,
- obj->token);
- obj->width = width;
- obj->height = height;
- obj->defined = TRUE;
- _push_object (obj);
- dump_stack(__func__);
- _write_unlock ();
- }
-
- _exit_trace ();
- return ret;
-}
-
-cairo_surface_t *
-cairo_gl_surface_create_for_texture (cairo_device_t *abstract_device,
- cairo_content_t content,
- unsigned int tex,
- int width,
- int height)
-{
- cairo_surface_t *ret;
-
- _enter_trace ();
-
- ret = DLCALL (cairo_gl_surface_create_for_texture, abstract_device, content, tex, width, height);
-
- _emit_line_info ();
- if (_write_lock ()) {
- Object *obj = _create_surface (ret);
-
- _trace_printf ("dict\n"
- " /type /gl set\n"
- " /content //%s set\n"
- " /width %d set\n"
- " /height %d set\n"
- " surface dup /s%ld exch def\n",
- _content_to_string (content),
- width, height,
- obj->token);
- obj->width = width;
- obj->height = height;
- obj->defined = TRUE;
- _push_object (obj);
- dump_stack(__func__);
- _write_unlock ();
- }
-
- _exit_trace ();
- return ret;
-}
-
-#if CAIRO_HAS_GLX_FUNCTIONS
-cairo_surface_t *
-cairo_gl_surface_create_for_window (cairo_device_t *device,
- Window win,
- int width, int height)
-{
- cairo_surface_t *ret;
-
- _enter_trace ();
-
- ret = DLCALL (cairo_gl_surface_create_for_window, device, win, width, height);
-
- _emit_line_info ();
- if (_write_lock ()) {
- Object *obj = _create_surface (ret);
-
- _trace_printf ("dict\n"
- " /type /gl set\n"
- " /width %d set\n"
- " /height %d set\n"
- " surface dup /s%ld exch def\n",
- width, height,
- obj->token);
- obj->width = width;
- obj->height = height;
- obj->defined = TRUE;
- _push_object (obj);
- dump_stack(__func__);
- _write_unlock ();
- }
-
- _exit_trace ();
- return ret;
-}
-#endif
-
-#if CAIRO_HAS_WGL_FUNCTIONS
-cairo_surface_t *
-cairo_gl_surface_create_for_dc (cairo_device_t *device,
- HDC dc,
- int width,
- int height)
-{
- cairo_surface_t *ret;
-
- _enter_trace ();
-
- ret = DLCALL (cairo_gl_surface_create_for_dc, device, dc, width, height);
-
- _emit_line_info ();
- if (_write_lock ()) {
- Object *obj = _create_surface (ret);
-
- _trace_printf ("dict\n"
- " /type /gl set\n"
- " /width %d set\n"
- " /height %d set\n"
- " surface dup /s%ld exch def\n",
- width, height,
- obj->token);
- obj->width = width;
- obj->height = height;
- obj->defined = TRUE;
- _push_object (obj);
- dump_stack(__func__);
- _write_unlock ();
- }
-
- _exit_trace ();
- return ret;
-}
-#endif
-
-#if CAIRO_HAS_EGL_FUNCTIONS
-cairo_surface_t *
-cairo_gl_surface_create_for_egl (cairo_device_t *device,
- EGLSurface egl,
- int width,
- int height)
-{
- cairo_surface_t *ret;
-
- _enter_trace ();
-
- ret = DLCALL (cairo_gl_surface_create_for_egl, device, egl, width, height);
-
- _emit_line_info ();
- if (_write_lock ()) {
- Object *obj = _create_surface (ret);
-
- _trace_printf ("dict\n"
- " /type /gl set\n"
- " /width %d set\n"
- " /height %d set\n"
- " surface dup /s%ld exch def\n",
- width, height,
- obj->token);
- obj->width = width;
- obj->height = height;
- obj->defined = TRUE;
- _push_object (obj);
- dump_stack(__func__);
- _write_unlock ();
- }
-
- _exit_trace ();
- return ret;
-}
-#endif
-#endif