Graphics integration API deployment and fixing missing symbols
authoradam.b <jsr184@gmail.com>
Fri, 17 Nov 2017 16:00:50 +0000 (16:00 +0000)
committeradam.b <jsr184@gmail.com>
Fri, 17 Nov 2017 16:44:39 +0000 (16:44 +0000)
Recreating properly whole directory structure
when deploying graphics integration api.

Test application fixed to import Graphics object

Change-Id: I03fa16bbdf77f96f7b43cb90ef462658a1ff6b3a

15 files changed:
automated-tests/src/dali/dali-test-suite-utils/test-application.cpp
automated-tests/src/dali/dali-test-suite-utils/test-application.h
build/tizen/dali-core/Makefile.am
dali/graphics/vulkan/vulkan-standalone-test.cpp
dali/graphics/vulkan/vulkan-types.h
dali/integration-api/core.cpp
dali/integration-api/core.h
dali/integration-api/file.list
dali/integration-api/graphics/file.list
dali/integration-api/graphics/graphics.cpp
dali/integration-api/graphics/graphics.h
dali/integration-api/graphics/vulkan/vk-surface-factory.h
dali/integration-api/graphics/vulkan/vulkan-hpp-wrapper.h [new file with mode: 0644]
dali/internal/common/core-impl.cpp
dali/internal/common/core-impl.h

