gsk: Add a 'colorize' optimization flag

We are going to add an optimization that turns color ops into
colorize ops when beneficial. This flags will make it possible
to turn that off with

GSK_GPU_SKIP=colorize
This commit is contained in:
Matthias Clasen
2024-03-05 09:11:13 -05:00
committed by Christian Hergert
parent 6ad68ed755
commit 67b2ae5932
2 changed files with 5 additions and 1 deletions

View File

@@ -31,7 +31,9 @@ static const GdkDebugKey gsk_gpu_optimization_keys[] = {
{ "gradients", GSK_GPU_OPTIMIZE_GRADIENTS, "Don't supersample gradients" },
{ "mipmap", GSK_GPU_OPTIMIZE_MIPMAP, "Avoid creating mipmaps" },
{ "glyph-align", GSK_GPU_OPTIMIZE_GLYPH_ALIGN, "Never align glyphs to the subpixel grid" },
{ "colorize", GSK_GPU_OPTIMIZE_COLORIZE, "Don't replace color by colorize" },
/* These require hardware support */
{ "gl-baseinstance", GSK_GPU_OPTIMIZE_GL_BASE_INSTANCE, "Assume no ARB/EXT_base_instance support" },
};

View File

@@ -119,7 +119,9 @@ typedef enum {
GSK_GPU_OPTIMIZE_GRADIENTS = 1 << 4,
GSK_GPU_OPTIMIZE_MIPMAP = 1 << 5,
GSK_GPU_OPTIMIZE_GLYPH_ALIGN = 1 << 6,
GSK_GPU_OPTIMIZE_COLORIZE = 1 << 7,
/* These require hardware support */
GSK_GPU_OPTIMIZE_GL_BASE_INSTANCE = 1 << 7,
GSK_GPU_OPTIMIZE_GL_BASE_INSTANCE = 1 << 16,
} GskGpuOptimizations;