From 0e1d65d5a27340ba5a5e1c8368b665403e51e261 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Thu, 13 Jan 2022 16:02:41 +0200 Subject: [PATCH] Move opengl context attribute builders to utils directory --- autotests/CMakeLists.txt | 4 ++-- autotests/opengl_context_attribute_builder_test.cpp | 4 ++-- src/CMakeLists.txt | 2 -- src/backends/x11/standalone/glx_context_attribute_builder.h | 2 +- src/effects/screenshot/screenshotdbusinterface1.cpp | 2 +- src/effects/screenshot/screenshotdbusinterface2.cpp | 2 +- src/platformsupport/scenes/opengl/abstract_egl_backend.cpp | 2 +- src/plugins/qpa/eglplatformcontext.cpp | 2 +- src/utils/CMakeLists.txt | 2 ++ src/{ => utils}/abstract_opengl_context_attribute_builder.cpp | 0 src/{ => utils}/abstract_opengl_context_attribute_builder.h | 0 src/{ => utils}/egl_context_attribute_builder.cpp | 0 src/{ => utils}/egl_context_attribute_builder.h | 0 src/{service_utils.h => utils/serviceutils.h} | 0 src/wayland_server.cpp | 2 +- 15 files changed, 12 insertions(+), 12 deletions(-) rename src/{ => utils}/abstract_opengl_context_attribute_builder.cpp (100%) rename src/{ => utils}/abstract_opengl_context_attribute_builder.h (100%) rename src/{ => utils}/egl_context_attribute_builder.cpp (100%) rename src/{ => utils}/egl_context_attribute_builder.h (100%) rename src/{service_utils.h => utils/serviceutils.h} (100%) diff --git a/autotests/CMakeLists.txt b/autotests/CMakeLists.txt index 0a08fce8cf..17800c0288 100644 --- a/autotests/CMakeLists.txt +++ b/autotests/CMakeLists.txt @@ -186,8 +186,8 @@ add_test(NAME kwin-testX11TimestampUpdate COMMAND testX11TimestampUpdate) ecm_mark_as_test(testX11TimestampUpdate) set(testOpenGLContextAttributeBuilder_SRCS - ../src/abstract_opengl_context_attribute_builder.cpp - ../src/egl_context_attribute_builder.cpp + ../src/utils/abstract_opengl_context_attribute_builder.cpp + ../src/utils/egl_context_attribute_builder.cpp opengl_context_attribute_builder_test.cpp ) diff --git a/autotests/opengl_context_attribute_builder_test.cpp b/autotests/opengl_context_attribute_builder_test.cpp index 0ccf1942d9..1002c23344 100644 --- a/autotests/opengl_context_attribute_builder_test.cpp +++ b/autotests/opengl_context_attribute_builder_test.cpp @@ -6,8 +6,8 @@ SPDX-License-Identifier: GPL-2.0-or-later */ -#include "abstract_opengl_context_attribute_builder.h" -#include "egl_context_attribute_builder.h" +#include "utils/abstract_opengl_context_attribute_builder.h" +#include "utils/egl_context_attribute_builder.h" #include #include diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 2059f90bd5..69ae727436 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -28,7 +28,6 @@ set_target_properties(kwin PROPERTIES target_sources(kwin PRIVATE 3rdparty/xcursor.c abstract_client.cpp - abstract_opengl_context_attribute_builder.cpp abstract_output.cpp abstract_wayland_output.cpp activation.cpp @@ -50,7 +49,6 @@ target_sources(kwin PRIVATE dpmsinputeventfilter.cpp effectloader.cpp effects.cpp - egl_context_attribute_builder.cpp events.cpp focuschain.cpp ftrace.cpp diff --git a/src/backends/x11/standalone/glx_context_attribute_builder.h b/src/backends/x11/standalone/glx_context_attribute_builder.h index 460f519b28..b636c7e69a 100644 --- a/src/backends/x11/standalone/glx_context_attribute_builder.h +++ b/src/backends/x11/standalone/glx_context_attribute_builder.h @@ -7,7 +7,7 @@ SPDX-License-Identifier: GPL-2.0-or-later */ #pragma once -#include "abstract_opengl_context_attribute_builder.h" +#include "utils/abstract_opengl_context_attribute_builder.h" namespace KWin { diff --git a/src/effects/screenshot/screenshotdbusinterface1.cpp b/src/effects/screenshot/screenshotdbusinterface1.cpp index fd642bab90..1bc056c9db 100644 --- a/src/effects/screenshot/screenshotdbusinterface1.cpp +++ b/src/effects/screenshot/screenshotdbusinterface1.cpp @@ -7,7 +7,7 @@ #include "screenshotdbusinterface1.h" #include "screenshotlogging.h" -#include "../service_utils.h" +#include "utils/serviceutils.h" #include #include diff --git a/src/effects/screenshot/screenshotdbusinterface2.cpp b/src/effects/screenshot/screenshotdbusinterface2.cpp index 9a7abe7669..b8c7a4da5e 100644 --- a/src/effects/screenshot/screenshotdbusinterface2.cpp +++ b/src/effects/screenshot/screenshotdbusinterface2.cpp @@ -7,9 +7,9 @@ */ #include "screenshotdbusinterface2.h" -#include "../service_utils.h" #include "screenshot2adaptor.h" #include "screenshotlogging.h" +#include "utils/serviceutils.h" #include diff --git a/src/platformsupport/scenes/opengl/abstract_egl_backend.cpp b/src/platformsupport/scenes/opengl/abstract_egl_backend.cpp index d7c09fce82..8c7eff37b5 100644 --- a/src/platformsupport/scenes/opengl/abstract_egl_backend.cpp +++ b/src/platformsupport/scenes/opengl/abstract_egl_backend.cpp @@ -9,9 +9,9 @@ #include "abstract_egl_backend.h" #include "egl_dmabuf.h" #include "composite.h" -#include "egl_context_attribute_builder.h" #include "options.h" #include "platform.h" +#include "utils/egl_context_attribute_builder.h" #include "wayland_server.h" #include "abstract_wayland_output.h" #include diff --git a/src/plugins/qpa/eglplatformcontext.cpp b/src/plugins/qpa/eglplatformcontext.cpp index f30e0ff028..dfa16a7310 100644 --- a/src/plugins/qpa/eglplatformcontext.cpp +++ b/src/plugins/qpa/eglplatformcontext.cpp @@ -9,11 +9,11 @@ */ #include "eglplatformcontext.h" -#include "egl_context_attribute_builder.h" #include "eglhelpers.h" #include "internal_client.h" #include "offscreensurface.h" #include "platform.h" +#include "utils/egl_context_attribute_builder.h" #include "window.h" #include "logging.h" diff --git a/src/utils/CMakeLists.txt b/src/utils/CMakeLists.txt index 7b5baeec48..af238aa699 100644 --- a/src/utils/CMakeLists.txt +++ b/src/utils/CMakeLists.txt @@ -1,3 +1,5 @@ target_sources(kwin PRIVATE + abstract_opengl_context_attribute_builder.cpp + egl_context_attribute_builder.cpp xcbutils.cpp ) diff --git a/src/abstract_opengl_context_attribute_builder.cpp b/src/utils/abstract_opengl_context_attribute_builder.cpp similarity index 100% rename from src/abstract_opengl_context_attribute_builder.cpp rename to src/utils/abstract_opengl_context_attribute_builder.cpp diff --git a/src/abstract_opengl_context_attribute_builder.h b/src/utils/abstract_opengl_context_attribute_builder.h similarity index 100% rename from src/abstract_opengl_context_attribute_builder.h rename to src/utils/abstract_opengl_context_attribute_builder.h diff --git a/src/egl_context_attribute_builder.cpp b/src/utils/egl_context_attribute_builder.cpp similarity index 100% rename from src/egl_context_attribute_builder.cpp rename to src/utils/egl_context_attribute_builder.cpp diff --git a/src/egl_context_attribute_builder.h b/src/utils/egl_context_attribute_builder.h similarity index 100% rename from src/egl_context_attribute_builder.h rename to src/utils/egl_context_attribute_builder.h diff --git a/src/service_utils.h b/src/utils/serviceutils.h similarity index 100% rename from src/service_utils.h rename to src/utils/serviceutils.h diff --git a/src/wayland_server.cpp b/src/wayland_server.cpp index 8bbbda4462..e2e451e56c 100644 --- a/src/wayland_server.cpp +++ b/src/wayland_server.cpp @@ -21,8 +21,8 @@ #include "workspace.h" #include "xdgshellclient.h" #include "xdgactivationv1.h" -#include "service_utils.h" #include "unmanaged.h" +#include "utils/serviceutils.h" #include "waylandoutput.h" #include "waylandoutputdevicev2.h" #include "virtualdesktops.h"