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:
@@ -30,6 +30,16 @@
|
|||||||
|
|
||||||
#define ARRAY_LENGTH(a) (sizeof (a) / sizeof (a)[0])
|
#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
|
void
|
||||||
blur_surface(cairo_surface_t *surface, int margin)
|
blur_surface(cairo_surface_t *surface, int margin)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -23,6 +23,9 @@
|
|||||||
#ifndef _CAIRO_UTIL_H
|
#ifndef _CAIRO_UTIL_H
|
||||||
#define _CAIRO_UTIL_H
|
#define _CAIRO_UTIL_H
|
||||||
|
|
||||||
|
void
|
||||||
|
surface_flush_device(cairo_surface_t *surface);
|
||||||
|
|
||||||
void
|
void
|
||||||
blur_surface(cairo_surface_t *surface, int margin);
|
blur_surface(cairo_surface_t *surface, int margin);
|
||||||
|
|
||||||
|
|||||||
+2
-1
@@ -35,6 +35,7 @@
|
|||||||
#include "wayland-client.h"
|
#include "wayland-client.h"
|
||||||
|
|
||||||
#include "window.h"
|
#include "window.h"
|
||||||
|
#include "cairo-util.h"
|
||||||
|
|
||||||
struct dnd {
|
struct dnd {
|
||||||
struct window *window;
|
struct window *window;
|
||||||
@@ -544,7 +545,7 @@ create_drag_cursor(struct dnd_drag *dnd_drag,
|
|||||||
cairo_surface_destroy(pointer);
|
cairo_surface_destroy(pointer);
|
||||||
cairo_paint(cr);
|
cairo_paint(cr);
|
||||||
/* FIXME: more cairo-gl brokeness */
|
/* FIXME: more cairo-gl brokeness */
|
||||||
display_flush_cairo_device(dnd->display);
|
surface_flush_device(surface);
|
||||||
cairo_destroy(cr);
|
cairo_destroy(cr);
|
||||||
|
|
||||||
dnd_drag->hotspot_x = pointer_width + x - item->x;
|
dnd_drag->hotspot_x = pointer_width + x - item->x;
|
||||||
|
|||||||
@@ -1036,12 +1036,6 @@ item_get_user_data(struct item *item)
|
|||||||
return item->user_data;
|
return item->user_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
display_flush_cairo_device(struct display *display)
|
|
||||||
{
|
|
||||||
cairo_device_flush (display->device);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
window_draw(struct window *window)
|
window_draw(struct window *window)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -100,9 +100,6 @@ display_add_drag_listener(struct display *display,
|
|||||||
const struct wl_drag_listener *drag_listener,
|
const struct wl_drag_listener *drag_listener,
|
||||||
void *data);
|
void *data);
|
||||||
|
|
||||||
void
|
|
||||||
display_flush_cairo_device(struct display *display);
|
|
||||||
|
|
||||||
void
|
void
|
||||||
display_defer(struct display *display, struct task *task);
|
display_defer(struct display *display, struct task *task);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user