mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 14:10:30 +00:00
6e6fa3daed
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.
49 lines
1.5 KiB
C
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);
|
|
|