mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 21:51:08 +00:00
1a85d569e3
This heaves over an inital chunk of code from the Vulkan renderer to execute shaders. The only shader that exists for now is a shader that draws a single texture. We use that to replace the blit op we were doing before.
53 lines
935 B
C
53 lines
935 B
C
#include "config.h"
|
|
|
|
#include "gskgpubufferprivate.h"
|
|
|
|
typedef struct _GskGpuBufferPrivate GskGpuBufferPrivate;
|
|
|
|
struct _GskGpuBufferPrivate
|
|
{
|
|
gsize size;
|
|
};
|
|
|
|
G_DEFINE_TYPE_WITH_PRIVATE (GskGpuBuffer, gsk_gpu_buffer, G_TYPE_OBJECT)
|
|
|
|
static void
|
|
gsk_gpu_buffer_class_init (GskGpuBufferClass *klass)
|
|
{
|
|
}
|
|
|
|
static void
|
|
gsk_gpu_buffer_init (GskGpuBuffer *self)
|
|
{
|
|
}
|
|
|
|
void
|
|
gsk_gpu_buffer_setup (GskGpuBuffer *self,
|
|
gsize size)
|
|
{
|
|
GskGpuBufferPrivate *priv = gsk_gpu_buffer_get_instance_private (self);
|
|
|
|
priv->size = size;
|
|
}
|
|
|
|
gsize
|
|
gsk_gpu_buffer_get_size (GskGpuBuffer *self)
|
|
{
|
|
GskGpuBufferPrivate *priv = gsk_gpu_buffer_get_instance_private (self);
|
|
|
|
return priv->size;
|
|
}
|
|
|
|
guchar *
|
|
gsk_gpu_buffer_map (GskGpuBuffer *self)
|
|
{
|
|
return GSK_GPU_BUFFER_GET_CLASS (self)->map (self);
|
|
}
|
|
|
|
void
|
|
gsk_gpu_buffer_unmap (GskGpuBuffer *self)
|
|
{
|
|
GSK_GPU_BUFFER_GET_CLASS (self)->unmap (self);
|
|
}
|
|
|