summaryrefslogtreecommitdiffstatsci
path: root/src/cairo-egl.cpp
diff options
context:
space:
mode:
authorBryce Harrington <b.harrington@samsung.com>2013-11-27 16:28:57 -0800
committerBryce Harrington <b.harrington@samsung.com>2013-11-27 16:42:39 -0800
commitdf0386562111870047c854f28ff59fdbcb8879cc (patch)
tree398d263a76a1748202e2a7deff2992a234a468b6 /src/cairo-egl.cpp
parentdedef4369dea1131248b56b22573d0365f321179 (diff)
Refactor window creation into egl module
Diffstat (limited to 'src/cairo-egl.cpp')
-rw-r--r--src/cairo-egl.cpp32
1 files changed, 0 insertions, 32 deletions
diff --git a/src/cairo-egl.cpp b/src/cairo-egl.cpp
index 83d14be..17d5f10 100644
--- a/src/cairo-egl.cpp
+++ b/src/cairo-egl.cpp
@@ -8,33 +8,6 @@
#include "egl.h"
-static Display* getDisplay()
-{
- static Display* display = NULL;
- if (!display)
- display = XOpenDisplay(NULL);
- return display;
-}
-
-static bool
-createWindow(egl_state_t *state, int width, int height)
-{
- state->dpy = XOpenDisplay (NULL);
- if (state->dpy == NULL) {
- warnx ("Failed to open display: %s\n", XDisplayName (0));
- return false;
- }
-
- state->window = XCreateSimpleWindow (state->dpy, DefaultRootWindow (state->dpy),
- 0, 0,
- width, height,
- 0,
- BlackPixel (state->dpy, DefaultRootWindow (state->dpy)),
- BlackPixel (state->dpy, DefaultRootWindow (state->dpy)));
- XMapWindow (state->dpy, state->window);
- return true;
-}
-
static void
cleanup (void *data)
{
@@ -66,11 +39,6 @@ create_cairo_surface_egl (int width, int height)
return NULL;
}
- if (!initializeEGL(state)) {
- cleanup(state);
- return NULL;
- }
-
if (!createEGLContextWithWindow(state)) {
cleanup(state);
return NULL;