2023-08-12 20:10:16 +00:00
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
#include "gskgpuopprivate.h"
|
|
|
|
|
|
|
|
#include "gskgpuframeprivate.h"
|
|
|
|
|
|
|
|
GskGpuOp *
|
|
|
|
gsk_gpu_op_alloc (GskGpuFrame *frame,
|
|
|
|
const GskGpuOpClass *op_class)
|
|
|
|
{
|
|
|
|
GskGpuOp *op;
|
|
|
|
|
|
|
|
op = gsk_gpu_frame_alloc_op (frame, op_class->size);
|
|
|
|
op->op_class = op_class;
|
|
|
|
|
|
|
|
return op;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
gsk_gpu_op_finish (GskGpuOp *op)
|
|
|
|
{
|
|
|
|
op->op_class->finish (op);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2023-08-21 00:18:37 +00:00
|
|
|
gsk_gpu_op_print (GskGpuOp *op,
|
|
|
|
GskGpuFrame *frame,
|
|
|
|
GString *string,
|
|
|
|
guint indent)
|
2023-08-12 20:10:16 +00:00
|
|
|
{
|
2023-08-21 00:18:37 +00:00
|
|
|
op->op_class->print (op, frame, string, indent);
|
2023-08-12 20:10:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#ifdef GDK_RENDERING_VULKAN
|
|
|
|
GskGpuOp *
|
2023-11-04 02:57:38 +00:00
|
|
|
gsk_gpu_op_vk_command (GskGpuOp *op,
|
|
|
|
GskGpuFrame *frame,
|
|
|
|
GskVulkanCommandState *state)
|
2023-08-12 20:10:16 +00:00
|
|
|
{
|
2023-11-04 02:57:38 +00:00
|
|
|
return op->op_class->vk_command (op, frame, state);
|
2023-08-12 20:10:16 +00:00
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
GskGpuOp *
|
2023-11-04 02:57:38 +00:00
|
|
|
gsk_gpu_op_gl_command (GskGpuOp *op,
|
|
|
|
GskGpuFrame *frame,
|
|
|
|
GskGLCommandState *state)
|
2023-08-12 20:10:16 +00:00
|
|
|
{
|
2023-11-04 02:57:38 +00:00
|
|
|
return op->op_class->gl_command (op, frame, state);
|
2023-08-12 20:10:16 +00:00
|
|
|
}
|
|
|
|
|