window: Remove display_flush_cairo_device
Rather add a flush_surface utility that flushed the cairo_device thats associated to a surface.
This commit is contained in:
parent
02dee2caad
commit
47eb8f4e91
@ -30,6 +30,16 @@
|
||||
|
||||
#define ARRAY_LENGTH(a) (sizeof (a) / sizeof (a)[0])
|
||||
|
||||
void
|
||||
surface_flush_device(cairo_surface_t *surface)
|
||||
{
|
||||
cairo_device_t *device;
|
||||
|
||||
device = cairo_surface_get_device(surface);
|
||||
if (device)
|
||||
cairo_device_flush(device);
|
||||
}
|
||||
|
||||
void
|
||||
blur_surface(cairo_surface_t *surface, int margin)
|
||||
{
|
||||
|
@ -23,6 +23,9 @@
|
||||
#ifndef _CAIRO_UTIL_H
|
||||
#define _CAIRO_UTIL_H
|
||||
|
||||
void
|
||||
surface_flush_device(cairo_surface_t *surface);
|
||||
|
||||
void
|
||||
blur_surface(cairo_surface_t *surface, int margin);
|
||||
|
||||
|
@ -35,6 +35,7 @@
|
||||
#include "wayland-client.h"
|
||||
|
||||
#include "window.h"
|
||||
#include "cairo-util.h"
|
||||
|
||||
struct dnd {
|
||||
struct window *window;
|
||||
@ -544,7 +545,7 @@ create_drag_cursor(struct dnd_drag *dnd_drag,
|
||||
cairo_surface_destroy(pointer);
|
||||
cairo_paint(cr);
|
||||
/* FIXME: more cairo-gl brokeness */
|
||||
display_flush_cairo_device(dnd->display);
|
||||
surface_flush_device(surface);
|
||||
cairo_destroy(cr);
|
||||
|
||||
dnd_drag->hotspot_x = pointer_width + x - item->x;
|
||||
|
@ -1036,12 +1036,6 @@ item_get_user_data(struct item *item)
|
||||
return item->user_data;
|
||||
}
|
||||
|
||||
void
|
||||
display_flush_cairo_device(struct display *display)
|
||||
{
|
||||
cairo_device_flush (display->device);
|
||||
}
|
||||
|
||||
void
|
||||
window_draw(struct window *window)
|
||||
{
|
||||
|
@ -100,9 +100,6 @@ display_add_drag_listener(struct display *display,
|
||||
const struct wl_drag_listener *drag_listener,
|
||||
void *data);
|
||||
|
||||
void
|
||||
display_flush_cairo_device(struct display *display);
|
||||
|
||||
void
|
||||
display_defer(struct display *display, struct task *task);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user