qxl_surface.h 1.1 KB
Newer Older
1 2 3 4 5 6 7 8
#ifndef QXL_SURFACE_H
#define QXL_SURFACE_H

struct evacuated_surface_t;

struct qxl_surface_t
{
    surface_cache_t    *cache;
9 10

    qxl_screen_t *qxl;
11 12 13 14 15 16 17 18
    uint32_t	        id;

    pixman_image_t *	dev_image;
    pixman_image_t *	host_image;

    uxa_access_t	access_type;
    RegionRec		access_region;

19
    struct qxl_bo   *bo;
20 21
    struct qxl_surface_t *	next;
    struct qxl_surface_t *	prev;	/* Only used in the 'live'
22 23 24 25 26 27 28 29 30 31 32 33 34
				 * chain in the surface cache
				 */

    int			in_use;
    int			bpp;		/* bpp of the pixmap */
    int			ref_count;

    PixmapPtr		pixmap;

    struct evacuated_surface_t *evacuated;

    union
    {
35
	struct qxl_surface_t *copy_src;
36 37 38 39 40 41 42 43
	Pixel	       solid_pixel;

	struct
	{
	    int			op;
	    PicturePtr		src_picture;
	    PicturePtr		mask_picture;
	    PicturePtr		dest_picture;
44 45 46
	    struct qxl_surface_t	*src;
	    struct qxl_surface_t	*mask;
	    struct qxl_surface_t	*dest;
47 48
	} composite;
    } u;
Dave Airlie's avatar
Dave Airlie committed
49
    struct qxl_bo *image_bo;
50 51
};

Dave Airlie's avatar
Dave Airlie committed
52 53
void qxl_download_box (qxl_surface_t *surface, int x1, int y1, int x2, int y2);
void qxl_upload_box (qxl_surface_t *surface, int x1, int y1, int x2, int y2);
54

55
#endif