index 54a69bb..5a18b44 100644 (file)
@@ -64,6 +64,7 @@ void TestApplication::Initialize()
 
   mCore = Dali::Integration::Core::New( mRenderController,
                                         mPlatformAbstraction,
+                                        mGraphics,
                                         mGlAbstraction,
                                         mGlSyncAbstraction,
                                         mGestureManager,
index 5c94252..6bb6ec9 100644 (file)
@@ -26,6 +26,7 @@
 #include "test-render-controller.h"
 #include <dali/public-api/common/dali-common.h>
 #include <dali/integration-api/resource-policies.h>
+#include <dali/integration-api/graphics/graphics.h>
 
 namespace Dali
 {
@@ -88,11 +89,12 @@ private:
   void DoUpdate( unsigned int intervalMilliseconds, const char* location=NULL );
 
 protected:
-  TestPlatformAbstraction   mPlatformAbstraction;
-  TestRenderController      mRenderController;
-  TestGlAbstraction         mGlAbstraction;
-  TestGlSyncAbstraction     mGlSyncAbstraction;
-  TestGestureManager        mGestureManager;
+  TestPlatformAbstraction             mPlatformAbstraction;
+  Integration::Graphics::Graphics     mGraphics;
+  TestRenderController                mRenderController;
+  TestGlAbstraction                   mGlAbstraction;
+  TestGlSyncAbstraction               mGlSyncAbstraction;
+  TestGestureManager                  mGestureManager;
 
   Integration::UpdateStatus mStatus;
   Integration::RenderStatus mRenderStatus;
index a1ac397..188dc23 100644 (file)
@@ -47,7 +47,7 @@ DALI_CORE_LA_CXXFLAGS = -DDALI_COMPILATION \
                          $(DALI_CFLAGS)
 
 
-DALI_CORE_LA_LDFLAGS = $(DALI_LDFLAGS)
+DALI_CORE_LA_LDFLAGS = $(DALI_LDFLAGS) -Wl,--whole-archive,graphics/libdali-graphics.a,--no-whole-archive
 
 DALI_CORE_LA_LIBADD = $(DALI_LDFLAGS) \
                       $(VULKAN_LIBS) \
@@ -78,10 +78,12 @@ endif
 platformabstractiondir = $(includedir)/dali/integration-api
 platformabstractioneventsdir = $(includedir)/dali/integration-api/events
 platformabstractiongraphicsdir = $(includedir)/dali/integration-api/graphics
+platformabstractiongraphicsvulkandir = $(includedir)/dali/integration-api/graphics/vulkan
 
 platformabstraction_HEADERS = $(platform_abstraction_header_files)
 platformabstractionevents_HEADERS = $(platform_abstraction_events_header_files)
 platformabstractiongraphics_HEADERS = $(graphics_integration_header_files)
+platformabstractiongraphicsvulkan_HEADERS = $(graphics_vulkan_integration_header_files)
 
 #devel api (used by adaptor / toolkit
 develapidir = $(devincludepath)/dali/devel-api
@@ -158,13 +160,15 @@ linker_test_SOURCES = linker-test.cpp  \
 linker_test_CXXFLAGS = \
   $(cxx_flags) \
   -I../../../automated-tests/src/dali/dali-test-suite-utils \
-  $(dali_core_includes)
+  $(dali_core_includes) \
+  $(VULKAN_CFLAGS)
 
 if ENABLE_CXX03_ABI
 
 linker_test_DEPENDENCIES = libdali-core.la
 linker_test_LDADD = \
-  libdali-core.la
+  libdali-core.la \
+  $(VULKAN_LIBS)
 
 if ENABLE_RENAME_SO
 #rename
@@ -178,7 +182,8 @@ else
 
 linker_test_DEPENDENCIES = libdali-core-cxx11.la
 linker_test_LDADD = \
-  libdali-core-cxx11.la
+  libdali-core-cxx11.la \
+  $(VULKAN_LIBS)
 
 if ENABLE_RENAME_SO
 #rename
index 92d3023..f42b323 100644 (file)
@@ -12,7 +12,7 @@
 #define VK_USE_PLATFORM_XCB_KHR
 #endif
 
-#include <dali/graphics/vulkan/vulkan-hpp-wrapper.h>
+#include <dali/integration-api/graphics/vulkan/vulkan-hpp-wrapper.h>
 
 #include <dali/integration-api/graphics/vulkan/vk-surface-factory.h>
 #include <dali/integration-api/graphics/graphics.h>
index 6f0dd62..255c549 100644 (file)
@@ -23,7 +23,7 @@
 #include <unordered_map>
 #include <memory>
 
-#include <dali/graphics/vulkan/vulkan-hpp-wrapper.h>
+#include <dali/integration-api/graphics/vulkan/vulkan-hpp-wrapper.h>
 
 namespace Dali
 {
index dbe71ec..a72bcc7 100644 (file)
@@ -22,6 +22,7 @@
 #include <dali/public-api/common/dali-common.h>
 #include <dali/integration-api/events/event.h>
 #include <dali/integration-api/gl-sync-abstraction.h>
+#include <dali/integration-api/graphics/graphics.h>
 #include <dali/internal/common/core-impl.h>
 
 namespace Dali
@@ -32,6 +33,7 @@ namespace Integration
 
 Core* Core::New( RenderController& renderController,
                  PlatformAbstraction& platformAbstraction,
+                 Graphics::Graphics& graphics,
                  GlAbstraction& glAbstraction,
                  GlSyncAbstraction& glSyncAbstraction,
                  GestureManager& gestureManager,
@@ -41,6 +43,7 @@ Core* Core::New( RenderController& renderController,
   Core* instance = new Core;
   instance->mImpl = new Internal::Core( renderController,
                                         platformAbstraction,
+                                        graphics,
                                         glAbstraction,
                                         glSyncAbstraction,
                                         gestureManager,
index 6d44715..3b2095e 100644 (file)
@@ -34,6 +34,10 @@ class Core;
 
 namespace Integration
 {
+namespace Graphics
+{
+class Graphics;
+}
 
 class Core;
 class GestureManager;
@@ -45,7 +49,6 @@ class SystemOverlay;
 struct Event;
 struct TouchData;
 
-
 /**
  * The reasons why further updates are required.
  */
@@ -221,6 +224,7 @@ public:
    */
   static Core* New( RenderController& renderController,
                     PlatformAbstraction& platformAbstraction,
+                    Graphics::Graphics& graphics,
                     GlAbstraction& glAbstraction,
                     GlSyncAbstraction& glSyncAbstraction,
                     GestureManager& gestureManager,
index fee1d54..4dc626e 100644 (file)
@@ -40,11 +40,6 @@ platform_abstraction_header_files = \
    $(platform_abstraction_src_dir)/system-overlay.h \
    $(platform_abstraction_src_dir)/lockless-buffer.h
 
-graphics_integration_header_files = \
-   $(platform_abstraction_src_dir)/graphics/graphics.h \
-   $(platform_abstraction_src_dir)/graphics/surface-factory.h \
-   $(platform_abstraction_src_dir)/graphics/vulkan/vk-surface-factory.h
-
 platform_abstraction_events_header_files = \
    $(platform_abstraction_src_dir)/events/event.h \
    $(platform_abstraction_src_dir)/events/gesture-event.h \
@@ -60,3 +55,15 @@ platform_abstraction_events_header_files = \
    $(platform_abstraction_src_dir)/events/tap-gesture-event.h \
    $(platform_abstraction_src_dir)/events/touch-event-combiner.h \
    $(platform_abstraction_src_dir)/events/touch-event-integ.h
+
+graphics_integration_src_files = \
+   $(platform_abstraction_src_dir)/graphics/graphics.cpp
+
+graphics_integration_header_files = \
+  $(platform_abstraction_src_dir)/graphics/graphics.h \
+  $(platform_abstraction_src_dir)/graphics/surface-factory.h
+
+graphics_vulkan_integration_header_files = \
+  $(platform_abstraction_src_dir)/graphics/vulkan/vk-surface-factory.h \
+  $(platform_abstraction_src_dir)/graphics/vulkan/vulkan-hpp-wrapper.h
+
index 9a036c0..9c7d63b 100644 (file)
@@ -2,8 +2,3 @@
 
 graphics_integration_src_files = \
    $(graphics_integration_dir)/graphics.cpp
-
-graphics_integration_header_files = \
-   $(graphics_integration_dir)/graphics.h \
-   $(graphics_integration_dir)/surface-factory.h \
-   $(graphics_integration_dir)/vulkan/vk-surface-factory.h
index 25bc169..1f06c8d 100644 (file)
@@ -20,8 +20,6 @@
 #include <dali/graphics/vulkan/vulkan-surface.h>
 
 #include <dali/integration-api/graphics/graphics.h>
-#include <dali/integration-api/graphics/surface-factory.h>
-
 
 namespace Dali
 {
@@ -46,7 +44,10 @@ Graphics::Graphics()
   mGraphicsImpl = std::move(impl);
 }
 
-Graphics::~Graphics() = default;
+Graphics::~Graphics()
+{
+
+}
 
 Dali::Graphics::FBID Graphics::Create(
   std::unique_ptr<Dali::Integration::Graphics::SurfaceFactory> surfaceFactory)
index f1d958c..1603aba 100644 (file)
@@ -85,7 +85,7 @@ private:
 /**
  * fixme: dummy function to make sure the static library won't be discarded entirely during linking
  */
-void IncludeThisLibrary();
+EXPORT_API void IncludeThisLibrary();
 
 } // Namespace Graphics
 } // Namespace Integration
index 370d01b..cf8bbc2 100644 (file)
@@ -19,7 +19,7 @@
  */
 
 // EXTERNAL INCLUDES
-#include <dali/graphics/vulkan/vulkan-hpp-wrapper.h>
+#include <dali/integration-api/graphics/vulkan/vulkan-hpp-wrapper.h>
 
 // INTERNAL INCLUDES
 #include <dali/integration-api/graphics/surface-factory.h>
diff --git a/dali/integration-api/graphics/vulkan/vulkan-hpp-wrapper.h b/dali/integration-api/graphics/vulkan/vulkan-hpp-wrapper.h
new file mode 100644 (file)
index 0000000..7fc38bf
--- /dev/null
@@ -0,0 +1,32 @@
+#ifndef DALI_GRAPHICS_VULKAN_HPP_WRAPPER_H
+#define DALI_GRAPHICS_VULKAN_HPP_WRAPPER_H
+
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// Vulkan without exceptions
+#ifndef VULKAN_HPP_NO_EXCEPTIONS
+#define VULKAN_HPP_NO_EXCEPTIONS
+#endif
+
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wfloat-equal"
+#pragma GCC diagnostic ignored "-Wswitch-enum"
+#include <vulkan/vulkan.hpp>
+#pragma GCC diagnostic pop
+
+#endif // DALI_GRAPHICS_VULKAN_HPP_WRAPPER_H
index 873dbf5..ca0b671 100644 (file)
@@ -17,6 +17,7 @@
 
 // CLASS HEADER
 #include <dali/internal/common/core-impl.h>
+#include <dali/integration-api/graphics/graphics.h>
 
 // INTERNAL INCLUDES
 #include <dali/integration-api/system-overlay.h>
@@ -26,6 +27,7 @@
 #include <dali/integration-api/gl-sync-abstraction.h>
 #include <dali/integration-api/platform-abstraction.h>
 #include <dali/integration-api/render-controller.h>
+#include <dali/integration-api/graphics/graphics.h>
 
 #include <dali/internal/event/actors/actor-impl.h>
 #include <dali/internal/event/animation/animation-playlist.h>
@@ -65,7 +67,6 @@ Debug::Filter* gCoreFilter = Debug::Filter::New(Debug::Concise, false, "LOG_CORE
 
 namespace Dali
 {
-
 namespace Internal
 {
 
@@ -77,9 +78,12 @@ using Integration::GlAbstraction;
 using Integration::Event;
 using Integration::UpdateStatus;
 using Integration::RenderStatus;
+using Integration::Graphics::Graphics;
+
 
 Core::Core( RenderController& renderController,
             PlatformAbstraction& platform,
+            Graphics& graphics,
             GlAbstraction& glAbstraction,
             GlSyncAbstraction& glSyncAbstraction,
             GestureManager& gestureManager,
@@ -87,8 +91,12 @@ Core::Core( RenderController& renderController,
             bool renderToFboEnabled )
 : mRenderController( renderController ),
   mPlatform(platform),
-  mProcessingEvent(false)
+  mProcessingEvent(false),
+  mGraphics(graphics)
 {
+  // fixme: for now to ensure libgraphics.a won't be removed during linking due to being
+  Integration::Graphics::IncludeThisLibrary();
+
   // Create the thread local storage
   CreateThreadLocalStorage();
 
index 2a73f5a..1fe927a 100644 (file)
@@ -32,6 +32,10 @@ namespace Dali
 
 namespace Integration
 {
+namespace Graphics
+{
+class Graphics;
+}
 class RenderController;
 class PlatformAbstraction;
 class GestureManager;
@@ -76,6 +80,7 @@ public:
    */
   Core( Integration::RenderController& renderController,
         Integration::PlatformAbstraction& platform,
+        Integration::Graphics::Graphics& graphics,
         Integration::GlAbstraction& glAbstraction,
         Integration::GlSyncAbstraction& glSyncAbstraction,
         Integration::GestureManager& gestureManager,
@@ -267,6 +272,8 @@ private:
   OwnerPointer<GestureEventProcessor>           mGestureEventProcessor;       ///< The gesture event processor
   OwnerPointer<EventProcessor>                  mEventProcessor;              ///< The event processor
 
+  Integration::Graphics::Graphics& mGraphics; ///< Graphics object
+
   friend class ThreadLocalStorage;
 
 };