mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-28 14:31:10 +00:00
gpu: Use GskGpuShaderImage for convert ops
This commit is contained in:
parent
9644fc2e8f
commit
71e412e8f8
@ -54,16 +54,14 @@ static const GskGpuShaderOpClass GSK_GPU_CONVERT_OP_CLASS = {
|
||||
};
|
||||
|
||||
void
|
||||
gsk_gpu_convert_op (GskGpuFrame *frame,
|
||||
GskGpuShaderClip clip,
|
||||
GskGpuColorStates color_states,
|
||||
float opacity,
|
||||
GskGpuDescriptors *desc,
|
||||
guint32 descriptor,
|
||||
gboolean straight_alpha,
|
||||
const graphene_rect_t *rect,
|
||||
const graphene_point_t *offset,
|
||||
const graphene_rect_t *tex_rect)
|
||||
gsk_gpu_convert_op (GskGpuFrame *frame,
|
||||
GskGpuShaderClip clip,
|
||||
GskGpuColorStates color_states,
|
||||
float opacity,
|
||||
GskGpuDescriptors *desc,
|
||||
gboolean straight_alpha,
|
||||
const graphene_point_t *offset,
|
||||
const GskGpuShaderImage *image)
|
||||
{
|
||||
GskGpuConvertInstance *instance;
|
||||
|
||||
@ -76,9 +74,9 @@ gsk_gpu_convert_op (GskGpuFrame *frame,
|
||||
desc,
|
||||
&instance);
|
||||
|
||||
gsk_gpu_rect_to_float (rect, offset, instance->rect);
|
||||
gsk_gpu_rect_to_float (tex_rect, offset, instance->tex_rect);
|
||||
instance->tex_id = descriptor;
|
||||
gsk_gpu_rect_to_float (image->coverage, offset, instance->rect);
|
||||
gsk_gpu_rect_to_float (image->bounds, offset, instance->tex_rect);
|
||||
instance->tex_id = image->descriptor;
|
||||
instance->opacity = opacity;
|
||||
}
|
||||
|
||||
|
@ -11,11 +11,9 @@ void gsk_gpu_convert_op (GskGpuF
|
||||
GskGpuColorStates color_states,
|
||||
float opacity,
|
||||
GskGpuDescriptors *desc,
|
||||
guint32 descriptor,
|
||||
gboolean straight_alpha,
|
||||
const graphene_rect_t *rect,
|
||||
const graphene_point_t *offset,
|
||||
const graphene_rect_t *tex_rect);
|
||||
const GskGpuShaderImage *image);
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
@ -548,11 +548,15 @@ gsk_gpu_node_processor_image_op (GskGpuNodeProcessor *self,
|
||||
TRUE),
|
||||
self->opacity,
|
||||
self->desc,
|
||||
descriptor,
|
||||
straight_alpha,
|
||||
rect,
|
||||
&self->offset,
|
||||
tex_rect);
|
||||
&(GskGpuShaderImage) {
|
||||
image,
|
||||
sampler,
|
||||
descriptor,
|
||||
rect,
|
||||
tex_rect
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -4070,11 +4074,15 @@ gsk_gpu_node_processor_process (GskGpuFrame *frame,
|
||||
gsk_gpu_node_processor_color_states_explicit (&self, ccs, TRUE),
|
||||
self.opacity,
|
||||
self.desc,
|
||||
descriptor,
|
||||
FALSE,
|
||||
&node->bounds,
|
||||
&self.offset,
|
||||
&tex_rect);
|
||||
&(GskGpuShaderImage) {
|
||||
image,
|
||||
GSK_GPU_SAMPLER_DEFAULT,
|
||||
descriptor,
|
||||
&node->bounds,
|
||||
&tex_rect
|
||||
});
|
||||
|
||||
gsk_gpu_render_pass_end_op (frame,
|
||||
target,
|
||||
|
Loading…
Reference in New Issue
Block a user