Revert "[Tizen] Add OffscreenApplication"
authorSunghyun Kim <scholb.kim@samsung.com>
Wed, 23 Sep 2020 02:05:40 +0000 (11:05 +0900)
committerSunghyun Kim <scholb.kim@samsung.com>
Wed, 23 Sep 2020 02:05:40 +0000 (11:05 +0900)
This reverts commit ad934df050f18c41561f7d160228a34351f21b4a.

25 files changed:
build/tizen/module-list.cmake
build/tizen/profiles/android-profile.cmake
build/tizen/profiles/common-profile.cmake
build/tizen/profiles/ivi-profile.cmake
build/tizen/profiles/mobile-profile.cmake
build/tizen/profiles/tv-profile.cmake
build/tizen/profiles/ubuntu-profile.cmake
build/tizen/profiles/wearable-profile.cmake
build/tizen/profiles/windows-profile.cmake
dali/devel-api/adaptor-framework/offscreen-application.cpp [deleted file]
dali/devel-api/adaptor-framework/offscreen-application.h [deleted file]
dali/devel-api/adaptor-framework/offscreen-window.cpp [deleted file]
dali/devel-api/adaptor-framework/offscreen-window.h [deleted file]
dali/devel-api/file.list
dali/integration-api/adaptor-framework/native-render-surface.h
dali/internal/adaptor/common/adaptor-impl.cpp
dali/internal/adaptor/common/adaptor-impl.h
dali/internal/adaptor/common/adaptor.cpp
dali/internal/offscreen/common/offscreen-application-impl.cpp [deleted file]
dali/internal/offscreen/common/offscreen-application-impl.h [deleted file]
dali/internal/offscreen/common/offscreen-window-impl.cpp [deleted file]
dali/internal/offscreen/common/offscreen-window-impl.h [deleted file]
dali/internal/offscreen/file.list [deleted file]
dali/internal/window-system/tizen-wayland/native-render-surface-ecore-wl.cpp
dali/internal/window-system/tizen-wayland/native-render-surface-ecore-wl.h

index f779f50a82968d3d715eb640741649e04f412089..161d1de3492e89d40ca2bace3358bbacc076b315 100644 (file)
@@ -28,9 +28,6 @@ include( ${ADAPTOR_ROOT}/dali/internal/legacy/file.list )
 SET( adaptor_network_dir ${ADAPTOR_ROOT}/dali/internal/network )
 include( ${ADAPTOR_ROOT}/dali/internal/network/file.list )
 
-SET( adaptor_offscreen_dir ${ADAPTOR_ROOT}/dali/internal/offscreen )
-include( ${ADAPTOR_ROOT}/dali/internal/offscreen/file.list )
-
 SET( adaptor_sensor_dir ${ADAPTOR_ROOT}/dali/internal/sensor )
 include( ${ADAPTOR_ROOT}/dali/internal/sensor/file.list )
 
