gtk/gsk/vulkan/gskvulkanglyphcacheprivate.h
Benjamin Otte 6e6fa3daed vulkan: Make glyphs use new node ops
This is a rudimentary - but working - port.
Glyph uploads are still using the old machinery, a bunch of functions
still exist that probably aren't necessary anymore and each glyph emits
its own node.

This will need to be improved in further commits.
2023-07-16 12:13:00 +02:00

49 lines
1.5 KiB
C

#pragma once
#include <pango/pango.h>
#include "gskvulkanimageprivate.h"
G_BEGIN_DECLS
#define GSK_TYPE_VULKAN_GLYPH_CACHE (gsk_vulkan_glyph_cache_get_type ())
G_DECLARE_FINAL_TYPE(GskVulkanGlyphCache, gsk_vulkan_glyph_cache, GSK, VULKAN_GLYPH_CACHE, GObject)
typedef struct
{
guint texture_index;
float tx;
float ty;
float tw;
float th;
int draw_x;
int draw_y;
int draw_width;
int draw_height;
GskVulkanImage *atlas_image;
int atlas_x;
int atlas_y;
guint64 timestamp;
} GskVulkanCachedGlyph;
GskVulkanGlyphCache *gsk_vulkan_glyph_cache_new (GdkVulkanContext *vulkan);
void gsk_vulkan_glyph_cache_upload (GskVulkanGlyphCache *cache,
GskVulkanUploader *uploader);
GskVulkanCachedGlyph *gsk_vulkan_glyph_cache_lookup (GskVulkanGlyphCache *cache,
gboolean create,
PangoFont *font,
PangoGlyph glyph,
int x,
int y,
float scale);
void gsk_vulkan_glyph_cache_begin_frame (GskVulkanGlyphCache *cache);