mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-01 00:11:29 +00:00
7afdd3fdb5
GSK is conceptually split into two scene graphs: * a simple rendering tree of operations * a complex set of logical layers The latter is built on the former, and adds convenience and high level API for application developers. The lower layer, though, is what gets transformed into the rendering pipeline, as it's simple and thus can be transformed into appropriate rendering commands with minimal state changes. The lower layer is also suitable for reuse from more complex higher layers, like the CSS machinery in GTK, without necessarily port those layers to the GSK high level API. This lower layer is based on GskRenderNode instances, which represent the tree of rendering operations; and a GskRenderer instance, which takes the render nodes and submits them (after potentially reordering and transforming them to a more appropriate representation) to the underlying graphic system.
44 lines
1.0 KiB
C
44 lines
1.0 KiB
C
#ifndef __GSK_DEBUG_PRIVATE_H__
|
|
#define __GSK_DEBUG_PRIVATE_H__
|
|
|
|
#include <glib.h>
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
typedef enum {
|
|
GSK_DEBUG_RENDER_NODE = 1 << 0,
|
|
GSK_DEBUG_RENDERER = 1 << 1,
|
|
GSK_DEBUG_CAIRO = 1 << 2,
|
|
GSK_DEBUG_OPENGL = 1 << 3
|
|
} GskDebugFlags;
|
|
|
|
typedef enum {
|
|
GSK_RENDERING_MODE_GEOMETRY = 1 << 0
|
|
} GskRenderingMode;
|
|
|
|
gboolean gsk_check_debug_flags (GskDebugFlags flags);
|
|
|
|
gboolean gsk_check_rendering_flags (GskRenderingMode flags);
|
|
|
|
#ifdef G_ENABLE_DEBUG
|
|
|
|
#define GSK_DEBUG_CHECK(type) G_UNLIKELY (gsk_check_debug_flags (GSK_DEBUG_ ## type))
|
|
#define GSK_RENDER_MODE_CHECK(type) G_UNLIKELY (gsk_check_rendering_flags (GSK_RENDERING_MODE_ ## type))
|
|
|
|
#define GSK_NOTE(type,action) G_STMT_START { \
|
|
if (GSK_DEBUG_CHECK (type)) { \
|
|
action; \
|
|
} } G_STMT_END
|
|
|
|
#else
|
|
|
|
#define GSK_RENDER_MODE_CHECK(type) 0
|
|
#define GSK_DEBUG_CHECK(type) 0
|
|
#define GSK_NOTE(type,action)
|
|
|
|
#endif
|
|
|
|
G_END_DECLS
|
|
|
|
#endif /* __GSK_DEBUG_PRIVATE_H__ */
|