index 2d41d2c8fbffa35eaf04e2e571d4348841996c9c..5862cec12fe544253815bf880c76885016fe1ceb 100644 (file)
@@ -24,7 +24,6 @@ SET( SOURCES
         ${adaptor_integration_api_android_src_files}
         ${adaptor_legacy_common_src_files}
         ${adaptor_network_common_src_files}
-        ${adaptor_offscreen_common_src_files}
         ${adaptor_public_api_src_files}
         ${adaptor_sensor_common_src_files}
         ${adaptor_sensor_android_src_files}
index 7add3a01ec63dc699adeabcdab856bf29c84a79c..e1afc1e47f3dbb729ede45aa296ab00775375bfe 100644 (file)
@@ -23,7 +23,6 @@ SET( SOURCES
     ${adaptor_integration_api_src_files}
     ${adaptor_legacy_common_src_files}
     ${adaptor_network_common_src_files}
-    ${adaptor_offscreen_common_src_files}
     ${adaptor_public_api_src_files}
     ${adaptor_sensor_common_src_files}
     ${adaptor_sensor_tizen_src_files}
index 82f1a9531bfc6c0afc7a86f0197e2d6664f20d20..aebd8b633750dc7667bca9172b460f5ec32fcdd0 100644 (file)
@@ -24,7 +24,6 @@ SET( SOURCES
      ${adaptor_integration_api_src_files}
      ${adaptor_legacy_common_src_files}
      ${adaptor_network_common_src_files}
-     ${adaptor_offscreen_common_src_files}
      ${adaptor_public_api_src_files}
      ${adaptor_sensor_common_src_files}
      ${adaptor_sensor_tizen_src_files}
index a5329ff41f70da0dc21c9bee14a594dfac98a97b..a53da274e82720a534c90c6a0c681b41bb87343e 100644 (file)
@@ -23,7 +23,6 @@ SET( SOURCES
         ${adaptor_integration_api_src_files}
         ${adaptor_legacy_common_src_files}
         ${adaptor_network_common_src_files}
-        ${adaptor_offscreen_common_src_files}
         ${adaptor_public_api_src_files}
         ${adaptor_sensor_common_src_files}
         ${adaptor_sensor_tizen_src_files}
index 34a69fac3ebf63f07a80d5dcd41c2f4df3abdd3f..2469de7860b1cc610eff73dc905a8c705a6cf62d 100644 (file)
@@ -23,7 +23,6 @@ SET( SOURCES
     ${adaptor_integration_api_src_files}
     ${adaptor_legacy_common_src_files}
     ${adaptor_network_common_src_files}
-    ${adaptor_offscreen_common_src_files}
     ${adaptor_public_api_src_files}
     ${adaptor_sensor_common_src_files}
     ${adaptor_sensor_tizen_src_files}
index cdd43c4fff3142382f119be015da91aecdde3145..82643fa29c943d60286fb2f70d73b407a0b46e4f 100644 (file)
@@ -22,7 +22,6 @@ SET( SOURCES
         ${adaptor_integration_api_src_files}
         ${adaptor_legacy_common_src_files}
         ${adaptor_network_common_src_files}
-        ${adaptor_offscreen_common_src_files}
         ${adaptor_public_api_src_files}
         ${adaptor_sensor_common_src_files}
         ${adaptor_sensor_ubuntu_src_files}
index ad505b6b6b0cbe47586a90e1ca7ed91ba9e844d1..2a908d04860e3544a74188f75f54706d8432b1a8 100644 (file)
@@ -24,7 +24,6 @@ SET( SOURCES
     ${adaptor_integration_api_src_files}
     ${adaptor_legacy_common_src_files}
     ${adaptor_network_common_src_files}
-    ${adaptor_offscreen_common_src_files}
     ${adaptor_public_api_src_files}
     ${adaptor_sensor_common_src_files}
     ${adaptor_sensor_tizen_src_files}
index 92a7fb9a6f4f1b12216cf0929db24481b3264e60..c39c3bdd615049b0136329bc3d21df80ce70ef1a 100644 (file)
@@ -17,7 +17,6 @@ SET( SOURCES
         ${adaptor_integration_api_src_files}
         ${adaptor_legacy_common_src_files}
         ${adaptor_network_common_src_files}
-        ${adaptor_offscreen_common_src_files}
         ${adaptor_public_api_src_files}
         ${adaptor_sensor_common_src_files}
         ${adaptor_styling_common_src_files}
diff --git a/dali/devel-api/adaptor-framework/offscreen-application.cpp b/dali/devel-api/adaptor-framework/offscreen-application.cpp
deleted file mode 100644 (file)
index 95f1843..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright (c) 2020 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.
- *
- */
-
-// CLASS HEADER
-#include <dali/devel-api/adaptor-framework/offscreen-application.h>
-
-// INTERNAL INCLUDES
-#include <dali/internal/offscreen/common/offscreen-application-impl.h>
-
-namespace Dali
-{
-OffscreenApplication OffscreenApplication::New( uint16_t width, uint16_t height, bool isTranslucent, OffscreenApplication::RenderMode renderMode )
-{
-  Dali::Any surface;
-  IntrusivePtr< Internal::OffscreenApplication > impl = Internal::OffscreenApplication::New( width, height, surface, isTranslucent, renderMode );
-
-  OffscreenApplication offscreenApplication = OffscreenApplication( impl.Get() );
-
-  return offscreenApplication;
-}
-
-OffscreenApplication OffscreenApplication::New( Dali::Any surface, OffscreenApplication::RenderMode renderMode )
-{
-  IntrusivePtr< Internal::OffscreenApplication > impl = Internal::OffscreenApplication::New( 0, 0, surface, false, renderMode );
-
-  OffscreenApplication offscreenApplication = OffscreenApplication( impl.Get() );
-
-  return offscreenApplication;
-}
-
-OffscreenApplication::OffscreenApplication()= default;
-
-OffscreenApplication::OffscreenApplication( const OffscreenApplication& offscreenApplication ) = default;
-
-OffscreenApplication& OffscreenApplication::operator=( const OffscreenApplication& offscreenApplication ) = default;
-
-OffscreenApplication::~OffscreenApplication()= default;
-
-void OffscreenApplication::Start()
-{
-  Internal::GetImplementation( *this ).Start();
-}
-
-void OffscreenApplication::Stop()
-{
-  Internal::GetImplementation( *this ).Stop();
-}
-
-Dali::OffscreenWindow OffscreenApplication::GetWindow()
-{
-  return Internal::GetImplementation( *this ).GetWindow();
-}
-
-void OffscreenApplication::RenderOnce()
-{
-  Internal::GetImplementation( *this ).RenderOnce();
-}
-
-OffscreenApplication::OffscreenApplicationSignalType& OffscreenApplication::InitSignal()
-{
-  return Internal::GetImplementation( *this ).InitSignal();
-}
-
-OffscreenApplication::OffscreenApplicationSignalType& OffscreenApplication::TerminateSignal()
-{
-  return Internal::GetImplementation( *this ).TerminateSignal();
-}
-
-OffscreenApplication::OffscreenApplication( Internal::OffscreenApplication* offscreenApplication )
-: BaseHandle( offscreenApplication )
-{
-}
-
-}  // namespace Dali
diff --git a/dali/devel-api/adaptor-framework/offscreen-application.h b/dali/devel-api/adaptor-framework/offscreen-application.h
deleted file mode 100644 (file)
index cac1f64..0000000
+++ /dev/null
@@ -1,164 +0,0 @@
-#ifndef DALI_OFFSCREEN_APPLICATION_H
-#define DALI_OFFSCREEN_APPLICATION_H
-
-/*
- * Copyright (c) 2020 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.
- *
- */
-
-// EXTERNAL INCLUDES
-#include <dali/public-api/signals/dali-signal.h>
-#include <dali/public-api/object/any.h>
-#include <dali/public-api/object/base-handle.h>
-
-namespace Dali
-{
-
-/**
- * @addtogroup dali_adaptor_framework
- * @{
- */
-
-class OffscreenWindow;
-
-namespace Internal
-{
-class OffscreenApplication;
-}
-
-/**
- * @brief Appliations can draw UI on offscreen surface with the OffscreenApplication.
- * When you use a OffscreenApplication, you don't have to create a Window.
- */
-class DALI_IMPORT_API OffscreenApplication : public Dali::BaseHandle
-{
-
-public:
-
-  using OffscreenApplicationSignalType = Signal<void (void)>;
-
-  /**
-   * @brief Enumeration for the render mode
-   */
-  enum class RenderMode
-  {
-    AUTO,         // Scene is rendered automatically
-    MANUAL        // Scene is rendered by RenderOnce()
-  };
-
-public:
-
-  /**
-   * @brief This is the constructor of OffscreenApplication
-   *
-   * @param[in] width The initial width of the default OffscreenWindow
-   * @param[in] height The initial height of the default OffscreenWindow
-   * @param[in] isTranslucent Whether the OffscreenWindow is translucent or not
-   * @param[in] renderMode The RenderMode of the OffscreenApplication
-   */
-  static OffscreenApplication New( uint16_t width, uint16_t height, bool isTranslucent,
-                                   RenderMode renderMode = RenderMode::AUTO );
-
-  /**
-   * @brief This is the constructor of OffscreenApplication
-   *
-   * @param[in] surface The native surface handle to create the OffscreenWindow
-   * @param[in] isTranslucent Whether the OffscreenWindow is translucent or not
-   * @param[in] renderMode The RenderMode of the OffscreenApplication
-   */
-  static OffscreenApplication New( Dali::Any surface, RenderMode renderMode = RenderMode::AUTO );
-
-  /**
-   * @brief Constructs an empty handle
-   */
-  OffscreenApplication();
-
-  /**
-   * @brief Copy constructor
-   *
-   * @param [in] offscreenApplication A reference to the copied handle
-   */
-  OffscreenApplication( const OffscreenApplication& offscreenApplication );
-
-  /**
-   * @brief Assignment operator
-   *
-   * @param [in] offscreenApplication A reference to the copied handle
-   * @return A reference to this
-   */
-  OffscreenApplication& operator=( const OffscreenApplication& offscreenApplication );
-
-  /**
-   * @brief Destructor
-   */
-  ~OffscreenApplication();
-
-public:
-
-  /**
-   * @brief Starts the OffscreenApplication (rendering, event handling, etc)
-   */
-  void Start();
-
-  /**
-   * @brief Stops the OffscreenApplication
-   */
-  void Stop();
-
-
-  /**
-   * @brief Get the default OffscreenWindow handle
-   * @return The default OffscreenWindow
-   */
-  OffscreenWindow GetWindow();
-
-  /**
-   * @brief Renders once more even if we're paused
-   */
-  void RenderOnce();
-
-public:  // Signals
-
-  /**
-   * @brief Signal to notify the client when the application is ready to be initialized
-   *
-   * @note OffscreenApplication::Start() should be called to be initialized
-   *
-   * @return The signal
-   */
- OffscreenApplicationSignalType& InitSignal();
-
-  /**
-   * @brief Signal to notify the user when the application is about to be terminated
-   *
-   * @return The signal
-   */
- OffscreenApplicationSignalType& TerminateSignal();
-
-public: // Not intended for application developers
-  /**
-   * @brief Internal constructor
-   */
-  explicit DALI_INTERNAL OffscreenApplication( Internal::OffscreenApplication* offscreenApplication );
-
-};
-
-/**
- * @}
- */
-
-}  // namespace Dali
-
-#endif // DALI_OFFSCREEN_APPLICATION_H
diff --git a/dali/devel-api/adaptor-framework/offscreen-window.cpp b/dali/devel-api/adaptor-framework/offscreen-window.cpp
deleted file mode 100644 (file)
index 137cf6c..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Copyright (c) 2020 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.
- *
- */
-
-// CLASS HEADER
-#include <dali/devel-api/adaptor-framework/offscreen-window.h>
-
-// EXTENRAL INCLUDES
-#include <dali/public-api/actors/layer.h>
-
-// INTERNAL INCLUDES
-#include <dali/internal/offscreen/common/offscreen-window-impl.h>
-
-namespace Dali
-{
-OffscreenWindow OffscreenWindow::New( uint16_t width, uint16_t height, bool isTranslucent )
-{
-  Any surface;
-  IntrusivePtr< Internal::OffscreenWindow > impl = Internal::OffscreenWindow::New( width, height, surface, isTranslucent );
-  OffscreenWindow window = OffscreenWindow( impl.Get() );
-  impl->Initialize( false );
-
-  return window;
-}
-
-OffscreenWindow OffscreenWindow::New( Any surface )
-{
-  IntrusivePtr< Internal::OffscreenWindow > impl = Internal::OffscreenWindow::New( 0, 0, surface, false );
-  OffscreenWindow window = OffscreenWindow( impl.Get() );
-  impl->Initialize( false );
-
-  return window;
-}
-
-OffscreenWindow::OffscreenWindow() = default;
-
-OffscreenWindow::OffscreenWindow( const OffscreenWindow& window ) = default;
-
-OffscreenWindow& OffscreenWindow::operator=( const OffscreenWindow& window ) = default;
-
-OffscreenWindow::~OffscreenWindow() = default;
-
-void OffscreenWindow::Add( Actor actor )
-{
-  Internal::GetImplementation( *this ).Add( actor );
-}
-
-void OffscreenWindow::Remove( Actor actor )
-{
-  Internal::GetImplementation( *this ).Remove( actor );
-}
-
-void OffscreenWindow::SetBackgroundColor( const Vector4& color )
-{
-  Internal::GetImplementation( *this ).SetBackgroundColor( color );
-}
-
-Vector4 OffscreenWindow::GetBackgroundColor() const
-{
-  return Internal::GetImplementation( *this ).GetBackgroundColor();
-}
-
-Layer OffscreenWindow::GetRootLayer() const
-{
-  return Internal::GetImplementation( *this ).GetRootLayer();
-}
-
-uint32_t OffscreenWindow::GetLayerCount() const
-{
-  return Internal::GetImplementation( *this ).GetLayerCount();
-}
-
-Layer OffscreenWindow::GetLayer( uint32_t depth ) const
-{
-  return Internal::GetImplementation( *this ).GetLayer( depth );
-}
-
-OffscreenWindow::WindowSize OffscreenWindow::GetSize() const
-{
-  return Internal::GetImplementation( *this ).GetSize();
-}
-
-Any OffscreenWindow::GetNativeHandle() const
-{
-  return Internal::GetImplementation( *this ).GetNativeHandle();
-}
-
-Uint16Pair OffscreenWindow::GetDpi() const
-{
-  return Internal::GetImplementation(*this).GetDpi();
-}
-
-OffscreenWindow::PostRenderSignalType& OffscreenWindow::PostRenderSignal()
-{
-  return Internal::GetImplementation( *this ).PostRenderSignal();
-}
-
-
-OffscreenWindow::OffscreenWindow( Internal::OffscreenWindow* window )
-: BaseHandle( window )
-{
-}
-
-}  // namespace Dali
diff --git a/dali/devel-api/adaptor-framework/offscreen-window.h b/dali/devel-api/adaptor-framework/offscreen-window.h
deleted file mode 100644 (file)
index 8c11466..0000000
+++ /dev/null
@@ -1,203 +0,0 @@
-#ifndef DALI_OFFSCREEN_WINDOW_H
-#define DALI_OFFSCREEN_WINDOW_H
-
-/*
- * Copyright (c) 2020 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.
- *
- */
-
-// EXTERNAL INCLUDES
-#include <dali/public-api/actors/actor.h>
-#include <dali/public-api/math/uint-16-pair.h>
-#include <dali/public-api/signals/dali-signal.h>
-#include <dali/public-api/object/any.h>
-
-namespace Dali
-{
-
-/**
- * @addtogroup dali_adaptor_framework
- * @{
- */
-
-class Layer;
-
-namespace Internal
-{
-class OffscreenWindow;
-}
-
-class DALI_IMPORT_API OffscreenWindow : public Dali::BaseHandle
-{
-public:
-
-  using WindowSize = Uint16Pair;
-  using PostRenderSignalType = Signal<void (OffscreenWindow, Any)>;
-
-public:
-
-  /**
-   * @brief Creates an initialized handle to a new OffscreenWindow
-   * @note You should hold the returned handle. If you missed the handle, the OffscreenWindow will be released
-   *
-   * @param[in] width The initial width of the OffscreenWindow
-   * @param[in] height The initial height of the OffscreenWindow
-   * @param[in] isTranslucent Whether the OffscreenWindow is translucent or not
-   */
-  static OffscreenWindow New( uint16_t width, uint16_t height, bool isTranslucent );
-
-  /**
-   * @brief Creates an initialized handle to a new OffscreenWindow
-   * @note You should hold the returned handle. If you missed the handle, the OffscreenWindow will be released
-   *
-   * @param[in] surface The native surface handle of your platform
-   */
-  static OffscreenWindow New( Any surface );
-
-  /**
-   * @brief Constructs an empty handle
-   */
-  OffscreenWindow();
-
-  /**
-   * @brief Copy constructor
-   *
-   * @param [in] window A reference to the copied handle
-   */
-  OffscreenWindow( const OffscreenWindow& window );
-
-  /**
-   * @brief Assignment operator
-   *
-   * @param [in] window A reference to the copied handle
-   * @return A reference to this
-   */
-  OffscreenWindow& operator=( const OffscreenWindow& window );
-
-  /**
-   * @brief Destructor
-   */
-  ~OffscreenWindow();
-
-public:
-  /**
-   * @brief Adds a child Actor to the OffscreenWindow.
-   *
-   * The child will be referenced.
-   *
-   * @param[in] actor The child
-   * @pre The actor has been initialized.
-   * @pre The actor does not have a parent.
-   */
-  void Add( Actor actor );
-
-  /**
-   * @brief Removes a child Actor from the OffscreenWindow.
-   *
-   * The child will be unreferenced.
-   *
-   * @param[in] actor The child
-   * @pre The actor has been added to the OffscreenWindow.
-   */
-  void Remove( Actor actor );
-
-  /**
-   * @brief Sets the background color of the OffscreenWindow.
-   *
-   * @param[in] color The new background color
-   */
-  void SetBackgroundColor( const Vector4& color );
-
-  /**
-   * @brief Gets the background color of the OffscreenWindow.
-   *
-   * @return The background color
-   */
-  Vector4 GetBackgroundColor() const;
-
-  /**
-   * @brief Returns the root Layer of the OffscreenWindow.
-   *
-   * @return The root layer
-   */
-  Layer GetRootLayer() const;
-
-  /**
-   * @brief Queries the number of on-scene layers.
-   *
-   * Note that a default layer is always provided (count >= 1).
-   *
-   * @return The number of layers
-   */
-  uint32_t GetLayerCount() const;
-
-  /**
-   * @brief Retrieves the layer at a specified depth in the OffscreenWindow.
-   *
-   * @param[in] depth The depth
-   * @return The layer found at the given depth
-   * @pre Depth is less than layer count; see GetLayerCount().
-   */
-  Layer GetLayer( uint32_t depth ) const;
-
-  /**
-   * @brief Returns the size of the OffscreenWindow in pixels as a Vector.
-   *
-   * The x component will be the width of the OffscreenWindow in pixels.
-   * The y component will be the height of the OffscreenWindow in pixels.
-   *
-   * @return The size of the OffscreenWindow as a Vector
-   */
-  WindowSize GetSize() const;
-
-  /**
-   * @brief Gets the native handle.
-   * @note When users call this function, it wraps the actual type used by the underlying system.
-   * @return The native handle or an empty handle
-   */
-  Any GetNativeHandle() const;
-
-  /**
-   * @brief Retrieves the DPI of the window.
-   *
-   * @return The DPI of the window
-   */
-  Uint16Pair GetDpi() const;
-
-public:  // Signals
-
-  /**
-   * @brief This signal is emitted when the OffscreenWindow is rendered.
-   *
-   * @return The signal
-   */
-  PostRenderSignalType& PostRenderSignal();
-
-public: // Not intended for application developers
-
-  /**
-   * @brief Internal constructor
-   */
-  explicit DALI_INTERNAL OffscreenWindow( Internal::OffscreenWindow* window );
-
-};
-
-/**
- * @}
- */
-
-}  // namespace Dali
-
-#endif // DALI_OFFSCREEN_WINDOW_H
index 717cba99b3fc9a462843959ee42852525c3b456f..7c404a0c0c02754f9ff69f5b5a999e03382ef502 100755 (executable)
@@ -37,8 +37,6 @@ SET( devel_api_src_files
   ${adaptor_devel_api_dir}/adaptor-framework/thread-settings.cpp
   ${adaptor_devel_api_dir}/adaptor-framework/web-engine.cpp
   ${adaptor_devel_api_dir}/adaptor-framework/window-devel.cpp
-  ${adaptor_devel_api_dir}/adaptor-framework/offscreen-application.cpp
-  ${adaptor_devel_api_dir}/adaptor-framework/offscreen-window.cpp
 )
 
 
@@ -94,8 +92,6 @@ SET( devel_api_adaptor_framework_header_files
   ${adaptor_devel_api_dir}/adaptor-framework/window-devel.h
   ${adaptor_devel_api_dir}/adaptor-framework/component-application.h
   ${adaptor_devel_api_dir}/adaptor-framework/video-sync-mode.h
-  ${adaptor_devel_api_dir}/adaptor-framework/offscreen-application.h
-  ${adaptor_devel_api_dir}/adaptor-framework/offscreen-window.h
 )
 
 
index cca13ead7947205061ab7a8ff7cef065c079d54d..a42d8fc4d554dce52e30302b1f8debf90aea2c36 100644 (file)
@@ -61,12 +61,6 @@ public: // API
    */
   virtual void WaitUntilSurfaceReplaced() = 0;
 
-  /**
-   * @brief Get the native renderable handle
-   * @return The native renderable handle
-   */
-  virtual Any GetNativeRenderable() = 0;
-
 private: // from NativeRenderSurface
   /**
    * @brief Create a renderable
index e75d15607daecb2de69c4dc8dede53f5c75fd5f6..e6ae520a9f3589428b78445231e6d20bdbb09ab9 100755 (executable)
@@ -96,10 +96,10 @@ thread_local Adaptor* gThreadLocalAdaptor = NULL; // raw thread specific pointer
 
 } // unnamed namespace
 
-Dali::Adaptor* Adaptor::New( Dali::Integration::SceneHolder window, Dali::RenderSurfaceInterface *surface, EnvironmentOptions* environmentOptions, ThreadMode threadMode )
+Dali::Adaptor* Adaptor::New( Dali::Integration::SceneHolder window, Dali::RenderSurfaceInterface *surface, EnvironmentOptions* environmentOptions )
 {
   Dali::Adaptor* adaptor = new Dali::Adaptor;
-  Adaptor* impl = new Adaptor( window, *adaptor, surface, environmentOptions, threadMode );
+  Adaptor* impl = new Adaptor( window, *adaptor, surface, environmentOptions );
   adaptor->mImpl = impl;
 
   Dali::Internal::Adaptor::AdaptorBuilder* mAdaptorBuilder = new AdaptorBuilder();
@@ -114,15 +114,15 @@ Dali::Adaptor* Adaptor::New( Dali::Integration::SceneHolder window, Dali::Render
 Dali::Adaptor* Adaptor::New( Dali::Integration::SceneHolder window, EnvironmentOptions* environmentOptions )
 {
   Internal::Adaptor::SceneHolder& windowImpl = Dali::GetImplementation( window );
-  Dali::Adaptor* adaptor = New( window, windowImpl.GetSurface(), environmentOptions, ThreadMode::NORMAL );
+  Dali::Adaptor* adaptor = New( window, windowImpl.GetSurface(), environmentOptions );
   windowImpl.SetAdaptor( *adaptor );
   return adaptor;
 }
 
-Dali::Adaptor* Adaptor::New( GraphicsFactory& graphicsFactory, Dali::Integration::SceneHolder window, Dali::RenderSurfaceInterface *surface, EnvironmentOptions* environmentOptions, ThreadMode threadMode )
+Dali::Adaptor* Adaptor::New( GraphicsFactory& graphicsFactory, Dali::Integration::SceneHolder window, Dali::RenderSurfaceInterface *surface, EnvironmentOptions* environmentOptions )
 {
   Dali::Adaptor* adaptor = new Dali::Adaptor; // Public adaptor
-  Adaptor* impl = new Adaptor( window, *adaptor, surface, environmentOptions, threadMode ); // Impl adaptor
+  Adaptor* impl = new Adaptor( window, *adaptor, surface, environmentOptions ); // Impl adaptor
   adaptor->mImpl = impl;
 
   impl->Initialize( graphicsFactory );
@@ -133,7 +133,7 @@ Dali::Adaptor* Adaptor::New( GraphicsFactory& graphicsFactory, Dali::Integration
 Dali::Adaptor* Adaptor::New( GraphicsFactory& graphicsFactory, Dali::Integration::SceneHolder window, EnvironmentOptions* environmentOptions )
 {
   Internal::Adaptor::SceneHolder& windowImpl = Dali::GetImplementation( window );
-  Dali::Adaptor* adaptor = New( graphicsFactory, window, windowImpl.GetSurface(), environmentOptions, ThreadMode::NORMAL );
+  Dali::Adaptor* adaptor = New( graphicsFactory, window, windowImpl.GetSurface(), environmentOptions );
   windowImpl.SetAdaptor( *adaptor );
   return adaptor;
 } // Called first
@@ -1177,7 +1177,7 @@ Dali::ObjectRegistry Adaptor::GetObjectRegistry() const
   return registry;
 }
 
-Adaptor::Adaptor(Dali::Integration::SceneHolder window, Dali::Adaptor& adaptor, Dali::RenderSurfaceInterface* surface, EnvironmentOptions* environmentOptions, ThreadMode threadMode )
+Adaptor::Adaptor(Dali::Integration::SceneHolder window, Dali::Adaptor& adaptor, Dali::RenderSurfaceInterface* surface, EnvironmentOptions* environmentOptions)
 : mResizedSignal(),
   mLanguageChangedSignal(),
   mWindowCreatedSignal(),
@@ -1203,7 +1203,7 @@ Adaptor::Adaptor(Dali::Integration::SceneHolder window, Dali::Adaptor& adaptor,
   mSystemTracer(),
   mObjectProfiler( nullptr ),
   mSocketFactory(),
-  mThreadMode( threadMode ),
+  mThreadMode( ThreadMode::NORMAL ),
   mEnvironmentOptionsOwned( environmentOptions ? false : true /* If not provided then we own the object */ ),
   mUseRemoteSurface( false ),
   mRootLayoutDirection( Dali::LayoutDirection::LEFT_TO_RIGHT )
index 6394b3ab2345cf041822d50f4000bd1766628c5c..a62bede62aff82a201eb3bdda92297fc1ea8a1bc 100644 (file)
@@ -101,12 +101,10 @@ public:
    *                                  - Pixmap, adaptor will use existing Pixmap to draw on to
    *                                  - Window, adaptor will use existing Window to draw on to
    * @param[in]  environmentOptions  A pointer to the environment options. If NULL then one is created.
-   * @param[in]  threadMode          The thread mode
    */
   static Dali::Adaptor* New( Dali::Integration::SceneHolder window,
                              Dali::RenderSurfaceInterface* surface,
-                             EnvironmentOptions* environmentOptions,
-                             ThreadMode threadMode );
+                             EnvironmentOptions* environmentOptions );
 
   /**
    * Creates a New Adaptor
@@ -124,13 +122,11 @@ public:
    *                                  - Pixmap, adaptor will use existing Pixmap to draw on to
    *                                  - Window, adaptor will use existing Window to draw on to
    * @param[in]  environmentOptions  A pointer to the environment options. If NULL then one is created.
-   * @param[in]  threadMode          The thread mode
    */
   static Dali::Adaptor* New( GraphicsFactory& graphicsFactory,
                              Dali::Integration::SceneHolder window,
                              Dali::RenderSurfaceInterface* surface,
-                             EnvironmentOptions* environmentOptions,
-                             ThreadMode threadMode );
+                             EnvironmentOptions* environmentOptions );
 
   /**
    * Creates a New Adaptor
@@ -628,9 +624,8 @@ private:
    *                          - Pixmap, adaptor will use existing Pixmap to draw on to
    *                          - Window, adaptor will use existing Window to draw on to
    * @param[in]  environmentOptions  A pointer to the environment options. If NULL then one is created.
-   * @param[in]  threadMode   The ThreadMode of the Adaptor
    */
-  Adaptor( Dali::Integration::SceneHolder window, Dali::Adaptor& adaptor, Dali::RenderSurfaceInterface* surface, EnvironmentOptions* environmentOptions, ThreadMode threadMode );
+  Adaptor( Dali::Integration::SceneHolder window, Dali::Adaptor& adaptor, Dali::RenderSurfaceInterface* surface, EnvironmentOptions* environmentOptions );
 
 private: // Types
 
index 8f752efdeccdf77c0530936c0bcf8e5d9a05235d..e6c37353805ae0d5c58afe24ce07882eced37844 100644 (file)
@@ -29,7 +29,6 @@
 #include <dali/integration-api/adaptor-framework/scene-holder.h>
 #include <dali/internal/adaptor/common/adaptor-impl.h>
 #include <dali/internal/window-system/common/window-impl.h>
-#include <dali/internal/adaptor/common/thread-controller-interface.h>
 
 namespace Dali
 {
@@ -45,7 +44,7 @@ Adaptor& Adaptor::New( Window window, const Dali::RenderSurfaceInterface& surfac
 {
   Internal::Adaptor::SceneHolder* sceneHolder = &Dali::GetImplementation( window );
   Dali::RenderSurfaceInterface* pSurface = const_cast<Dali::RenderSurfaceInterface *>(&surface);
-  Adaptor* adaptor = Internal::Adaptor::Adaptor::New( Dali::Integration::SceneHolder( sceneHolder ), pSurface, NULL, Dali::Internal::Adaptor::ThreadMode::NORMAL );
+  Adaptor* adaptor = Internal::Adaptor::Adaptor::New( Dali::Integration::SceneHolder( sceneHolder ), pSurface, NULL );
   return *adaptor;
 }
 
@@ -58,7 +57,7 @@ Adaptor& Adaptor::New( Dali::Integration::SceneHolder window )
 Adaptor& Adaptor::New( Dali::Integration::SceneHolder window, const Dali::RenderSurfaceInterface& surface )
 {
   Dali::RenderSurfaceInterface* pSurface = const_cast<Dali::RenderSurfaceInterface *>(&surface);
-  Adaptor* adaptor = Internal::Adaptor::Adaptor::New( window, pSurface, NULL, Dali::Internal::Adaptor::ThreadMode::NORMAL );
+  Adaptor* adaptor = Internal::Adaptor::Adaptor::New( window, pSurface, NULL );
   return *adaptor;
 }
 
diff --git a/dali/internal/offscreen/common/offscreen-application-impl.cpp b/dali/internal/offscreen/common/offscreen-application-impl.cpp
deleted file mode 100644 (file)
index 396dbc4..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright (c) 2020 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.
- *
- */
-
-// CLASS HEADER
-#include <dali/internal/offscreen/common/offscreen-application-impl.h>
-
-// INTERNAL INCLUDES
-#include <dali/internal/adaptor/common/adaptor-impl.h>
-#include <dali/internal/offscreen/common/offscreen-window-impl.h>
-#include <dali/internal/adaptor/common/thread-controller-interface.h>
-#include <dali/integration-api/adaptor-framework/adaptor.h>
-#include <dali/integration-api/adaptor-framework/native-render-surface.h>
-
-namespace Dali
-{
-
-namespace Internal
-{
-
-using RenderMode = Dali::OffscreenApplication::RenderMode;
-
-IntrusivePtr< OffscreenApplication > OffscreenApplication::New( uint16_t width, uint16_t height, Dali::Any surface, bool isTranslucent, RenderMode renderMode )
-{
-  IntrusivePtr< OffscreenApplication > offscreenApplication = new OffscreenApplication( width, height, surface, isTranslucent, renderMode );
-  return offscreenApplication;
-}
-
-OffscreenApplication::OffscreenApplication( uint16_t width, uint16_t height, Dali::Any surface, bool isTranslucent, RenderMode renderMode )
-{
-  // Generate a default window
-  IntrusivePtr< Internal::OffscreenWindow > impl = Internal::OffscreenWindow::New( width, height, surface, isTranslucent );
-  mDefaultWindow = Dali::OffscreenWindow( impl.Get() );
-
-  mAdaptor.reset( Dali::Internal::Adaptor::Adaptor::New( Dali::Integration::SceneHolder( impl.Get() ), impl->GetSurface(), NULL,
-                            renderMode == RenderMode::AUTO ? Dali::Internal::Adaptor::ThreadMode::NORMAL : Dali::Internal::Adaptor::ThreadMode::RUN_IF_REQUESTED ) );
-
-  // Initialize default window
-  impl->Initialize( true );
-}
-
-void OffscreenApplication::Start()
-{
-  // Start the adaptor
-  mAdaptor->Start();
-
-  Dali::OffscreenApplication handle( this );
-  mInitSignal.Emit();
-  mAdaptor->NotifySceneCreated();
-}
-
-void OffscreenApplication::Stop()
-{
-  // Stop the adaptor
-  mAdaptor->Stop();
-
-  Dali::OffscreenApplication handle( this );
-  mTerminateSignal.Emit();
-}
-
-Dali::OffscreenWindow OffscreenApplication::GetWindow()
-{
-  return mDefaultWindow;
-}
-
-void OffscreenApplication::RenderOnce()
-{
-  mAdaptor->RenderOnce();
-}
-
-} // namespace Internal
-
-} // namespace Dali
diff --git a/dali/internal/offscreen/common/offscreen-application-impl.h b/dali/internal/offscreen/common/offscreen-application-impl.h
deleted file mode 100644 (file)
index 22c5f9e..0000000
+++ /dev/null
@@ -1,149 +0,0 @@
-#ifndef DALI_INTERNAL_OFFSCREEN_APPLICATION_IMPL_H
-#define DALI_INTERNAL_OFFSCREEN_APPLICATION_IMPL_H
-
-/*
- * Copyright (c) 2020 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.
- *
- */
-
-// EXTERNAL INCLUDES
-#include <memory>
-#include <dali/public-api/common/intrusive-ptr.h>
-#include <dali/public-api/object/base-object.h>
-
-// INTERNAL INCLUDES
-#include <dali/devel-api/adaptor-framework/offscreen-application.h>
-#include <dali/devel-api/adaptor-framework/offscreen-window.h>
-#include <dali/integration-api/adaptor-framework/scene-holder-impl.h>
-
-namespace Dali
-{
-class Adaptor;
-
-namespace Internal
-{
-
-/**
- * Implementation of the OffscreenApplication class.
- */
-class OffscreenApplication : public BaseObject
-{
-public:
-
-  using OffscreenApplicationSignalType = Dali::OffscreenApplication::OffscreenApplicationSignalType;
-
-  /**
-   * @brief Create a new OffscreenApplication
-   * @param[in] width The width of the default OffscreenWindow
-   * @param[in] height The height of the default OffscreenWindow
-   * @param[in] surface The native surface handle to create the default OffscreenWindow
-   * @param[in] isTranslucent Whether the OffscreenWindow is translucent or not
-   * @param[in] renderMode The RenderMode of the OffscreenApplication
-   */
-  static IntrusivePtr<OffscreenApplication> New( uint16_t width, uint16_t height, Dali::Any surface, bool isTranslucent, Dali::OffscreenApplication::RenderMode renderMode);
-
-public:
-
-  /**
-   * Destructor
-   */
-  virtual ~OffscreenApplication() = default;
-
-  /**
-   * @copydoc Dali::OffscreenApplication::Start()
-   */
-  void Start();
-
-  /**
-   * @copydoc Dali::OffscreenApplication::Stop()
-   */
-  void Stop();
-
-  /**
-   * @copydoc Dali::OffscreenApplication::GetDefaultWindow()
-   */
-  Dali::OffscreenWindow GetWindow();
-
-  /**
-   * @copydoc Dali::OffscreenApplication::RenderOnce()
-   */
-  void RenderOnce();
-
-public:  // Signals
-
-  /**
-   * @copydoc Dali::OffscreenApplication::InitSignal()
-   */
-  OffscreenApplicationSignalType& InitSignal()
-  {
-    return mInitSignal;
-  }
-
-  /**
-   * @copydoc Dali::OffscreenApplication::TerminateSignal()
-   */
-  OffscreenApplicationSignalType& TerminateSignal()
-  {
-    return mTerminateSignal;
-  }
-
-private:
-  /**
-   * Private constructor
-   * @param[in] width The width of the OffscreenWindow
-   * @param[in] height The height of the OffscreenApplication
-   * @param[in] surface The native surface handle to create the default OffscreenWindow
-   * @param[in] isTranslucent Whether the OffscreenWindow is translucent or not
-   * @param[in] renderMode The RenderMode of the OffscreenApplication
-   */
-  OffscreenApplication( uint16_t width, uint16_t height, Dali::Any surface, bool isTranslucent, Dali::OffscreenApplication::RenderMode renderMode );
-
-  // Undefined
-  OffscreenApplication( const OffscreenApplication& ) = delete;
-  OffscreenApplication& operator=( OffscreenApplication& ) = delete;
-  OffscreenApplication& operator=( const OffscreenApplication& ) = delete;
-  OffscreenApplication& operator=( OffscreenApplication&& ) = delete;
-
-private:
-  std::unique_ptr< Dali::Adaptor >          mAdaptor;
-  Dali::OffscreenWindow                     mDefaultWindow;
-
-  OffscreenApplicationSignalType              mInitSignal;
-  OffscreenApplicationSignalType              mTerminateSignal;
-};
-
-inline OffscreenApplication& GetImplementation( Dali::OffscreenApplication& offscreenApplication )
-{
-  DALI_ASSERT_ALWAYS( offscreenApplication && "OffscreenApplication handle is empty" );
-
-  BaseObject& handle = offscreenApplication.GetBaseObject();
-
-  return static_cast<OffscreenApplication&>( handle );
-}
-
-inline const OffscreenApplication& GetImplementation( const Dali::OffscreenApplication& offscreenApplication )
-{
-  DALI_ASSERT_ALWAYS( offscreenApplication && "OffscreenApplication handle is empty" );
-
-  const BaseObject& handle = offscreenApplication.GetBaseObject();
-
-  return static_cast<const OffscreenApplication&>( handle );
-}
-
-} // namespace Internal
-
-} // namespace Dali
-
-#endif // DALI_INTERNAL_OFFSCREEN_APPLICATION_IMPL_H
diff --git a/dali/internal/offscreen/common/offscreen-window-impl.cpp b/dali/internal/offscreen/common/offscreen-window-impl.cpp
deleted file mode 100644 (file)
index ab818ad..0000000
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * Copyright (c) 2020 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.
- *
- */
-
-// CLASS HEADER
-#include <dali/internal/offscreen/common/offscreen-window-impl.h>
-
-// EXTERNAL INCLUDES
-#include <dali/public-api/actors/layer.h>
-
-// INTERNAL INCLUDES
-#include <dali/integration-api/adaptor-framework/adaptor.h>
-#include <dali/integration-api/adaptor-framework/native-render-surface.h>
-#include <dali/integration-api/adaptor-framework/native-render-surface-factory.h>
-#include <dali/integration-api/adaptor-framework/trigger-event-factory.h>
-#include <dali/internal/offscreen/common/offscreen-application-impl.h>
-
-namespace Dali
-{
-
-namespace Internal
-{
-
-OffscreenWindow* OffscreenWindow::New( uint16_t width, uint16_t height, Dali::Any surface, bool isTranslucent )
-{
-  OffscreenWindow* window = new OffscreenWindow( width, height, surface, isTranslucent );
-  return window;
-}
-
-OffscreenWindow::OffscreenWindow( uint16_t width, uint16_t height, Dali::Any surface, bool isTranslucent )
-: mRenderNotification()
-{
-  // Create surface
-  mSurface = std::unique_ptr< RenderSurfaceInterface >( CreateNativeSurface( SurfaceSize( width, height ), surface, isTranslucent ) );
-}
-
-void OffscreenWindow::Initialize( bool isDefaultWindow )
-{
-  if( isDefaultWindow )
-  {
-    Initialize();
-    return;
-  }
-
-  Dali::Integration::SceneHolder sceneHolderHandler = Dali::Integration::SceneHolder( this );
-  Dali::Adaptor::Get().AddWindow( sceneHolderHandler );
-
-  Initialize();
-}
-
-void OffscreenWindow::Initialize()
-{
-  // Connect callback to be notified when the surface is rendered
-  TriggerEventFactory triggerEventFactory;
-
-  mRenderNotification = std::unique_ptr< TriggerEventInterface >( triggerEventFactory.CreateTriggerEvent( MakeCallback( this, &OffscreenWindow::OnPostRender ), TriggerEventInterface::KEEP_ALIVE_AFTER_TRIGGER ) );
-
-  NativeRenderSurface* surface = GetNativeRenderSurface();
-
-  if( !surface )
-  {
-    return;
-  }
-
-  surface->SetRenderNotification( mRenderNotification.get() );
-}
-
-OffscreenWindow::~OffscreenWindow()
-{
-  NativeRenderSurface* surface = GetNativeRenderSurface();
-
-  if( surface )
-  {
-    // To prevent notification triggering in NativeRenderSurface::PostRender while deleting SceneHolder
-    surface->SetRenderNotification( nullptr );
-  }
-}
-
-uint32_t OffscreenWindow::GetLayerCount() const
-{
-  return mScene.GetLayerCount();
-}
-
-Dali::Layer OffscreenWindow::GetLayer( uint32_t depth ) const
-{
-  return mScene.GetLayer( depth );
-}
-
-OffscreenWindow::WindowSize OffscreenWindow::GetSize() const
-{
-  Size size = mScene.GetSize();
-
-  return OffscreenWindow::WindowSize( static_cast<uint16_t>( size.width ), static_cast<uint16_t>( size.height ) );
-}
-
-Dali::Any OffscreenWindow::GetNativeHandle() const
-{
-  NativeRenderSurface* surface = GetNativeRenderSurface();
-  DALI_ASSERT_ALWAYS( surface && "surface handle is empty" );
-
-  return surface->GetNativeRenderable();
-}
-
-NativeRenderSurface* OffscreenWindow::GetNativeRenderSurface() const
-{
-  return dynamic_cast< NativeRenderSurface* >( mSurface.get() );
-}
-
-void OffscreenWindow::OnPostRender()
-{
-  Dali::OffscreenWindow handle( this );
-  mPostRenderSignal.Emit( handle, GetNativeHandle() );
-}
-
-OffscreenWindow::PostRenderSignalType& OffscreenWindow::PostRenderSignal()
-{
-  return mPostRenderSignal;
-}
-
-} // namespace Internal
-
-} // namespace Dali
diff --git a/dali/internal/offscreen/common/offscreen-window-impl.h b/dali/internal/offscreen/common/offscreen-window-impl.h
deleted file mode 100644 (file)
index 95a7c55..0000000
+++ /dev/null
@@ -1,163 +0,0 @@
-#ifndef DALI_INTERNAL_OFFSCREEN_WINDOW_IMPL_H
-#define DALI_INTERNAL_OFFSCREEN_WINDOW_IMPL_H
-
-/*
- * Copyright (c) 2020 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.
- *
- */
-
-// EXTERNAL INCLUDES
-#include <memory>
-#include <dali/public-api/common/intrusive-ptr.h>
-#include <dali/public-api/signals/connection-tracker.h>
-
-// INTERNAL INCLUDES
-#include <dali/devel-api/adaptor-framework/offscreen-window.h>
-#include <dali/integration-api/adaptor-framework/scene-holder-impl.h>
-
-namespace Dali
-{
-class Adaptor;
-class Layer;
-class NativeRenderSurface;
-class TriggerEventInterface;
-
-namespace Internal
-{
-
-/**
- * Implementation of the OffscreenWindow class.
- */
-class OffscreenWindow : public Dali::Internal::Adaptor::SceneHolder,
-                        public ConnectionTracker
-{
-public:
-  using WindowSize = Dali::OffscreenWindow::WindowSize;
-  using PostRenderSignalType = Dali::OffscreenWindow::PostRenderSignalType;
-
-  /**
-   * @brief Create a new OffscreenWindow
-   *
-   * @param[in] width The initial width of the OffscreenWindow
-   * @param[in] height The initial height of the OffscreenWindow
-   * @param[in] surface The native surface handle of your platform
-   * @param[in] isTranslucent Whether the OffscreenWindow is translucent or not
-   */
-  static OffscreenWindow* New( uint16_t width, uint16_t height, Dali::Any surface, bool isTranslucent );
-
-  OffscreenWindow() = default;
-
-public:
-
-  /**
-   * Destructor
-   */
-  ~OffscreenWindow();
-
-  /**
-   * @copydoc Dali::OffscreenWindow::GetLayerCount
-   */
-  uint32_t GetLayerCount() const;
-
-  /**
-   * @copydoc Dali::OffscreenWindow::GetLayer
-   */
-  Dali::Layer GetLayer( uint32_t depth ) const;
-
-  /**
-   * @copydoc Dali::OffscreenWindow::GetSize
-   */
-  WindowSize GetSize() const;
-
-  /**
-   * @copydoc Dali::OffscreenWindow::GetNativeHandle
-   */
-  Any GetNativeHandle() const override;
-
-  /*
-   * @brief Initialize the OffscreenWindow
-   * @param[in] isDefaultWindow Whether the OffscreenWindow is a default one or not
-   */
-  void Initialize( bool isDefaultWindow );
-
-public:  // Signals
-
-  /**
-   * @copydoc Dali::OffscreenWindow::PostRenderSignal
-   */
-  PostRenderSignalType& PostRenderSignal();
-
-private:
-  /**
-   * This function is called after drawing by dali.
-   */
-  void OnPostRender();
-
-  /**
-   * @brief Get the native render surface
-   * @return The render surface
-   */
-  NativeRenderSurface* GetNativeRenderSurface() const;
-
-private:
-
- /**
-   * Private constructor
-   *
-   * @param[in] width The initial width of the OffscreenWindow
-   * @param[in] height The initial height of the OffscreenWindow
-   * @param[in] surface The native surface handle
-   * @param[in] isTranslucent Whether the OffscreenWindow is translucent or not
-   */
-  OffscreenWindow( uint16_t width, uint16_t height, Dali::Any surface, bool isTranslucent );
-
-  // Undefined
-  OffscreenWindow( const OffscreenWindow& );
-  OffscreenWindow& operator=( OffscreenWindow& );
-
-  /*
-   * @brief Initialize the OffscreenWindow (for internal use)
-   */
-  void Initialize();
-
-private:
-
-  std::unique_ptr< TriggerEventInterface >  mRenderNotification;
-  PostRenderSignalType                      mPostRenderSignal;
-};
-
-inline OffscreenWindow& GetImplementation( Dali::OffscreenWindow& offscreenWindow )
-{
-  DALI_ASSERT_ALWAYS( offscreenWindow && "Dali::OffscreenWindow handle is empty" );
-
-  BaseObject& handle = offscreenWindow.GetBaseObject();
-
-  return static_cast<OffscreenWindow&>( handle );
-}
-
-inline const OffscreenWindow& GetImplementation( const Dali::OffscreenWindow& offscreenWindow )
-{
-  DALI_ASSERT_ALWAYS( offscreenWindow && "Dali::OffscreenWindow handle is empty" );
-
-  const BaseObject& handle = offscreenWindow.GetBaseObject();
-
-  return static_cast<const OffscreenWindow&>( handle );
-}
-
-} // namespace Internal
-
-} // namespace Dali
-
-#endif // DALI_INTERNAL_OFFSCREEN_WINDOW_IMPL_H
diff --git a/dali/internal/offscreen/file.list b/dali/internal/offscreen/file.list
deleted file mode 100644 (file)
index e75b847..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-# module: offscreen, backend: common
-SET( adaptor_offscreen_common_src_files
-    ${adaptor_offscreen_dir}/common/offscreen-application-impl.cpp
-    ${adaptor_offscreen_dir}/common/offscreen-window-impl.cpp
-)
index 064b6a621df85904c037a287513b9ec9e0f1bfda..dc3f03ddcb38ff1395d9eae100259551f1d7d316 100644 (file)
@@ -54,11 +54,14 @@ Debug::Filter* gNativeSurfaceLogFilter = Debug::Filter::New(Debug::Verbose, fals
 } // unnamed namespace
 
 NativeRenderSurfaceEcoreWl::NativeRenderSurfaceEcoreWl( SurfaceSize surfaceSize, Any surface, bool isTransparent )
-: mRenderNotification( NULL ),
+: mSurfaceSize( surfaceSize ),
+  mRenderNotification( NULL ),
   mGraphics( NULL ),
   mEGL( nullptr ),
   mEGLSurface( nullptr ),
   mEGLContext( nullptr ),
+  mColorDepth( isTransparent ? COLOR_DEPTH_32 : COLOR_DEPTH_24 ),
+  mTbmFormat( isTransparent ? TBM_FORMAT_ARGB8888 : TBM_FORMAT_RGB888 ),
   mOwnSurface( false ),
   mDrawableCompleted( false ),
   mTbmQueue( NULL ),
@@ -69,22 +72,13 @@ NativeRenderSurfaceEcoreWl::NativeRenderSurfaceEcoreWl( SurfaceSize surfaceSize,
 
   if( surface.Empty() )
   {
-    mSurfaceSize = surfaceSize;
-    mColorDepth = isTransparent ? COLOR_DEPTH_32 : COLOR_DEPTH_24;
-    mTbmFormat = isTransparent ? TBM_FORMAT_ARGB8888 : TBM_FORMAT_RGB888;
     CreateNativeRenderable();
   }
   else
   {
+    // check we have a valid type
+    DALI_ASSERT_ALWAYS( ( surface.GetType() == typeid (tbm_surface_queue_h) ) && "Surface type is invalid" );
     mTbmQueue = AnyCast< tbm_surface_queue_h >( surface );
-
-    uint16_t width = static_cast<uint16_t>( tbm_surface_queue_get_width( mTbmQueue ) );
-    uint16_t height = static_cast<uint16_t>( tbm_surface_queue_get_height( mTbmQueue ) );
-    mSurfaceSize = SurfaceSize( width, height );
-
-    mTbmFormat = tbm_surface_queue_get_format( mTbmQueue );
-
-    mColorDepth = ( mTbmFormat == TBM_FORMAT_ARGB8888 ) ? COLOR_DEPTH_32 : COLOR_DEPTH_24;
   }
 }
 
@@ -132,11 +126,6 @@ void NativeRenderSurfaceEcoreWl::WaitUntilSurfaceReplaced()
   mDrawableCompleted = false;
 }
 
-Any NativeRenderSurfaceEcoreWl::GetNativeRenderable()
-{
-  return mTbmQueue;
-}
-
 PositionSize NativeRenderSurfaceEcoreWl::GetPositionSize() const
 {
   return PositionSize( 0, 0, static_cast<int>( mSurfaceSize.GetWidth() ), static_cast<int>( mSurfaceSize.GetHeight() ) );
@@ -255,61 +244,45 @@ void NativeRenderSurfaceEcoreWl::PostRender( bool renderToFbo, bool replacingSur
     eglImpl.SwapBuffers( mEGLSurface, damagedRects );
   }
 
-  if ( mOwnSurface )
+  if( mThreadSynchronization )
   {
-    if( mThreadSynchronization )
-    {
-      mThreadSynchronization->PostRenderStarted();
-    }
-
-    if( tbm_surface_queue_can_acquire( mTbmQueue, 1 ) )
-    {
-      if( tbm_surface_queue_acquire( mTbmQueue, &mConsumeSurface ) != TBM_SURFACE_QUEUE_ERROR_NONE )
-      {
-        DALI_LOG_ERROR( "Failed to acquire a tbm_surface\n" );
-        return;
-      }
-    }
-
-    if ( mConsumeSurface )
-    {
-      tbm_surface_internal_ref( mConsumeSurface );
-    }
+    mThreadSynchronization->PostRenderStarted();
+  }
 
-    if( replacingSurface )
+  if( tbm_surface_queue_can_acquire( mTbmQueue, 1 ) )
+  {
+    if( tbm_surface_queue_acquire( mTbmQueue, &mConsumeSurface ) != TBM_SURFACE_QUEUE_ERROR_NONE )
     {
-      ConditionalWait::ScopedLock lock( mTbmSurfaceCondition );
-      mDrawableCompleted = true;
-      mTbmSurfaceCondition.Notify( lock );
+      DALI_LOG_ERROR( "Failed to acquire a tbm_surface\n" );
+      return;
     }
+  }
 
-   // create damage for client applications which wish to know the update timing
-    if( !replacingSurface && mRenderNotification )
-    {
-      // use notification trigger
-      // Tell the event-thread to render the tbm_surface
-      mRenderNotification->Trigger();
-    }
+  tbm_surface_internal_ref( mConsumeSurface );
 
-    if( mThreadSynchronization )
-    {
-      // wait until the event-thread completed to use the tbm_surface
-      mThreadSynchronization->PostRenderWaitForCompletion();
-    }
+  if( replacingSurface )
+  {
+    ConditionalWait::ScopedLock lock( mTbmSurfaceCondition );
+    mDrawableCompleted = true;
+    mTbmSurfaceCondition.Notify( lock );
+  }
 
-    // release the consumed surface after post render was completed
-    ReleaseDrawable();
+ // create damage for client applications which wish to know the update timing
+  if( !replacingSurface && mRenderNotification )
+  {
+    // use notification trigger
+    // Tell the event-thread to render the tbm_surface
+    mRenderNotification->Trigger();
   }
-  else
+
+  if( mThreadSynchronization )
   {
-    // create damage for client applications which wish to know the update timing
-    if( !replacingSurface && mRenderNotification )
-    {
-      // use notification trigger
-      // Tell the event-thread to render the tbm_surface
-      mRenderNotification->Trigger();
-    }
+    // wait until the event-thread completed to use the tbm_surface
+    mThreadSynchronization->PostRenderWaitForCompletion();
   }
+
+  // release the consumed surface after post render was completed
+  ReleaseDrawable();
 }
 
 void NativeRenderSurfaceEcoreWl::StopRender()
index 44436f42cc0c4cf2732c33c12cd42bd3c4a49e0f..1c92972e80cdcde4668aeb0c6e4241cd5bef7b04 100644 (file)
@@ -72,11 +72,6 @@ public: // from WindowRenderSurface
    */
   void WaitUntilSurfaceReplaced() override;
 
-  /**
-   * @copydoc Dali::NativeRenderSurface::GetNativeRenderable()
-   */
-  virtual Any GetNativeRenderable() override;
-
 public: // from Dali::RenderSurfaceInterface
 
   /**