From 117863f1114551407c481abc752f5fcfd139c878 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20K=C3=A4fer?= Date: Tue, 22 Nov 2016 15:17:51 +0100 Subject: [PATCH] [build] move headless rendering files to platform/default --- benchmark/api/query.benchmark.cpp | 4 ++-- benchmark/src/mbgl/benchmark/util.cpp | 2 +- bin/render.cpp | 4 ++-- cmake/core-files.cmake | 5 ----- cmake/node.cmake | 1 + cmake/render.cmake | 1 + platform/darwin/src/headless_backend_cgl.cpp | 4 ++-- platform/darwin/src/headless_backend_eagl.mm | 2 +- platform/darwin/src/headless_display_cgl.cpp | 2 +- platform/default/headless_backend_osmesa.cpp | 2 +- platform/default/{ => mbgl/gl}/headless_backend.cpp | 4 ++-- .../default/mbgl/gl}/headless_backend.hpp | 0 platform/default/{ => mbgl/gl}/headless_display.cpp | 2 +- .../default/mbgl/gl}/headless_display.hpp | 0 platform/default/{ => mbgl/gl}/offscreen_view.cpp | 2 +- .../default/mbgl/gl}/offscreen_view.hpp | 0 platform/ios/config.cmake | 9 ++++++--- platform/linux/config.cmake | 9 ++++++--- platform/linux/src/headless_backend_egl.cpp | 4 ++-- platform/linux/src/headless_backend_glx.cpp | 4 ++-- platform/linux/src/headless_display_egl.cpp | 2 +- platform/linux/src/headless_display_glx.cpp | 2 +- platform/macos/config.cmake | 7 +++++-- platform/node/src/node_map.cpp | 2 +- platform/node/src/node_map.hpp | 4 ++-- platform/qt/config.cmake | 11 +++++++---- platform/qt/test/headless_backend_qt.cpp | 2 +- test/api/annotations.test.cpp | 4 ++-- test/api/api_misuse.test.cpp | 4 ++-- test/api/custom_layer.test.cpp | 4 ++-- test/api/query.test.cpp | 4 ++-- test/api/render_missing.test.cpp | 4 ++-- test/api/repeated_render.test.cpp | 4 ++-- test/gl/object.test.cpp | 4 ++-- test/map/map.test.cpp | 4 ++-- test/src/mbgl/test/util.cpp | 4 ++-- test/util/memory.test.cpp | 4 ++-- test/util/offscreen_texture.test.cpp | 4 ++-- 38 files changed, 72 insertions(+), 63 deletions(-) rename platform/default/{ => mbgl/gl}/headless_backend.cpp (92%) rename {include/mbgl/platform/default => platform/default/mbgl/gl}/headless_backend.hpp (100%) rename platform/default/{ => mbgl/gl}/headless_display.cpp (76%) rename {include/mbgl/platform/default => platform/default/mbgl/gl}/headless_display.hpp (100%) rename platform/default/{ => mbgl/gl}/offscreen_view.cpp (93%) rename {include/mbgl/platform/default => platform/default/mbgl/gl}/offscreen_view.hpp (100%) diff --git a/benchmark/api/query.benchmark.cpp b/benchmark/api/query.benchmark.cpp index dce878ea6..ba696876c 100644 --- a/benchmark/api/query.benchmark.cpp +++ b/benchmark/api/query.benchmark.cpp @@ -2,8 +2,8 @@ #include #include -#include -#include +#include +#include #include #include #include diff --git a/benchmark/src/mbgl/benchmark/util.cpp b/benchmark/src/mbgl/benchmark/util.cpp index 0befd7c3e..87d68ea72 100644 --- a/benchmark/src/mbgl/benchmark/util.cpp +++ b/benchmark/src/mbgl/benchmark/util.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include #include diff --git a/bin/render.cpp b/bin/render.cpp index c0348af75..6dd948204 100644 --- a/bin/render.cpp +++ b/bin/render.cpp @@ -3,8 +3,8 @@ #include #include -#include -#include +#include +#include #include #include diff --git a/cmake/core-files.cmake b/cmake/core-files.cmake index a49b8e534..4c50911b8 100644 --- a/cmake/core-files.cmake +++ b/cmake/core-files.cmake @@ -137,11 +137,6 @@ set(MBGL_CORE_FILES src/mbgl/platform/event.cpp src/mbgl/platform/log.cpp - # platform/default - include/mbgl/platform/default/headless_backend.hpp - include/mbgl/platform/default/headless_display.hpp - include/mbgl/platform/default/offscreen_view.hpp - # programs src/mbgl/programs/attributes.hpp src/mbgl/programs/circle_program.cpp diff --git a/cmake/node.cmake b/cmake/node.cmake index 8dd95a941..bb3112cc0 100644 --- a/cmake/node.cmake +++ b/cmake/node.cmake @@ -29,6 +29,7 @@ target_compile_options(mbgl-node target_include_directories(mbgl-node PRIVATE src # TODO: eliminate + PRIVATE platform/default ) target_link_libraries(mbgl-node diff --git a/cmake/render.cmake b/cmake/render.cmake index f1b09b3c4..395a10664 100644 --- a/cmake/render.cmake +++ b/cmake/render.cmake @@ -9,6 +9,7 @@ target_compile_options(mbgl-render target_include_directories(mbgl-render PRIVATE include PRIVATE src # TODO: eliminate + PRIVATE platform/default ) target_link_libraries(mbgl-render diff --git a/platform/darwin/src/headless_backend_cgl.cpp b/platform/darwin/src/headless_backend_cgl.cpp index dd062dd6a..7069738fb 100644 --- a/platform/darwin/src/headless_backend_cgl.cpp +++ b/platform/darwin/src/headless_backend_cgl.cpp @@ -1,5 +1,5 @@ -#include -#include +#include +#include #include #include diff --git a/platform/darwin/src/headless_backend_eagl.mm b/platform/darwin/src/headless_backend_eagl.mm index aa5efe6de..bd4a202ec 100644 --- a/platform/darwin/src/headless_backend_eagl.mm +++ b/platform/darwin/src/headless_backend_eagl.mm @@ -1,4 +1,4 @@ -#include +#include #include diff --git a/platform/darwin/src/headless_display_cgl.cpp b/platform/darwin/src/headless_display_cgl.cpp index e2907a80c..90d187d3d 100644 --- a/platform/darwin/src/headless_display_cgl.cpp +++ b/platform/darwin/src/headless_display_cgl.cpp @@ -1,4 +1,4 @@ -#include +#include #include diff --git a/platform/default/headless_backend_osmesa.cpp b/platform/default/headless_backend_osmesa.cpp index 04709d4a1..3dac5913a 100644 --- a/platform/default/headless_backend_osmesa.cpp +++ b/platform/default/headless_backend_osmesa.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/platform/default/headless_backend.cpp b/platform/default/mbgl/gl/headless_backend.cpp similarity index 92% rename from platform/default/headless_backend.cpp rename to platform/default/mbgl/gl/headless_backend.cpp index 30ce8d223..0bfdf11c9 100644 --- a/platform/default/headless_backend.cpp +++ b/platform/default/mbgl/gl/headless_backend.cpp @@ -1,5 +1,5 @@ -#include -#include +#include +#include #include #include diff --git a/include/mbgl/platform/default/headless_backend.hpp b/platform/default/mbgl/gl/headless_backend.hpp similarity index 100% rename from include/mbgl/platform/default/headless_backend.hpp rename to platform/default/mbgl/gl/headless_backend.hpp diff --git a/platform/default/headless_display.cpp b/platform/default/mbgl/gl/headless_display.cpp similarity index 76% rename from platform/default/headless_display.cpp rename to platform/default/mbgl/gl/headless_display.cpp index 4ab111f77..6247046c2 100644 --- a/platform/default/headless_display.cpp +++ b/platform/default/mbgl/gl/headless_display.cpp @@ -1,4 +1,4 @@ -#include +#include namespace mbgl { diff --git a/include/mbgl/platform/default/headless_display.hpp b/platform/default/mbgl/gl/headless_display.hpp similarity index 100% rename from include/mbgl/platform/default/headless_display.hpp rename to platform/default/mbgl/gl/headless_display.hpp diff --git a/platform/default/offscreen_view.cpp b/platform/default/mbgl/gl/offscreen_view.cpp similarity index 93% rename from platform/default/offscreen_view.cpp rename to platform/default/mbgl/gl/offscreen_view.cpp index 574686ebc..16faf6a4a 100644 --- a/platform/default/offscreen_view.cpp +++ b/platform/default/mbgl/gl/offscreen_view.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/include/mbgl/platform/default/offscreen_view.hpp b/platform/default/mbgl/gl/offscreen_view.hpp similarity index 100% rename from include/mbgl/platform/default/offscreen_view.hpp rename to platform/default/mbgl/gl/offscreen_view.hpp diff --git a/platform/ios/config.cmake b/platform/ios/config.cmake index 56cb5344a..565cfc8a1 100644 --- a/platform/ios/config.cmake +++ b/platform/ios/config.cmake @@ -42,10 +42,13 @@ macro(mbgl_platform_core) PRIVATE platform/darwin/src/image.mm # Headless view + PRIVATE platform/default/mbgl/gl/headless_backend.cpp + PRIVATE platform/default/mbgl/gl/headless_backend.hpp PRIVATE platform/darwin/src/headless_backend_eagl.mm - PRIVATE platform/default/headless_backend.cpp - PRIVATE platform/default/headless_display.cpp - PRIVATE platform/default/offscreen_view.cpp + PRIVATE platform/default/mbgl/gl/headless_display.cpp + PRIVATE platform/default/mbgl/gl/headless_display.hpp + PRIVATE platform/default/mbgl/gl/offscreen_view.cpp + PRIVATE platform/default/mbgl/gl/offscreen_view.hpp # Thread pool PRIVATE platform/default/mbgl/util/default_thread_pool.cpp diff --git a/platform/linux/config.cmake b/platform/linux/config.cmake index 312577a18..20679f53e 100644 --- a/platform/linux/config.cmake +++ b/platform/linux/config.cmake @@ -18,7 +18,7 @@ macro(mbgl_platform_core) if(WITH_OSMESA) target_sources(mbgl-core PRIVATE platform/default/headless_backend_osmesa.cpp - PRIVATE platform/default/headless_display.cpp + PRIVATE platform/default/mbgl/gl/headless_display.cpp ) target_add_mason_package(mbgl-core PUBLIC mesa) elseif(WITH_EGL) @@ -78,8 +78,11 @@ macro(mbgl_platform_core) PRIVATE platform/default/webp_reader.cpp # Headless view - PRIVATE platform/default/headless_backend.cpp - PRIVATE platform/default/offscreen_view.cpp + PRIVATE platform/default/mbgl/gl/headless_backend.cpp + PRIVATE platform/default/mbgl/gl/headless_backend.hpp + PRIVATE platform/default/mbgl/gl/headless_display.hpp + PRIVATE platform/default/mbgl/gl/offscreen_view.cpp + PRIVATE platform/default/mbgl/gl/offscreen_view.hpp # Thread pool PRIVATE platform/default/mbgl/util/default_thread_pool.cpp diff --git a/platform/linux/src/headless_backend_egl.cpp b/platform/linux/src/headless_backend_egl.cpp index 0fb33ea0e..6288cf380 100644 --- a/platform/linux/src/headless_backend_egl.cpp +++ b/platform/linux/src/headless_backend_egl.cpp @@ -1,5 +1,5 @@ -#include -#include +#include +#include #include diff --git a/platform/linux/src/headless_backend_glx.cpp b/platform/linux/src/headless_backend_glx.cpp index e1ea9cef1..79e3fe139 100644 --- a/platform/linux/src/headless_backend_glx.cpp +++ b/platform/linux/src/headless_backend_glx.cpp @@ -1,5 +1,5 @@ -#include -#include +#include +#include #include diff --git a/platform/linux/src/headless_display_egl.cpp b/platform/linux/src/headless_display_egl.cpp index 4be519cfc..95c2ebb6a 100644 --- a/platform/linux/src/headless_display_egl.cpp +++ b/platform/linux/src/headless_display_egl.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/platform/linux/src/headless_display_glx.cpp b/platform/linux/src/headless_display_glx.cpp index 2023d4dcd..4275ebb64 100644 --- a/platform/linux/src/headless_display_glx.cpp +++ b/platform/linux/src/headless_display_glx.cpp @@ -1,4 +1,4 @@ -#include +#include #include diff --git a/platform/macos/config.cmake b/platform/macos/config.cmake index 13b434117..6c518becf 100644 --- a/platform/macos/config.cmake +++ b/platform/macos/config.cmake @@ -42,10 +42,13 @@ macro(mbgl_platform_core) PRIVATE platform/darwin/src/image.mm # Headless view + PRIVATE platform/default/mbgl/gl/headless_backend.cpp + PRIVATE platform/default/mbgl/gl/headless_backend.hpp PRIVATE platform/darwin/src/headless_backend_cgl.cpp + PRIVATE platform/default/mbgl/gl/headless_display.hpp PRIVATE platform/darwin/src/headless_display_cgl.cpp - PRIVATE platform/default/headless_backend.cpp - PRIVATE platform/default/offscreen_view.cpp + PRIVATE platform/default/mbgl/gl/offscreen_view.cpp + PRIVATE platform/default/mbgl/gl/offscreen_view.hpp # Thread pool PRIVATE platform/default/mbgl/util/default_thread_pool.cpp diff --git a/platform/node/src/node_map.cpp b/platform/node/src/node_map.cpp index c0f86dfb6..48a954504 100644 --- a/platform/node/src/node_map.cpp +++ b/platform/node/src/node_map.cpp @@ -4,7 +4,7 @@ #include "node_conversion.hpp" #include "node_geojson.hpp" -#include +#include #include #include #include diff --git a/platform/node/src/node_map.hpp b/platform/node/src/node_map.hpp index 20ed1af4f..c68f543b0 100644 --- a/platform/node/src/node_map.hpp +++ b/platform/node/src/node_map.hpp @@ -4,8 +4,8 @@ #include #include -#include -#include +#include +#include #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/platform/qt/config.cmake b/platform/qt/config.cmake index 80274f5ba..30781fa42 100644 --- a/platform/qt/config.cmake +++ b/platform/qt/config.cmake @@ -43,11 +43,14 @@ endmacro() macro(mbgl_platform_test) target_sources(mbgl-test PRIVATE test/src/main.cpp - PRIVATE platform/qt/test/headless_backend_qt.cpp PRIVATE platform/qt/test/qmapboxgl.cpp - PRIVATE platform/default/headless_backend.cpp - PRIVATE platform/default/headless_display.cpp - PRIVATE platform/default/offscreen_view.cpp + PRIVATE platform/default/mbgl/gl/headless_backend.cpp + PRIVATE platform/default/mbgl/gl/headless_backend.hpp + PRIVATE platform/default/mbgl/gl/headless_display.cpp + PRIVATE platform/default/mbgl/gl/headless_display.hpp + PRIVATE platform/default/mbgl/gl/offscreen_view.cpp + PRIVATE platform/default/mbgl/gl/offscreen_view.hpp + PRIVATE platform/qt/test/headless_backend_qt.cpp ) set_source_files_properties( diff --git a/platform/qt/test/headless_backend_qt.cpp b/platform/qt/test/headless_backend_qt.cpp index f6552c455..1992cab2f 100644 --- a/platform/qt/test/headless_backend_qt.cpp +++ b/platform/qt/test/headless_backend_qt.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/test/api/annotations.test.cpp b/test/api/annotations.test.cpp index a06567301..a56992bc2 100644 --- a/test/api/annotations.test.cpp +++ b/test/api/annotations.test.cpp @@ -5,8 +5,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/test/api/api_misuse.test.cpp b/test/api/api_misuse.test.cpp index d28051449..34272f536 100644 --- a/test/api/api_misuse.test.cpp +++ b/test/api/api_misuse.test.cpp @@ -3,8 +3,8 @@ #include #include -#include -#include +#include +#include #include #include #include diff --git a/test/api/custom_layer.test.cpp b/test/api/custom_layer.test.cpp index e58fd0a68..73b4e94af 100644 --- a/test/api/custom_layer.test.cpp +++ b/test/api/custom_layer.test.cpp @@ -2,8 +2,8 @@ #include #include -#include -#include +#include +#include #include #include #include diff --git a/test/api/query.test.cpp b/test/api/query.test.cpp index a25e4df31..86687fc81 100644 --- a/test/api/query.test.cpp +++ b/test/api/query.test.cpp @@ -1,6 +1,6 @@ #include -#include -#include +#include +#include #include #include #include diff --git a/test/api/render_missing.test.cpp b/test/api/render_missing.test.cpp index b209713d0..a5c59913b 100644 --- a/test/api/render_missing.test.cpp +++ b/test/api/render_missing.test.cpp @@ -2,8 +2,8 @@ #include #include -#include -#include +#include +#include #include #include #include diff --git a/test/api/repeated_render.test.cpp b/test/api/repeated_render.test.cpp index a50fb4c6b..49b9a31b0 100644 --- a/test/api/repeated_render.test.cpp +++ b/test/api/repeated_render.test.cpp @@ -2,8 +2,8 @@ #include #include -#include -#include +#include +#include #include #include #include diff --git a/test/gl/object.test.cpp b/test/gl/object.test.cpp index 6e1e068c2..f1da93f1d 100644 --- a/test/gl/object.test.cpp +++ b/test/gl/object.test.cpp @@ -1,7 +1,7 @@ #include -#include -#include +#include +#include #include diff --git a/test/map/map.test.cpp b/test/map/map.test.cpp index b945b5e89..0df7c7c2a 100644 --- a/test/map/map.test.cpp +++ b/test/map/map.test.cpp @@ -4,8 +4,8 @@ #include #include -#include -#include +#include +#include #include #include #include diff --git a/test/src/mbgl/test/util.cpp b/test/src/mbgl/test/util.cpp index a3b6117d0..5935750db 100644 --- a/test/src/mbgl/test/util.cpp +++ b/test/src/mbgl/test/util.cpp @@ -1,8 +1,8 @@ #include #include -#include -#include +#include +#include #include #include #include diff --git a/test/util/memory.test.cpp b/test/util/memory.test.cpp index 420967bdf..984e7a3e2 100644 --- a/test/util/memory.test.cpp +++ b/test/util/memory.test.cpp @@ -2,8 +2,8 @@ #include #include -#include -#include +#include +#include #include #include #include diff --git a/test/util/offscreen_texture.test.cpp b/test/util/offscreen_texture.test.cpp index 1d6a6e80e..31fb98539 100644 --- a/test/util/offscreen_texture.test.cpp +++ b/test/util/offscreen_texture.test.cpp @@ -2,8 +2,8 @@ #include #include -#include -#include +#include +#include #include