summaryrefslogtreecommitdiffstatsci
path: root/src/cairo-image.cpp
diff options
context:
space:
mode:
authorBryce Harrington <b.harrington@samsung.com>2013-11-27 19:03:25 -0800
committerBryce Harrington <b.harrington@samsung.com>2013-11-27 19:03:25 -0800
commit41f692367fff20ad69973f21d92ffe24bea73276 (patch)
treefcc9d8c48919c1b1d2ae9770fa0b94ab54f73519 /src/cairo-image.cpp
parentb5ed7231729463b73c603632dd35cabab787a68e (diff)
Indent 4 spaces instead of 2
Diffstat (limited to 'src/cairo-image.cpp')
-rw-r--r--src/cairo-image.cpp66
1 files changed, 33 insertions, 33 deletions
diff --git a/src/cairo-image.cpp b/src/cairo-image.cpp
index 1e374ea..98fe05f 100644
--- a/src/cairo-image.cpp
+++ b/src/cairo-image.cpp
@@ -4,55 +4,55 @@
#include <cairo-gl.h>
struct graphics_state {
- Display *dpy;
- Window window;
+ Display *dpy;
+ Window window;
};
static void
cleanup (void *data)
{
- struct graphics_state *state = (graphics_state*)data;
+ struct graphics_state *state = (graphics_state*)data;
- /*
- XDestroyWindow (state->dpy, state->window);
- XCloseDisplay (state->dpy);
- */
- free (state);
+ /*
+ XDestroyWindow (state->dpy, state->window);
+ XCloseDisplay (state->dpy);
+ */
+ free (state);
}
cairo_surface_t *
create_cairo_surface_image (int width, int height)
{
- struct graphics_state *state;
- cairo_surface_t *cairo_surface;
+ struct graphics_state *state;
+ cairo_surface_t *cairo_surface;
- state = (graphics_state*) malloc (sizeof (struct graphics_state));
- if (!state) {
- warnx ("Out of memory\n");
- return NULL;
- }
+ state = (graphics_state*) malloc (sizeof (struct graphics_state));
+ if (!state) {
+ warnx ("Out of memory\n");
+ return NULL;
+ }
- /*
- state->dpy = XOpenDisplay (NULL);
- if (state->dpy == NULL) {
- warnx ("Failed to open display: %s\n", XDisplayName (0));
- return NULL;
- }
- */
+ /*
+ state->dpy = XOpenDisplay (NULL);
+ if (state->dpy == NULL) {
+ warnx ("Failed to open display: %s\n", XDisplayName (0));
+ return NULL;
+ }
+ */
- cairo_surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
- width,
- height);
+ cairo_surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
+ width,
+ height);
- if (cairo_surface_set_user_data (cairo_surface,
- (cairo_user_data_key_t *) cleanup,
- state,
- cleanup))
+ if (cairo_surface_set_user_data (cairo_surface,
+ (cairo_user_data_key_t *) cleanup,
+ state,
+ cleanup))
{
- warnx ("Failed to setup cleanup callback closure\n");
- cleanup (state);
- return NULL;
+ warnx ("Failed to setup cleanup callback closure\n");
+ cleanup (state);
+ return NULL;
}
- return cairo_surface;
+ return cairo_surface;
}