[gtk+/wip/ebassi/gsk-renderer: 42/65] gsk: Make GskBlendMode enumeration public
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/ebassi/gsk-renderer: 42/65] gsk: Make GskBlendMode enumeration public
- Date: Fri, 8 Jul 2016 16:00:58 +0000 (UTC)
commit e1e53161a869f56ad16f2442c6b6be4dffe0dee8
Author: Emmanuele Bassi <ebassi gnome org>
Date: Fri Jul 1 12:02:43 2016 +0100
gsk: Make GskBlendMode enumeration public
gsk/gskenums.h | 39 +++++++++++++++++++++++++++++++++++++++
gsk/gskglrenderer.c | 8 +-------
2 files changed, 40 insertions(+), 7 deletions(-)
---
diff --git a/gsk/gskenums.h b/gsk/gskenums.h
index b831d49..9ccfc95 100644
--- a/gsk/gskenums.h
+++ b/gsk/gskenums.h
@@ -43,4 +43,43 @@ typedef enum {
GSK_SCALING_FILTER_TRILINEAR
} GskScalingFilter;
+/**
+ * GskBlendMode:
+ * @GSK_BLEND_MODE_DEFAULT: The default blend mode, which specifies no blending
+ * @GSK_BLEND_MODE_MULTIPLY: The source color is multiplied by the destination
+ * and replaces the destination
+ * @GSK_BLEND_MODE_SCREEN:
+ * @GSK_BLEND_MODE_OVERLAY: ...
+ * @GSK_BLEND_MODE_DARKEN: ...
+ * @GSK_BLEND_MODE_LIGHTEN: ...
+ * @GSK_BLEND_MODE_COLOR_DODGE: ...
+ * @GSK_BLEND_MODE_COLOR_BURN: ...
+ * @GSK_BLEND_MODE_HARD_LIGHT: ...
+ * @GSK_BLEND_MODE_SOFT_LIGHT: ...
+ * @GSK_BLEND_MODE_DIFFERENCE: ...
+ * @GSK_BLEND_MODE_EXCLUSION: ...
+ *
+ * The blend modes available for render nodes.
+ *
+ * The implementation of each blend mode is deferred to the
+ * rendering pipeline.
+ *
+ * Since: 3.22
+ */
+typedef enum {
+ GSK_BLEND_MODE_DEFAULT = 0,
+
+ GSK_BLEND_MODE_MULTIPLY,
+ GSK_BLEND_MODE_SCREEN,
+ GSK_BLEND_MODE_OVERLAY,
+ GSK_BLEND_MODE_DARKEN,
+ GSK_BLEND_MODE_LIGHTEN,
+ GSK_BLEND_MODE_COLOR_DODGE,
+ GSK_BLEND_MODE_COLOR_BURN,
+ GSK_BLEND_MODE_HARD_LIGHT,
+ GSK_BLEND_MODE_SOFT_LIGHT,
+ GSK_BLEND_MODE_DIFFERENCE,
+ GSK_BLEND_MODE_EXCLUSION
+} GskBlendMode;
+
#endif /* __GSK_TYPES_H__ */
diff --git a/gsk/gskglrenderer.c b/gsk/gskglrenderer.c
index 2b919a3..6c634ad 100644
--- a/gsk/gskglrenderer.c
+++ b/gsk/gskglrenderer.c
@@ -12,12 +12,6 @@
#include <epoxy/gl.h>
-typedef enum {
- GSK_BLEND_MODE_NONE,
-
- GSK_BLEND_MODE_MULTIPLY
-} GskBlendMode;
-
typedef struct {
guint vao_id;
guint buffer_id;
@@ -772,7 +766,7 @@ gsk_gl_renderer_add_render_item (GskGLRenderer *self,
item.opaque = gsk_render_node_is_opaque (node);
item.opacity = gsk_render_node_get_opacity (node);
- item.blend_mode = parent != NULL ? GSK_BLEND_MODE_MULTIPLY : GSK_BLEND_MODE_NONE;
+ item.blend_mode = parent != NULL ? GSK_BLEND_MODE_MULTIPLY : GSK_BLEND_MODE_DEFAULT;
/* GL objects */
item.render_data.vao_id = self->vao_id;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]