gsk: Don't autoinclude backend-specific headers

Don't install headers for code that we don't build.
And don't include those headers in gsk.h.

Just as we do in gdk, require applications to include
the backend-specific headers they need explicitly.

Update the one affected demo, gtk4-node-editor.
This commit is contained in:
Matthias Clasen 2020-04-24 21:38:52 -04:00
parent 02fa948914
commit 79e1c66657
3 changed files with 21 additions and 13 deletions

View File

@ -24,6 +24,13 @@
#include "gtkrendererpaintableprivate.h" #include "gtkrendererpaintableprivate.h"
#include "gsk/gskrendernodeparserprivate.h" #include "gsk/gskrendernodeparserprivate.h"
#include "gsk/gl/gskglrenderer.h"
#ifdef GDK_WINDOWING_BROADWAY
#include "gsk/broadway/gskbroadwayrenderer.h"
#endif
#ifdef GDK_RENDERING_VULKAN
#include "gsk/vulkan/gskvulkanrenderer.h"
#endif
#ifndef NODE_EDITOR_SOURCE_DIR #ifndef NODE_EDITOR_SOURCE_DIR
#define NODE_EDITOR_SOURCE_DIR "." /* Fallback */ #define NODE_EDITOR_SOURCE_DIR "." /* Fallback */

View File

@ -27,9 +27,6 @@
#include <gsk/gsktransform.h> #include <gsk/gsktransform.h>
#include <gsk/gskcairorenderer.h> #include <gsk/gskcairorenderer.h>
#include <gsk/gl/gskglrenderer.h>
#include <gsk/broadway/gskbroadwayrenderer.h>
#include <gsk/vulkan/gskvulkanrenderer.h>
#include <gsk/gsktypes.h> #include <gsk/gsktypes.h>
#include <gsk/gskenumtypes.h> #include <gsk/gskenumtypes.h>

View File

@ -66,17 +66,21 @@ gsk_public_gl_headers = files([
install_headers(gsk_public_gl_headers, subdir: 'gtk-4.0/gsk/gl') install_headers(gsk_public_gl_headers, subdir: 'gtk-4.0/gsk/gl')
gsk_public_headers += gsk_public_gl_headers gsk_public_headers += gsk_public_gl_headers
gsk_public_broadway_headers = files([ if get_variable('broadway_enabled')
'broadway/gskbroadwayrenderer.h' gsk_public_broadway_headers = files([
]) 'broadway/gskbroadwayrenderer.h'
install_headers(gsk_public_broadway_headers, subdir: 'gtk-4.0/gsk/broadway') ])
gsk_public_headers += gsk_public_broadway_headers install_headers(gsk_public_broadway_headers, subdir: 'gtk-4.0/gsk/broadway')
gsk_public_headers += gsk_public_broadway_headers
endif
gsk_public_vulkan_headers = files([ if have_vulkan
'vulkan/gskvulkanrenderer.h' gsk_public_vulkan_headers = files([
]) 'vulkan/gskvulkanrenderer.h'
install_headers(gsk_public_vulkan_headers, subdir: 'gtk-4.0/gsk/vulkan') ])
gsk_public_headers += gsk_public_vulkan_headers install_headers(gsk_public_vulkan_headers, subdir: 'gtk-4.0/gsk/vulkan')
gsk_public_headers += gsk_public_vulkan_headers
endif
gsk_private_vulkan_shaders = [] gsk_private_vulkan_shaders = []
# This is an odd split because we use configure_file() below to workaround # This is an odd split because we use configure_file() below to workaround