gtk/gsk/gpu/gskgpuuploadopprivate.h
Benjamin Otte c29237c75d gpu: Add support for texture-scale nodes
This adds GSK_GPU_IMAGE_CAN_MIPMAP and GSK_GPU_IMAGE_MIPMAP flags and
support to ensure_image() and image creation functions for creating a
mipmapped image.

Mipmaps are created using the new mipmap op that uses
glGenerateMipmap() on GL and equivalent blit ops on Vulkan.

This is then used to ensure the image is mipmapped when rendering it
with a texture-scale node.
2024-01-07 07:22:51 +01:00

28 lines
1.6 KiB
C

#pragma once
#include "gskgpuopprivate.h"
#include "gsktypes.h"
G_BEGIN_DECLS
GskGpuImage * gsk_gpu_upload_texture_op_try (GskGpuFrame *frame,
gboolean with_mipmap,
GdkTexture *texture);
GskGpuImage * gsk_gpu_upload_cairo_op (GskGpuFrame *frame,
GskRenderNode *node,
const graphene_vec2_t *scale,
const graphene_rect_t *viewport);
void gsk_gpu_upload_glyph_op (GskGpuFrame *frame,
GskGpuImage *image,
PangoFont *font,
PangoGlyph glyph,
const cairo_rectangle_int_t *area,
float scale,
const graphene_point_t *origin);
G_END_DECLS