Commit Graph

29 Commits

Author SHA1 Message Date
Benjamin Otte
5822989e82 gdk: Add missing G_END_DECLS 2024-11-04 21:50:26 +01:00
Benjamin Otte
a7670bfcc5 gdk: Add GDK_DISABLE=aerosnap
Disables the Aerosnap hook for Windows which is particularly useful
when debugging because the aerosnap hook slows down keyboard input.
2024-10-31 15:27:43 +01:00
Matthias Clasen
26a2966a7b gdk: Beef up gdk_parse_debug_var
Add a docstring for the variable itself, and print it as part
of the help message. Update all callers to provide a docstring.
2024-08-19 20:40:32 -04:00
Matthias Clasen
de62ea96ab Add GDK_DISABLE=color-mgmt
This flag is meant to turn off color management features of GDK.
If this is set, all surfaces will report sRGB as their preferred
color state.
2024-08-19 20:40:32 -04:00
Matthias Clasen
2d230f79a6 Change the offload-disable flag
Move this from GSK_DEBUG=offload-disable to GDK_DISABLE=offload.
2024-08-19 20:40:32 -04:00
Matthias Clasen
cde094a0df Add a GDK_DISABLE env var
This is taking over the feature-disabling keys from GDK_DEBUG.
2024-08-19 20:40:32 -04:00
Matthias Clasen
7aeab7a63f Add a debug flag for hdr rendering
Set GDK_DEBUG=hdr to force the use of rec2100 as compositing
colorstate.
2024-07-13 15:11:07 -04:00
Matthias Clasen
a2389b3169 Cosmetics
Shift debug flags around so we can put hdr next to linear.
2024-07-13 15:11:07 -04:00
Benjamin Otte
a61d7f3864 vulkan: Remove GDK_DEBUG=vulkan-validate
The modern incantation to get validation layers enabled is via

VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation

Vulkan has a bunch of environment variables to toggle stuff, let's use
those instead of doing our own.
2024-07-13 08:52:28 -04:00
Benjamin Otte
01ca59ea91 gdk: Add GDK_DEBUG=linear for experimental linear rendering
This is a temporary solution to allow testing how well linear rendering
already works while refactoring code.

This will be removed once linear rendering is the default.
2024-07-11 14:57:19 +02:00
Matthias Clasen
0fb1f44eec gdk: Add a debug flag to allow non-dmabuf offload
This is useful for debugging offloading without having to rely
on gstreamer giving us dmabufs. To use it, set

GDK_DEBUG=force-offload

in the environment.
2024-04-15 19:53:46 -04:00
Matthias Clasen
f90e77d173 gdk: Enable fractional scaling for GL by default
The ngl renderer has good support for fractional scaling, so we
can enable this by default now.

If you are using the gl renderer, you can disable fractional
scaling with the

GDK_DEBUG=gl-no-fractional

environment variable.
2024-01-25 14:41:04 -05:00
Matthias Clasen
2dcec44714 Drop the nograbs debug value
This was only used in the x11 backend, and I haven't seen it
actively recommended for debugging anything in ages.
2023-11-20 08:02:03 -05:00
Matthias Clasen
f04c819439 Drop the gl-legacy debug value
The consensus is that we can do without this.
2023-11-20 08:02:02 -05:00
Matthias Clasen
025b846fce Add a debug value to prefer desktop GL
This will be used in the next commit, when we change the default
preference to be GLES.
2023-11-19 08:07:02 -05:00
Matthias Clasen
fcdbab3f69 gl: Tweak debug values for GL api selection
Replace GDK_DEBUG=gl-gles with GDK_DEBUG=gl-disable-gl, and add
a GDK_DEBUG=gl-disable-gles to match.
2023-11-19 08:07:02 -05:00
Matthias Clasen
efe1415429 gdk: Add a debug flag for subsurfaces
You can now use GDK_DEBUG=offload to get debug spew about
subsurfaces and graphics offload.
2023-11-13 22:17:35 +01:00
Benjamin Otte
1a93967e1f gdk: Remove debug modes in gdk_debug_parse_var()
Always support all variables.
2023-11-05 11:16:23 +01:00
Benjamin Otte
310ab7b531 Remove G_ENABLE_DEBUG around debug checks
It started out as busywork, but it does many separate things. If I could
start over, I'd take them apart into multiple commits:

1. Remove G_ENABLE_DEBUG around GDK_DEBUG_*() calls
   This is not needed at all, the calls themselves take care of it.

2. Remove G_ENABLE_DEBUG around profiling code
   This now enables profiling support in release builds.

3. Stop poking _gdk_debug_flags and use GDK_DEBUG_CHECK()
   This was old code that was never updated.

4. Make !G_ENABLE_DEBUG turn off GDK_DEBUG_CHECK()
   The code used to
     #define GDK_DEBUG_CHECK(...) false
     #define GDK_DEBUG(...)
   which would compile away all the code inside those macros. This
   means a lot of variable definitions and debug utility functions
   would suddenly no longer be used and cause compiler errors.
2023-11-05 11:16:23 +01:00
Benjamin Otte
d55801c8ba debug: Turn gdk_debug_message() into a function
1. MSVC can't deal with the nonstandard ##__VA_ARGS__

2. It allows setting a breakpoint on it.
2023-11-05 10:21:54 +01:00
Matthias Clasen
699f6a7993 Add a dmabuf debug flag
Add a new debug flag for dmabuf-related information,
and use it in gdkdmabuftexture.c.

This will let us separate out dmabuf debug spew from
opengl debug spew.
2023-10-15 11:05:32 -04:00
Benjamin Otte
57d8cc08a3 gdk: Add GDK_DEBUG=dmabuf-disable
I chose the name for consistency with gl-disable and vulkan-disable.
2023-10-14 22:30:17 +02:00
Benjamin Otte
02e2a6f311 gdk: Add GDK_DEBUG=no-vsync
That turns off waiting and freezing in the frame clock and in
surfaces and triggers redraws asap.
2023-05-09 16:29:41 +02:00
Matthias Clasen
4746ffc4eb Make fractional scaling for GL opt-in
Fractional scaling with the GL renderer is
experimental for now, so we disable it unless
GDK_DEBUG=gl-fractional is set.

This will give us time to work out the kinks.
2023-04-02 11:05:57 -04:00
Matthias Clasen
a1c5a806b3 Convert headers to #pragma once
The conversion was done by guard2one.
2023-03-31 15:11:10 -04:00
Matthias Clasen
a8d8724a02 gdk: Avoid a pointless indirection
Don't use g_fprintf if GLib is using system printf
anyway.
2023-03-27 21:56:41 -04:00
Matthias Clasen
e5560c1535 Add GDK_DEBUG=no-portals
Fixes: #5441
2022-12-14 13:50:20 -05:00
Matthias Clasen
60aaf38f39 gdk: Clean up gdkprivate.h
Move apis to more specific headers.
2022-11-17 22:49:56 -05:00
Matthias Clasen
c24a69549d Rename gdkdebug.h to gdkdebugprivate.h
This is the naming convention for private headers.
2022-09-23 23:12:01 -04:00