diff options
| author | sanine <sanine.not@pm.me> | 2023-02-12 23:53:22 -0600 | 
|---|---|---|
| committer | sanine <sanine.not@pm.me> | 2023-02-12 23:53:22 -0600 | 
| commit | f1fe73d1909a2448a004a88362a1a532d0d4f7c3 (patch) | |
| tree | ab37ae3837e2f858de2932bcee9f26e69fab3db1 /libs/cairo-1.16.0/test/gl-oversized-surface.c | |
| parent | f567ea1e2798fd3156a416e61f083ea3e6b95719 (diff) | |
switch to tinyobj and nanovg from assimp and cairo
Diffstat (limited to 'libs/cairo-1.16.0/test/gl-oversized-surface.c')
| -rw-r--r-- | libs/cairo-1.16.0/test/gl-oversized-surface.c | 88 | 
1 files changed, 0 insertions, 88 deletions
diff --git a/libs/cairo-1.16.0/test/gl-oversized-surface.c b/libs/cairo-1.16.0/test/gl-oversized-surface.c deleted file mode 100644 index 4c46efd..0000000 --- a/libs/cairo-1.16.0/test/gl-oversized-surface.c +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright © 2012 Igalia S.L. - * Copyright © 2009 Eric Anholt - * Copyright © 2009 Chris Wilson - * Copyright © 2005 Red Hat, Inc - * - * Permission to use, copy, modify, distribute, and sell this software - * and its documentation for any purpose is hereby granted without - * fee, provided that the above copyright notice appear in all copies - * and that both that copyright notice and this permission notice - * appear in supporting documentation, and that the name of - * Chris Wilson not be used in advertising or publicity pertaining to - * distribution of the software without specific, written prior - * permission. Chris Wilson makes no representations about the - * suitability of this software for any purpose.  It is provided "as - * is" without express or implied warranty. - * - * IGALIA S.L. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS - * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS, IN NO EVENT SHALL CHRIS WILSON BE LIABLE FOR ANY SPECIAL, - * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER - * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR - * IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Author: Martin Robinson <mrobinson@igalia.com> - */ - -#include "cairo-test.h" -#include <cairo-gl.h> -#include <assert.h> -#include <limits.h> - -static cairo_test_status_t -preamble (cairo_test_context_t *test_ctx) -{ -    int rgba_attribs[] = { -	GLX_RGBA, -	GLX_RED_SIZE, 1, -	GLX_GREEN_SIZE, 1, -	GLX_BLUE_SIZE, 1, -	GLX_ALPHA_SIZE, 1, -	GLX_DOUBLEBUFFER, -	None -    }; - -    Display *display; -    XVisualInfo *visual_info; -    GLXContext glx_context; -    cairo_device_t *device; -    cairo_surface_t *oversized_surface; -    cairo_test_status_t test_status = CAIRO_TEST_SUCCESS; - -    display = XOpenDisplay (NULL); -    if (display == NULL) -	return CAIRO_TEST_UNTESTED; - -    visual_info = glXChooseVisual (display, DefaultScreen (display), rgba_attribs); -    if (visual_info == NULL) { -	XCloseDisplay (display); -	return CAIRO_TEST_UNTESTED; -    } - -    glx_context = glXCreateContext (display, visual_info, NULL, True); -    if (glx_context == NULL) { -	XCloseDisplay (display); -	return CAIRO_TEST_UNTESTED; -    } - -    device = cairo_glx_device_create (display, glx_context); - -    oversized_surface = cairo_gl_surface_create (device, CAIRO_CONTENT_COLOR_ALPHA, INT_MAX, INT_MAX); -    if (cairo_surface_status (oversized_surface) != CAIRO_STATUS_INVALID_SIZE) -        test_status = CAIRO_TEST_FAILURE; - -    cairo_device_destroy (device); -    glXDestroyContext(display, glx_context); -    XCloseDisplay (display); - -    return test_status; -} - -CAIRO_TEST (gl_oversized_surface, -	    "Test that creating a surface beyond texture limits results in an error surface", -	    "gl", /* keywords */ -	    NULL, /* requirements */ -	    0, 0, -	    preamble, NULL)  | 
