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