From e2957483ab8ff10a2b78b6fc2b3536070fcc2e53 Mon Sep 17 00:00:00 2001 From: Lee Morgan Date: Wed, 26 Aug 2015 14:15:49 +0100 Subject: [PATCH] Added network build option. Disabled by default. Change-Id: Id7d762a9a00168eb84eaff3de486f5db08e13a40 --- adaptors/base/file.list | 11 +++++++---- adaptors/common/adaptor-impl.cpp | 6 +++++- build/tizen/adaptor/Makefile.am | 5 +++++ build/tizen/configure.ac | 14 ++++++++++++++ 4 files changed, 31 insertions(+), 5 deletions(-) diff --git a/adaptors/base/file.list b/adaptors/base/file.list index 2c73f0e..9108fc0 100644 --- a/adaptors/base/file.list +++ b/adaptors/base/file.list @@ -11,13 +11,16 @@ base_adaptor_src_files = \ $(base_adaptor_src_dir)/update-thread.cpp \ $(base_adaptor_src_dir)/vsync-notifier.cpp \ $(base_adaptor_src_dir)/performance-logging/frame-time-stamp.cpp \ + $(base_adaptor_src_dir)/performance-logging/frame-time-stats.cpp \ + $(base_adaptor_src_dir)/performance-logging/performance-marker.cpp \ + $(base_adaptor_src_dir)/performance-logging/statistics/stat-context.cpp \ + $(base_adaptor_src_dir)/performance-logging/statistics/stat-context-manager.cpp + +base_adaptor_networking_src_files = \ $(base_adaptor_src_dir)/performance-logging/networking/network-performance-protocol.cpp \ $(base_adaptor_src_dir)/performance-logging/networking/network-performance-client.cpp \ $(base_adaptor_src_dir)/performance-logging/networking/network-performance-server.cpp \ $(base_adaptor_src_dir)/performance-logging/networking/event/automation.cpp \ - $(base_adaptor_src_dir)/performance-logging/frame-time-stats.cpp \ - $(base_adaptor_src_dir)/performance-logging/performance-marker.cpp \ - $(base_adaptor_src_dir)/performance-logging/statistics/stat-context.cpp \ - $(base_adaptor_src_dir)/performance-logging/statistics/stat-context-manager.cpp \ $(base_adaptor_src_dir)/performance-logging/performance-server.cpp \ $(base_adaptor_src_dir)/performance-logging/performance-interface-factory.cpp + diff --git a/adaptors/common/adaptor-impl.cpp b/adaptors/common/adaptor-impl.cpp index e261926..534fd99 100644 --- a/adaptors/common/adaptor-impl.cpp +++ b/adaptors/common/adaptor-impl.cpp @@ -29,7 +29,9 @@ // INTERNAL INCLUDES #include -#include +#if defined(NETWORK_ENABLED) +# include +#endif #include #include @@ -112,10 +114,12 @@ void Adaptor::Initialize( Dali::Configuration::ContextLoss configuration ) // Note, Tizen does not use DALI_RETAINS_ALL_DATA, as it can reload images from // files automatically. +#if defined(NETWORK_ENABLED) if( mEnvironmentOptions->PerformanceServerRequired() ) { mPerformanceInterface = PerformanceInterfaceFactory::CreateInterface( *this, *mEnvironmentOptions ); } +#endif mCallbackManager = CallbackManager::New(); diff --git a/build/tizen/adaptor/Makefile.am b/build/tizen/adaptor/Makefile.am index c04e450..72d1463 100644 --- a/build/tizen/adaptor/Makefile.am +++ b/build/tizen/adaptor/Makefile.am @@ -192,6 +192,11 @@ libdali_adaptor_la_SOURCES = \ $(input_event_handler_src_files) +if ENABLE_NETWORK +libdali_adaptor_la_SOURCES += \ + $(base_adaptor_networking_src_files) +endif + libdali_adaptor_la_DEPENDENCIES = # List include directories with more platform-specific (tizen) before portable root: diff --git a/build/tizen/configure.ac b/build/tizen/configure.ac index de9034c..c10e89a 100644 --- a/build/tizen/configure.ac +++ b/build/tizen/configure.ac @@ -95,6 +95,13 @@ AC_ARG_ENABLE(shaderbincache, [enable_shaderbincache=$enableval], [enable_shaderbincache=DISABLE]) +AC_ARG_ENABLE(network, + [AC_HELP_STRING([--enable-network], + [enables network for debug tool])], + [enable_network=$enableval], + [enable_network=no]) + + if test "x$enable_debug" = "xyes"; then DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DDEBUG_ENABLED" fi @@ -107,6 +114,10 @@ if test "x$enable_shaderbincache" = "xENABLE"; then DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DSHADERBIN_CACHE_ENABLED" fi +if test "x$enable_network" = "xyes"; then + DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DNETWORK_ENABLED" +fi + # If Ecore IMF version is greater than 1.13, then some structures are different if test "x$ecore_imf_1_13" = "xyes"; then DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DECORE_IMF_1_13" @@ -178,6 +189,8 @@ AM_CONDITIONAL([TV_PROFILE], [test x$enable_profile = xTV]) AM_CONDITIONAL([UBUNTU_PROFILE], [test x$enable_profile = xUBUNTU]) AM_CONDITIONAL([WAYLAND], [test x$enable_wayland = xyes]) +AM_CONDITIONAL([ENABLE_NETWORK], [test x$enable_network = xyes]) + # Platforms should either enable features or remove them, they # should not disable features. This allows the developer to override # features through the command line. @@ -284,6 +297,7 @@ Configuration Shader Binary Cache: $enable_shaderbincache Build for Node.JS (LibUV) $build_for_node_js Ecore Version At Least 1.13.0 $ecore_imf_1_13 + Network enabled: $enable_network " # optional output of node.js source path if we're building for node.js if test "x$build_for_node_js" != "xno"; then -- 2.7.4