rendernode: Make sure depth variable has enough bits
This will be relevant when we add new values to it.
This commit is contained in:
@@ -28,6 +28,8 @@
|
||||
|
||||
#include <epoxy/gl.h>
|
||||
|
||||
G_STATIC_ASSERT ((1 << GDK_MEMORY_DEPTH_BITS) > GDK_N_DEPTHS);
|
||||
|
||||
typedef struct _GdkMemoryFormatDescription GdkMemoryFormatDescription;
|
||||
|
||||
#define TYPED_FUNCS(name, T, R, G, B, A, bpp, scale) \
|
||||
|
||||
@@ -45,6 +45,8 @@ typedef enum {
|
||||
GDK_N_DEPTHS
|
||||
} GdkMemoryDepth;
|
||||
|
||||
#define GDK_MEMORY_DEPTH_BITS 3
|
||||
|
||||
gsize gdk_memory_format_alignment (GdkMemoryFormat format) G_GNUC_CONST;
|
||||
GdkMemoryAlpha gdk_memory_format_alpha (GdkMemoryFormat format) G_GNUC_CONST;
|
||||
gsize gdk_memory_format_bytes_per_pixel (GdkMemoryFormat format) G_GNUC_CONST;
|
||||
|
||||
@@ -32,7 +32,7 @@ struct _GskRenderNode
|
||||
|
||||
graphene_rect_t bounds;
|
||||
|
||||
guint preferred_depth : 2;
|
||||
guint preferred_depth : GDK_MEMORY_DEPTH_BITS;
|
||||
guint offscreen_for_opacity : 1;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user