gsk: Make GskBlendMode enumeration public

This commit is contained in:
Emmanuele Bassi 2016-07-01 12:02:43 +01:00
parent 638297a22e
commit bf09ce93c8
2 changed files with 40 additions and 7 deletions

View File

@ -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__ */

View File

@ -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;