mirror of
https://github.com/brl/mutter.git
synced 2025-06-13 16:59:30 +00:00
Make a public CoglBitmapError enum
There are many places in the texture backend that need to do conversion using the CoglBitmap code. Currently none of these functions can throw an error but they do return a value to indicate failure. In future it would make sense if new texture functions could throw an error and in that case they would want to use a CoglBitmap error if the failure was due to the conversion. This moves the internal CoglBitmap error from the quartz backend to be public in cogl-bitmap.h so that it can be used in this way.
This commit is contained in:
@ -77,22 +77,6 @@ _cogl_bitmap_premult (CoglBitmap *dst_bmp)
|
||||
|
||||
#ifdef USE_QUARTZ
|
||||
|
||||
/* lacking GdkPixbuf and other useful GError domains, define one of our own */
|
||||
|
||||
#define COGL_BITMAP_ERROR cogl_bitmap_error_quark ()
|
||||
|
||||
typedef enum {
|
||||
COGL_BITMAP_ERROR_FAILED,
|
||||
COGL_BITMAP_ERROR_UNKNOWN_TYPE,
|
||||
COGL_BITMAP_ERROR_CORRUPT_IMAGE
|
||||
} CoglBitmapError;
|
||||
|
||||
GQuark
|
||||
cogl_bitmap_error_quark (void)
|
||||
{
|
||||
return g_quark_from_static_string ("cogl-bitmap-error-quark");
|
||||
}
|
||||
|
||||
gboolean
|
||||
_cogl_bitmap_get_size_from_file (const char *filename,
|
||||
int *width,
|
||||
|
Reference in New Issue
Block a user