[Tizen] Add Effect Start/End signal
[platform/core/uifw/dali-adaptor.git] / dali / internal / window-system / ubuntu-x11 / render-surface-factory-ecore-x.cpp
index c8d23b2..95a619d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 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.
  *
  */
 
-// INTERNAL INCLUDES
-#include <dali/integration-api/x11/pixmap-render-surface.h>
+// CLASS HEADER
+#include <dali/internal/window-system/ubuntu-x11/render-surface-factory-ecore-x.h>
+
+// INTERNAL HEADERS
+#include <dali/internal/window-system/common/window-render-surface.h>
+#include <dali/internal/window-system/ubuntu-x11/pixmap-render-surface-ecore-x.h>
+#include <dali/internal/window-system/common/display-utils.h>
+#include <dali/integration-api/native-render-surface.h>
+
+// EXTERNAL INCLUDES
+#include <memory>
 
 namespace Dali
 {
+namespace Internal
+{
+namespace Adaptor
+{
 
-namespace ECore
+std::unique_ptr< WindowRenderSurface > RenderSurfaceFactoryEcoreX::CreateWindowRenderSurface( Dali::PositionSize positionSize, Any surface, bool isTransparent )
 {
+  return Utils::MakeUnique< WindowRenderSurface >( positionSize, surface, isTransparent );
+}
 
-DALI_EXPORT_API PixmapRenderSurface* CreatePixmapSurface(
-  PositionSize       positionSize,
-  Any                surface,
-  const std::string& name,
-  bool               isTransparent)
+std::unique_ptr< PixmapRenderSurface > RenderSurfaceFactoryEcoreX::CreatePixmapRenderSurface( Dali::PositionSize positionSize, Any surface, bool isTransparent )
 {
-  return new PixmapRenderSurface(positionSize, surface, name, isTransparent);
+  return Utils::MakeUnique< PixmapRenderSurfaceEcoreX >( positionSize, surface, isTransparent );
 }
 
+std::unique_ptr< NativeRenderSurface > RenderSurfaceFactoryEcoreX::CreateNativeRenderSurface( Dali::PositionSize positionSize, bool isTransparent )
+{
+  return std::unique_ptr< NativeRenderSurface >( nullptr );
+}
 
-} // namespace ECore
+// this should be created from somewhere
+std::unique_ptr< RenderSurfaceFactory > GetRenderSurfaceFactory()
+{
+  // returns Window factory
+  return Utils::MakeUnique< RenderSurfaceFactoryEcoreX >();
+}
 
+} // namespace Adaptor
+} // namespace Internal
 } // namespace Dali
-
-
-