2017-11-18 13:30:57 +00:00
|
|
|
#ifndef __GSK_GL_IMAGE_H__
|
|
|
|
#define __GSK_GL_IMAGE_H__
|
|
|
|
|
|
|
|
#include "gskgldriverprivate.h"
|
2018-03-28 03:23:43 +00:00
|
|
|
#include <cairo.h>
|
2017-11-18 13:30:57 +00:00
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
guint texture_id;
|
|
|
|
int width;
|
|
|
|
int height;
|
|
|
|
} GskGLImage;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
guchar *data;
|
|
|
|
gsize width;
|
|
|
|
gsize height;
|
|
|
|
gsize stride;
|
|
|
|
gsize x;
|
|
|
|
gsize y;
|
|
|
|
} GskImageRegion;
|
|
|
|
|
|
|
|
void gsk_gl_image_create (GskGLImage *self,
|
|
|
|
GskGLDriver *gl_driver,
|
|
|
|
int width,
|
2019-06-02 16:47:57 +00:00
|
|
|
int height,
|
|
|
|
int min_filter,
|
|
|
|
int mag_filter);
|
2017-11-18 13:30:57 +00:00
|
|
|
void gsk_gl_image_destroy (GskGLImage *self,
|
|
|
|
GskGLDriver *gl_driver);
|
|
|
|
void gsk_gl_image_write_to_png (const GskGLImage *self,
|
|
|
|
GskGLDriver *gl_driver,
|
|
|
|
const char *filename);
|
2019-02-14 14:22:40 +00:00
|
|
|
void gsk_gl_image_upload_region (GskGLImage *self,
|
2017-11-18 13:30:57 +00:00
|
|
|
GskGLDriver *gl_driver,
|
2019-02-14 14:22:40 +00:00
|
|
|
const GskImageRegion *region);
|
2017-11-18 13:30:57 +00:00
|
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|