mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-13 14:00:09 +00:00
c64836e1c9
This moves a lot of the texture atlas control out of the driver and into the various texture libraries through their base GskGLTextureLibrary class. Additionally, this gives more control to libraries on allocating which can be necessary for some tooling such as future Glyphy integration. As part of this, the 1x1 pixel initialization is moved to the Glyph library which is the only place where it is actually needed. The compact vfunc now is responsible for compaction and it allows for us to iterate the atlas hashtable a single time instead of twice as we were doing previously. The init_atlas vfunc is used to do per-library initialization such as adding a 1x1 pixel in the Glyph cache used for coloring lines. The allocate vfunc purely allocates but does no upload. This can be useful for situations where a library wants to reuse the allocator from the base class but does not want to actually insert a key/value entry. The glyph library uses this for it's 1x1 pixel. In the future, we will also likely want to decouple the rectangle packing implementation from the atlas structure, or at least move it into a union so that we do not allocate unused memory for alternate allocators. |
||
---|---|---|
.. | ||
resources | ||
fp16.c | ||
fp16i.c | ||
fp16private.h | ||
gskglattachmentstate.c | ||
gskglattachmentstateprivate.h | ||
gskglbuffer.c | ||
gskglbufferprivate.h | ||
gskglcommandqueue.c | ||
gskglcommandqueueprivate.h | ||
gskglcompiler.c | ||
gskglcompilerprivate.h | ||
gskgldriver.c | ||
gskgldriverprivate.h | ||
gskglglyphlibrary.c | ||
gskglglyphlibraryprivate.h | ||
gskgliconlibrary.c | ||
gskgliconlibraryprivate.h | ||
gskglprofiler.c | ||
gskglprofilerprivate.h | ||
gskglprogram.c | ||
gskglprogramprivate.h | ||
gskglprograms.defs | ||
gskglrenderer.c | ||
gskglrenderer.h | ||
gskglrendererprivate.h | ||
gskglrenderjob.c | ||
gskglrenderjobprivate.h | ||
gskglshadowlibrary.c | ||
gskglshadowlibraryprivate.h | ||
gskgltexture.c | ||
gskgltexturelibrary.c | ||
gskgltexturelibraryprivate.h | ||
gskgltextureprivate.h | ||
gskgltypesprivate.h | ||
gskgluniformstate.c | ||
gskgluniformstateprivate.h | ||
inlinearray.h | ||
ninesliceprivate.h | ||
stb_rect_pack.c | ||
stb_rect_pack.h |