mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-28 06:21:14 +00:00
73ac2d0a1c
Because GL flips its shit sometimes (ie when it's the framebuffer), pass the height of the target as the flip variable, so commands that need to operate on the pixels can flip the y axis around this value.
54 lines
1.2 KiB
C
54 lines
1.2 KiB
C
#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
|
|
gsk_gpu_op_print (GskGpuOp *op,
|
|
GskGpuFrame *frame,
|
|
GString *string,
|
|
guint indent)
|
|
{
|
|
op->op_class->print (op, frame, string, indent);
|
|
}
|
|
|
|
#ifdef GDK_RENDERING_VULKAN
|
|
GskGpuOp *
|
|
gsk_gpu_op_vk_command (GskGpuOp *op,
|
|
GskGpuFrame *frame,
|
|
VkRenderPass render_pass,
|
|
VkFormat format,
|
|
VkCommandBuffer command_buffer)
|
|
{
|
|
return op->op_class->vk_command (op, frame, render_pass, format, command_buffer);
|
|
}
|
|
#endif
|
|
|
|
GskGpuOp *
|
|
gsk_gpu_op_gl_command (GskGpuOp *op,
|
|
GskGpuFrame *frame,
|
|
gsize flip_y)
|
|
{
|
|
return op->op_class->gl_command (op, frame, flip_y);
|
|
}
|
|
|