mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 19:00:08 +00:00
e3cc3f7841
This allows putting any number of color stops into the buffer, so fallbacks with too many stops are no longer necessary.
40 lines
2.5 KiB
C
40 lines
2.5 KiB
C
#pragma once
|
|
|
|
#include <graphene.h>
|
|
|
|
#include "gskvulkanpipelineprivate.h"
|
|
#include "gskrendernode.h"
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
#define GSK_VULKAN_LINEAR_GRADIENT_PIPELINE_MAX_COLOR_STOPS 8
|
|
|
|
typedef struct _GskVulkanLinearGradientPipelineLayout GskVulkanLinearGradientPipelineLayout;
|
|
|
|
#define GSK_TYPE_VULKAN_LINEAR_GRADIENT_PIPELINE (gsk_vulkan_linear_gradient_pipeline_get_type ())
|
|
|
|
G_DECLARE_FINAL_TYPE (GskVulkanLinearGradientPipeline, gsk_vulkan_linear_gradient_pipeline, GSK, VULKAN_LINEAR_GRADIENT_PIPELINE, GskVulkanPipeline)
|
|
|
|
GskVulkanPipeline * gsk_vulkan_linear_gradient_pipeline_new (GdkVulkanContext *context,
|
|
VkPipelineLayout layout,
|
|
const char *shader_name,
|
|
VkRenderPass render_pass);
|
|
|
|
void gsk_vulkan_linear_gradient_pipeline_collect_vertex_data
|
|
(GskVulkanLinearGradientPipeline*pipeline,
|
|
guchar *data,
|
|
const graphene_point_t *offset,
|
|
const graphene_rect_t *rect,
|
|
const graphene_point_t *start,
|
|
const graphene_point_t *end,
|
|
gboolean repeating,
|
|
gsize gradient_offset,
|
|
gsize n_stops);
|
|
gsize gsk_vulkan_linear_gradient_pipeline_draw (GskVulkanLinearGradientPipeline*pipeline,
|
|
VkCommandBuffer command_buffer,
|
|
gsize offset,
|
|
gsize n_commands);
|
|
|
|
G_END_DECLS
|
|
|