summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@redhat.com>2009-05-28 20:23:31 -0400
committerKristian Høgsberg <krh@redhat.com>2009-05-28 20:23:31 -0400
commit2644910241b79301add45d7b66ca38dda6b95597 (patch)
tree6e1a7077049753b8b60a7bbd5f2cade8b256aa84
parentcda0e0db98d19c3e95621a61c9a7f78091bb7e1a (diff)
Update to track the cairo_drm_device_t renameHEADmaster
-rw-r--r--flower.c7
-rw-r--r--window.c14
2 files changed, 11 insertions, 10 deletions
diff --git a/flower.c b/flower.c
index 3488ead..a1b7011 100644
--- a/flower.c
+++ b/flower.c
@@ -133,7 +133,7 @@ int main(int argc, char *argv[])
struct wl_display *display;
struct wl_visual *visual;
int fd;
- cairo_drm_context_t *ctx;
+ cairo_drm_device_t *device;
cairo_surface_t *s;
struct timespec ts;
GMainLoop *loop;
@@ -171,8 +171,9 @@ int main(int argc, char *argv[])
srandom(ts.tv_nsec);
flower.offset = random();
- ctx = cairo_drm_context_get_for_fd(fd);
- s = cairo_drm_surface_create(ctx, CAIRO_CONTENT_COLOR_ALPHA,
+ device = cairo_drm_device_get_for_fd(fd);
+ s = cairo_drm_surface_create(device,
+ CAIRO_CONTENT_COLOR_ALPHA,
flower.width, flower.height);
draw_stuff(s, flower.width, flower.height);
diff --git a/window.c b/window.c
index 0f34959..e74edc5 100644
--- a/window.c
+++ b/window.c
@@ -46,7 +46,7 @@ struct display {
struct wl_output *output;
struct wl_input_device *input_device;
struct rectangle screen_allocation;
- cairo_drm_context_t *ctx;
+ cairo_drm_device_t *device;
int fd;
};
@@ -98,7 +98,7 @@ window_draw_decorations(struct window *window)
int width, height;
window->cairo_surface =
- cairo_drm_surface_create(window->display->ctx,
+ cairo_drm_surface_create(window->display->device,
CAIRO_CONTENT_COLOR_ALPHA,
window->allocation.width,
window->allocation.height);
@@ -205,7 +205,7 @@ window_draw_fullscreen(struct window *window)
struct wl_visual *visual;
window->cairo_surface =
- cairo_drm_surface_create(window->display->ctx,
+ cairo_drm_surface_create(window->display->device,
CAIRO_CONTENT_COLOR_ALPHA,
window->allocation.width,
window->allocation.height);
@@ -562,7 +562,7 @@ cairo_surface_t *
window_create_surface(struct window *window,
struct rectangle *rectangle)
{
- return cairo_drm_surface_create(window->display->ctx,
+ return cairo_drm_surface_create(window->display->device,
CAIRO_CONTENT_COLOR_ALPHA,
rectangle->width,
rectangle->height);
@@ -707,9 +707,9 @@ display_create(struct wl_display *display, int fd)
return NULL;
d->display = display;
- d->ctx = cairo_drm_context_get_for_fd(fd);
- if (d->ctx == NULL) {
- fprintf(stderr, "failed to get cairo drm context\n");
+ d->device = cairo_drm_device_get_for_fd(fd);
+ if (d->device == NULL) {
+ fprintf(stderr, "failed to get cairo drm device\n");
return NULL;
}