Commit Graph

6 Commits

Author SHA1 Message Date
Benjamin Otte
d726ecdb5d gdk: Split enums from types
Add gdkenums.h for enums and keep gdktypes.h for types.

Makes both files easier to read.
2021-10-26 20:59:37 +02:00
Benjamin Otte
dcba783389 gdk: Rework gdk_pixbuf_get_from_texture()
Make it use gdk_memory_texture_from_texture().

Also make gdk_memory_format_alpha() privately available so that we can
detect if an image contains an alpha channel.
2021-10-18 12:08:57 +02:00
Benjamin Otte
7a50ebaa3f gdk: Move GdkMemoryFormat enum to gdktypes.h
It's used in too many places now.
2021-10-16 15:49:37 +02:00
Benjamin Otte
afa004fb8b memoryformat: Add gdk_memory_format_prefers_high_depth()
This is unused so far, but is part of preparations for high depth
support in renderers.
2021-10-06 22:50:07 +02:00
Benjamin Otte
149395c306 gl: Move memory <=> GL format mapping
Put it into gdkmemoryformat.c, where all the mapping goes.
2021-10-06 22:50:07 +02:00
Benjamin Otte
48781cf7f7 memorytexture: Split out GdkMemoryFormat handling
Also, now make gdk_memory_convert() the only conversion functions
and allow conversions between any 2 formats by going via a float[4].

This could be optimized via fast-paths, but so far it isn't.
2021-10-06 22:50:07 +02:00