summaryrefslogtreecommitdiff
path: root/gsk/gl/gskglimageprivate.h
blob: 547f0cb1713954eeb0b2db4a775e3f52be4c7317 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef __GSK_GL_IMAGE_H__
#define __GSK_GL_IMAGE_H__

#include "gskgldriverprivate.h"
#include <cairo.h>

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,
                                  int                   height);
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);
void gsk_gl_image_upload_regions (GskGLImage           *self,
                                  GskGLDriver          *gl_driver,
                                  guint                 n_regions,
                                  const GskImageRegion *regions);


#endif