[dali_1.4.26] Merge branch 'devel/master' 95/208795/1
authorgreynaga <g.reynaga@samsung.com>
Fri, 28 Jun 2019 10:43:19 +0000 (11:43 +0100)
committergreynaga <g.reynaga@samsung.com>
Fri, 28 Jun 2019 10:43:19 +0000 (11:43 +0100)
Change-Id: Id208ba34cfcbf2549a1915d7c59afb6ffb775277

40 files changed:
automated-tests/src/dali-adaptor-internal/utc-Dali-CommandLineOptions.cpp
dali/devel-api/adaptor-framework/key-devel.cpp [new file with mode: 0644]
dali/devel-api/adaptor-framework/key-devel.h
dali/devel-api/file.list
dali/integration-api/adaptor.h
dali/integration-api/render-surface-interface.h
dali/integration-api/scene-holder-impl.cpp
dali/internal/accessibility/file.list
dali/internal/accessibility/generic/tts-player-factory-generic.cpp [moved from dali/internal/accessibility/ubuntu/tts-player-factory-ubuntu.cpp with 82% similarity]
dali/internal/accessibility/generic/tts-player-impl-generic.cpp [moved from dali/internal/accessibility/ubuntu/tts-player-impl-ubuntu.cpp with 53% similarity]
dali/internal/accessibility/generic/tts-player-impl-generic.h [moved from dali/internal/accessibility/ubuntu/tts-player-impl-ubuntu.h with 81% similarity]
dali/internal/adaptor/common/adaptor-impl.cpp
dali/internal/adaptor/common/adaptor-impl.h
dali/internal/adaptor/common/adaptor-internal-services.h
dali/internal/adaptor/common/adaptor.cpp
dali/internal/adaptor/common/application-impl.cpp
dali/internal/adaptor/common/application-impl.h
dali/internal/adaptor/common/framework.h
dali/internal/graphics/common/vsync-monitor-interface.h [deleted file]
dali/internal/graphics/common/vsync-monitor.h [deleted file]
dali/internal/graphics/file.list
dali/internal/graphics/generic/egl-image-extensions-generic.cpp [moved from dali/internal/graphics/ubuntu/egl-image-extensions-ubuntu.cpp with 97% similarity]
dali/internal/graphics/gles/egl-implementation.cpp
dali/internal/graphics/tizen/vsync-monitor-tizen.cpp [deleted file]
dali/internal/graphics/ubuntu/vsync-monitor-ubuntu.cpp [deleted file]
dali/internal/graphics/windows/vsync-monitor-win.cpp [deleted file]
dali/internal/input/common/key-impl.h
dali/internal/input/tizen-wayland/input-method-context-impl-ecore-wl.cpp
dali/internal/system/common/command-line-options.cpp
dali/internal/system/common/command-line-options.h
dali/internal/trace/file.list
dali/internal/trace/generic/trace-factory-generic.cpp [moved from dali/internal/trace/ubuntu/trace-factory-ubuntu.cpp with 92% similarity]
dali/internal/trace/generic/trace-manager-impl-generic.cpp [moved from dali/internal/trace/ubuntu/trace-manager-impl-ubuntu.cpp with 54% similarity]
dali/internal/trace/generic/trace-manager-impl-generic.h [moved from dali/internal/trace/ubuntu/trace-manager-impl-ubuntu.h with 86% similarity]
dali/internal/window-system/tizen-wayland/native-render-surface-ecore-wl.cpp
dali/public-api/adaptor-framework/application.cpp
dali/public-api/adaptor-framework/application.h
dali/public-api/adaptor-framework/window.cpp
dali/public-api/dali-adaptor-version.cpp
packaging/dali-adaptor.spec

index 4e332d1..f9a9404 100644 (file)
@@ -53,7 +53,6 @@ int UtcDaliCommandLineOptionsNoArgs(void)
   DALI_TEST_EQUALS( argc, 1, TEST_LOCATION );
 
   // Check values
-  DALI_TEST_EQUALS( options.noVSyncOnRender, 0, TEST_LOCATION );
   DALI_TEST_EQUALS( options.stageWidth, 0, TEST_LOCATION );
   DALI_TEST_EQUALS( options.stageHeight, 0, TEST_LOCATION );
   DALI_TEST_EQUALS( options.stageDPI, "", TEST_LOCATION );
@@ -81,7 +80,6 @@ int UtcDaliCommandLineOptionsDaliShortArgs(void)
   DALI_TEST_EQUALS( argc, 1, TEST_LOCATION );
 
   // Check values
-  DALI_TEST_EQUALS( options.noVSyncOnRender, 0, TEST_LOCATION );
   DALI_TEST_EQUALS( options.stageWidth, 800, TEST_LOCATION );
   DALI_TEST_EQUALS( options.stageHeight, 1000, TEST_LOCATION );
   DALI_TEST_EQUALS( options.stageDPI, "4x5", TEST_LOCATION );
@@ -99,7 +97,6 @@ int UtcDaliCommandLineOptionsDaliLongArgsEqualsSign(void)
       "--width=800",
       "--height=1000",
       "--dpi=3x4",
-      "--no-vsync",
       "--help"
   };
   int argc( sizeof( argList ) / sizeof( argList[0] ) );
@@ -111,7 +108,6 @@ int UtcDaliCommandLineOptionsDaliLongArgsEqualsSign(void)
   DALI_TEST_EQUALS( argc, 1, TEST_LOCATION );
 
   // Check values
-  DALI_TEST_EQUALS( options.noVSyncOnRender, 1, TEST_LOCATION );
   DALI_TEST_EQUALS( options.stageWidth, 800, TEST_LOCATION );
   DALI_TEST_EQUALS( options.stageHeight, 1000, TEST_LOCATION );
   DALI_TEST_EQUALS( options.stageDPI, "3x4", TEST_LOCATION );
@@ -129,7 +125,6 @@ int UtcDaliCommandLineOptionsDaliLongArgsSpaces(void)
       "--width", "800",
       "--height", "1000",
       "--dpi", "3x4",
-      "--no-vsync",
       "--help"
   };
   int argc( sizeof( argList ) / sizeof( argList[0] ) );
@@ -141,7 +136,6 @@ int UtcDaliCommandLineOptionsDaliLongArgsSpaces(void)
   DALI_TEST_EQUALS( argc, 1, TEST_LOCATION );
 
   // Check values
-  DALI_TEST_EQUALS( options.noVSyncOnRender, 1, TEST_LOCATION );
   DALI_TEST_EQUALS( options.stageWidth, 800, TEST_LOCATION );
   DALI_TEST_EQUALS( options.stageHeight, 1000, TEST_LOCATION );
   DALI_TEST_EQUALS( options.stageDPI, "3x4", TEST_LOCATION );
diff --git a/dali/devel-api/adaptor-framework/key-devel.cpp b/dali/devel-api/adaptor-framework/key-devel.cpp
new file mode 100644 (file)
index 0000000..9690ac2
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2019 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.
+ *
+ */
+
+// INTERNAL INCLUDES
+#include <dali/internal/input/common/key-impl.h>
+
+namespace Dali
+{
+
+namespace DevelKey
+{
+
+int GetDaliKeyCode( const char* keyName )
+{
+  return Internal::Adaptor::KeyLookup::GetDaliKeyCode( keyName );
+}
+
+} // namespace DevelKey
+
+} // namespace Dali
index f42626d..c78c21a 100644 (file)
@@ -94,6 +94,13 @@ enum Key
 
 };
 
+/**
+ * @brief Get the key code from a key name.
+ * @param[in] keyName The key name
+ * @return The key code. -1 if the daliKey does not exist in the supported key lookup table.
+ */
+DALI_ADAPTOR_API int GetDaliKeyCode( const char* keyName );
+
 } // namespace DevelKey
 
 } // namespace Dali
index d3c3265..e0495d7 100755 (executable)
@@ -18,6 +18,7 @@ devel_api_src_files = \
   $(adaptor_devel_api_dir)/adaptor-framework/orientation.cpp \
   $(adaptor_devel_api_dir)/adaptor-framework/performance-logger.cpp \
   $(adaptor_devel_api_dir)/adaptor-framework/physical-keyboard.cpp \
+  $(adaptor_devel_api_dir)/adaptor-framework/key-devel.cpp \
   $(adaptor_devel_api_dir)/adaptor-framework/pixel-buffer.cpp \
   $(adaptor_devel_api_dir)/adaptor-framework/singleton-service.cpp \
   $(adaptor_devel_api_dir)/adaptor-framework/sound-player.cpp \
index 570ff19..2bce86e 100755 (executable)
@@ -21,6 +21,7 @@
 // EXTERNAL INCLUDES
 #include <dali/public-api/signals/callback.h>
 #include <dali/public-api/signals/dali-signal.h>
+#include <dali/public-api/math/uint-16-pair.h>
 #include <dali/public-api/math/rect.h>
 #include <dali/public-api/events/touch-event.h>
 #include <dali/public-api/common/view-mode.h>
@@ -126,6 +127,8 @@ public:
   typedef Signal< void (Adaptor&) > AdaptorSignalType; ///< Generic Type for adaptor signals
   typedef Signal< void (Window&) > WindowCreatedSignalType;  ///< Window created signal type
 
+  using SurfaceSize = Uint16Pair; ///< Surface size type
+
 public:
   /**
    * @brief Create a new adaptor using the window.
@@ -252,6 +255,19 @@ public:
   bool AddIdle( CallbackBase* callback, bool hasReturnValue );
 
   /**
+   * @brief Adds a new Window instance to the Adaptor
+   *
+   * @param[in]  childWindow The child window instance
+   * @param[in]  childWindowName The child window title/name
+   * @param[in]  childWindowClassName The class name that the child window belongs to
+   * @param[in]  childWindowMode The mode of the child window
+   */
+  bool AddWindow( Dali::Integration::SceneHolder childWindow,
+                  const std::string& childWindowName,
+                  const std::string& childWindowClassName,
+                  bool childWindowMode );
+
+  /**
    * @brief Removes a previously added @p callback.
    * @note Function must be called from the main event thread only.
    *
@@ -337,14 +353,6 @@ public:
   void SetPreRenderCallback( CallbackBase* callback );
 
   /**
-   * @brief Set whether the frame count per render is managed using the hardware VSync or
-   * manually timed.
-   *
-   * @param[in] useHardware True if the hardware VSync should be used
-   */
-  void SetUseHardwareVSync(bool useHardware);
-
-  /**
    * @brief Returns a reference to the instance of the adaptor used by the current thread.
    *
    * @return A reference to the adaptor.
@@ -406,6 +414,22 @@ public:
   void SceneCreated();
 
   /**
+   * @brief Informs core the surface size has changed.
+   *
+   * @param[in] surface The current render surface
+   * @param[in] surfaceSize The new surface size
+   */
+  void SurfaceResizePrepare( Dali::RenderSurfaceInterface* surface, SurfaceSize surfaceSize );
+
+  /**
+   * @brief Informs ThreadController the surface size has changed.
+   *
+   * @param[in] surface The current render surface
+   * @param[in] surfaceSize The new surface size
+   */
+  void SurfaceResizeComplete( Dali::RenderSurfaceInterface* surface, SurfaceSize surfaceSize );
+
+  /**
    * @brief Renders once more even if we're paused
    * @note Will not work if the window is hidden.
    */
@@ -436,6 +460,16 @@ public:
    */
   Dali::WindowContainer GetWindows() const;
 
+  /**
+   * @brief Called when the window becomes fully or partially visible.
+   */
+  void OnWindowShown();
+
+  /**
+   * @brief Called when the window is fully hidden.
+   */
+  void OnWindowHidden();
+
 public:  // Signals
 
   /**
index ad672ca..501bf62 100644 (file)
@@ -66,8 +66,7 @@ public:
     mGraphics( nullptr ),
     mDisplayConnection( nullptr ),
     mDepthBufferRequired( Integration::DepthBufferAvailable::FALSE ),
-    mStencilBufferRequired( Integration::StencilBufferAvailable::FALSE ),
-    mBackgroundColor()
+    mStencilBufferRequired( Integration::StencilBufferAvailable::FALSE )
   {}
 
   /**
@@ -176,24 +175,6 @@ public:
    */
   virtual Integration::StencilBufferAvailable GetStencilBufferRequired() = 0;
 
-  /**
-   * @brief Sets the background color of the surface.
-   * @param[in] color The new background color
-   */
-  virtual void SetBackgroundColor( Vector4 color ) override
-  {
-    mBackgroundColor = color;
-  }
-
-  /**
-   * @brief Gets the background color of the surface.
-   * @return The background color
-   */
-  virtual Vector4 GetBackgroundColor() override
-  {
-    return mBackgroundColor;
-  }
-
 public:
 
   void SetAdaptor( Dali::Internal::Adaptor::AdaptorInternalServices& adaptor )
index deaf965..64d0a42 100644 (file)
@@ -205,15 +205,15 @@ Dali::RenderSurfaceInterface* SceneHolder::GetSurface() const
 
 void SceneHolder::SetBackgroundColor( const Vector4& color )
 {
-  if ( mSurface )
+  if( mScene )
   {
-    mSurface->SetBackgroundColor( color );
+    mScene.SetBackgroundColor( color );
   }
 }
 
 Vector4 SceneHolder::GetBackgroundColor() const
 {
-  return mSurface ? mSurface->GetBackgroundColor() : Vector4();
+  return mScene ? mScene.GetBackgroundColor() : Color::BLACK;
 }
 
 void SceneHolder::SetAdaptor(Dali::Adaptor& adaptor)
index c0674f6..00bd528 100644 (file)
@@ -32,8 +32,8 @@ adaptor_accessibility_tizen_tv_src_files=\
 adaptor_accessibility_tizen_wearable_src_files=\
     ${adaptor_accessibility_dir}/tizen-wayland/tizen-wearable/accessibility-adaptor-impl-wearable.cpp
 
-# module: accessibility, backend: ubuntu
+# module: accessibility, backend: generic
 adaptor_accessibility_ubuntu_src_files=\
     ${adaptor_accessibility_dir}/generic/accessibility-adaptor-impl-generic.cpp \
-    ${adaptor_accessibility_dir}/ubuntu/tts-player-factory-ubuntu.cpp \
-    ${adaptor_accessibility_dir}/ubuntu/tts-player-impl-ubuntu.cpp
+    ${adaptor_accessibility_dir}/generic/tts-player-factory-generic.cpp \
+    ${adaptor_accessibility_dir}/generic/tts-player-impl-generic.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -16,7 +16,7 @@
  */
 
 #include <dali/internal/accessibility/common/tts-player-factory.h>
-#include <dali/internal/accessibility/ubuntu/tts-player-impl-ubuntu.h>
+#include <dali/internal/accessibility/generic/tts-player-impl-generic.h>
 
 namespace Dali
 {
@@ -32,7 +32,7 @@ namespace TtsPlayerFactory
 
 std::unique_ptr<TtsPlayer> New(Dali::TtsPlayer::Mode mode)
 {
-  return TtsPlayerUbuntu::New(mode);
+  return TtsPlayerGeneric::New(mode);
 }
 
 } // namespace TtsPlayerFactory
@@ -41,4 +41,4 @@ std::unique_ptr<TtsPlayer> New(Dali::TtsPlayer::Mode mode)
 
 } // namespace Internal
 
-} // namespace Dali
\ No newline at end of file
+} // namespace Dali
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -16,7 +16,7 @@
  */
 
 // CLASS HEADER
-#include <dali/internal/accessibility/ubuntu/tts-player-impl-ubuntu.h>
+#include <dali/internal/accessibility/generic/tts-player-impl-generic.h>
 
 // EXTERNAL INCLUDES
 #include <dali/public-api/object/type-registry.h>
@@ -32,46 +32,46 @@ namespace Adaptor
 {
 
 #if defined(DEBUG_ENABLED)
-Debug::Filter* TtsPlayerUbuntu::gLogFilter = Debug::Filter::New(Debug::Concise, false, "LOG_TTS_PLAYER");
+Debug::Filter* TtsPlayerGeneric::gLogFilter = Debug::Filter::New(Debug::Concise, false, "LOG_TTS_PLAYER");
 #endif
 
-std::unique_ptr<TtsPlayerUbuntu> TtsPlayerUbuntu::New(Dali::TtsPlayer::Mode mode)
+std::unique_ptr<TtsPlayerGeneric> TtsPlayerGeneric::New(Dali::TtsPlayer::Mode mode)
 {
-  return std::unique_ptr<TtsPlayerUbuntu>(new TtsPlayerUbuntu(mode));
+  return std::unique_ptr<TtsPlayerGeneric>(new TtsPlayerGeneric(mode));
 }
 
-TtsPlayerUbuntu::TtsPlayerUbuntu(Dali::TtsPlayer::Mode mode)
+TtsPlayerGeneric::TtsPlayerGeneric(Dali::TtsPlayer::Mode mode)
 : mStateChangedSignal()
 {
-  DALI_LOG_ERROR("TTS is not implemented in UBUNTU profile.\n");
+  DALI_LOG_ERROR("TTS is not implemented in GENERIC profile.\n");
 }
 
-TtsPlayerUbuntu::~TtsPlayerUbuntu()
+TtsPlayerGeneric::~TtsPlayerGeneric()
 {
 }
 
-void TtsPlayerUbuntu::Play(const std::string& text)
+void TtsPlayerGeneric::Play(const std::string& text)
 {
 }
 
-void TtsPlayerUbuntu::Stop()
+void TtsPlayerGeneric::Stop()
 {
 }
 
-void TtsPlayerUbuntu::Pause()
+void TtsPlayerGeneric::Pause()
 {
 }
 
-void TtsPlayerUbuntu::Resume()
+void TtsPlayerGeneric::Resume()
 {
 }
 
-Dali::TtsPlayer::State TtsPlayerUbuntu::GetState()
+Dali::TtsPlayer::State TtsPlayerGeneric::GetState()
 {
   return Dali::TtsPlayer::UNAVAILABLE;
 }
 
-Dali::TtsPlayer::StateChangedSignalType& TtsPlayerUbuntu::StateChangedSignal()
+Dali::TtsPlayer::StateChangedSignalType& TtsPlayerGeneric::StateChangedSignal()
 {
   return mStateChangedSignal;
 }
@@ -1,8 +1,8 @@
-#ifndef DALI_INTERNAL_ACCESSIBILITY_UBUNTU_TTS_PLAYER_IMPL_UBUNTU_H
-#define DALI_INTERNAL_ACCESSIBILITY_UBUNTU_TTS_PLAYER_IMPL_UBUNTU_H
+#ifndef DALI_INTERNAL_ACCESSIBILITY_GENERIC_TTS_PLAYER_IMPL_GENERIC_H
+#define DALI_INTERNAL_ACCESSIBILITY_GENERIC_TTS_PLAYER_IMPL_GENERIC_H
 
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -42,7 +42,7 @@ namespace Adaptor
 /**
  * Text-to-speech player
  */
-class TtsPlayerUbuntu : public Dali::Internal::Adaptor::TtsPlayer
+class TtsPlayerGeneric : public Dali::Internal::Adaptor::TtsPlayer
 {
 
 public:
@@ -53,7 +53,7 @@ public:
    * @param mode the mode of tts-player
    * @return A newly created TtsPlayer.
    */
-  static std::unique_ptr<TtsPlayerUbuntu> New(Dali::TtsPlayer::Mode mode);
+  static std::unique_ptr<TtsPlayerGeneric> New(Dali::TtsPlayer::Mode mode);
 
   /**
    * @copydoc TtsPlayer::Play()
@@ -89,12 +89,12 @@ public:
    * Private Constructor; see also TtsPlayer::New()
    * @param mode the mode of tts-player
    */
-  TtsPlayerUbuntu(Dali::TtsPlayer::Mode mode);
+  TtsPlayerGeneric(Dali::TtsPlayer::Mode mode);
 
   /**
    * Destructor
    */
-  virtual ~TtsPlayerUbuntu();
+  virtual ~TtsPlayerGeneric();
 
 private:
 
@@ -112,4 +112,4 @@ public:
 
 } // namespace Dali
 
-#endif // DALI_INTERNAL_ACCESSIBILITY_UBUNTU_TTS_PLAYER_IMPL_UBUNTU_H
+#endif // DALI_INTERNAL_ACCESSIBILITY_GENERIC_TTS_PLAYER_IMPL_GENERIC_H
index 0aa9feb..db49850 100755 (executable)
@@ -54,7 +54,6 @@
 #include <dali/internal/graphics/gles/egl-sync-implementation.h>
 #include <dali/internal/graphics/common/egl-image-extensions.h>
 #include <dali/internal/clipboard/common/clipboard-impl.h>
-#include <dali/internal/graphics/common/vsync-monitor.h>
 #include <dali/internal/system/common/object-profiler.h>
 #include <dali/internal/window-system/common/display-connection.h>
 #include <dali/internal/window-system/common/window-impl.h>
@@ -196,8 +195,6 @@ void Adaptor::Initialize( GraphicsFactory& graphicsFactory, Dali::Configuration:
 
   mNotificationTrigger = mTriggerEventFactory.CreateTriggerEvent( MakeCallback( this, &Adaptor::ProcessCoreEvents ), TriggerEventInterface::KEEP_ALIVE_AFTER_TRIGGER);
 
-  mVSyncMonitor = new VSyncMonitor;
-
   mDisplayConnection = Dali::DisplayConnection::New( *mGraphics, defaultWindow->GetSurface()->GetSurfaceType() );
 
   mThreadController = new ThreadController( *this, *mEnvironmentOptions );
@@ -304,7 +301,6 @@ Adaptor::~Adaptor()
   mWindows.clear();
 
   delete mThreadController; // this will shutdown render thread, which will call Core::ContextDestroyed before exit
-  delete mVSyncMonitor;
   delete mObjectProfiler;
 
   delete mCore;
@@ -571,9 +567,9 @@ void Adaptor::SetPreRenderCallback( CallbackBase* callback )
   mThreadController->SetPreRenderCallback( callback );
 }
 
-bool Adaptor::AddWindow( Dali::Integration::SceneHolder* childWindow, const std::string& childWindowName, const std::string& childWindowClassName, const bool& childWindowMode )
+bool Adaptor::AddWindow( Dali::Integration::SceneHolder childWindow, const std::string& childWindowName, const std::string& childWindowClassName, bool childWindowMode )
 {
-  Internal::Adaptor::SceneHolder& windowImpl = Dali::GetImplementation( *childWindow );
+  Internal::Adaptor::SceneHolder& windowImpl = Dali::GetImplementation( childWindow );
   windowImpl.SetAdaptor( Get() );
 
   // Add the new Window to the container - the order is not important
@@ -657,11 +653,6 @@ void Adaptor::SetRenderRefreshRate( unsigned int numberOfVSyncsPerRender )
   mThreadController->SetRenderRefreshRate( numberOfVSyncsPerRender );
 }
 
-void Adaptor::SetUseHardwareVSync( bool useHardware )
-{
-  mVSyncMonitor->SetUseHardwareVSync( useHardware );
-}
-
 Dali::DisplayConnection& Adaptor::GetDisplayConnectionInterface()
 {
   DALI_ASSERT_DEBUG( mDisplayConnection && "Display connection not created" );
@@ -704,11 +695,6 @@ Dali::RenderSurfaceInterface* Adaptor::GetRenderSurfaceInterface()
   return nullptr;
 }
 
-VSyncMonitorInterface* Adaptor::GetVSyncMonitorInterface()
-{
-  return mVSyncMonitor;
-}
-
 TraceInterface& Adaptor::GetKernelTraceInterface()
 {
   return mKernelTracer;
@@ -1046,7 +1032,6 @@ Adaptor::Adaptor(Dali::Integration::SceneHolder window, Dali::Adaptor& adaptor,
   mState( READY ),
   mCore( nullptr ),
   mThreadController( nullptr ),
-  mVSyncMonitor( nullptr ),
   mGraphics( nullptr ),
   mDisplayConnection( nullptr ),
   mWindows(),
index 4a77dfa..37a7438 100755 (executable)
@@ -72,7 +72,6 @@ namespace Adaptor
 {
 class DisplayConnection;
 class GraphicsFactory;
-class GestureManager;
 class GlImplementation;
 class GlSyncImplementation;
 class ThreadController;
@@ -261,10 +260,10 @@ public: // AdaptorInternalServices implementation
    * @param[in]  childWindowClassName The class name that the child window belongs to
    * @param[in]  childWindowMode The mode of the child window
    */
-  virtual bool AddWindow( Dali::Integration::SceneHolder* childWindow,
+  virtual bool AddWindow( Dali::Integration::SceneHolder childWindow,
                           const std::string& childWindowName,
                           const std::string& childWindowClassName,
-                          const bool& childWindowMode );
+                          bool childWindowMode );
 
   /**
    * Removes an existing Window instance from the Adaptor
@@ -321,11 +320,6 @@ public:
   void SetRenderRefreshRate( unsigned int numberOfVSyncsPerRender );
 
   /**
-   * @copydoc Dali::Adaptor::SetUseHardwareVSync()
-   */
-  void SetUseHardwareVSync(bool useHardware);
-
-  /**
    * Return the PlatformAbstraction.
    * @return The PlatformAbstraction.
    */
@@ -399,12 +393,12 @@ public:
   void GetAppId( std::string& appId );
 
   /**
-   * Informs core the surface size has changed
+   * @copydoc Dali::Adaptor::SurfaceResizePrepare
    */
   void SurfaceResizePrepare( Dali::RenderSurfaceInterface* surface, SurfaceSize surfaceSize );
 
   /**
-   * Informs ThreadController the surface size has changed
+   * @copydoc Dali::Adaptor::SurfaceResizeComplete
    */
   void SurfaceResizeComplete( Dali::RenderSurfaceInterface* surface, SurfaceSize surfaceSize );
 
@@ -472,11 +466,6 @@ public:  //AdaptorInternalServices
   virtual Dali::RenderSurfaceInterface* GetRenderSurfaceInterface();
 
   /**
-   * @copydoc Dali::Internal::Adaptor::AdaptorInternalServices::GetVSyncMonitorInterface()
-   */
-  virtual VSyncMonitorInterface* GetVSyncMonitorInterface();
-
-  /**
    * @copydoc Dali::Internal::Adaptor::AdaptorInternalServices::GetPerformanceInterface()
    */
   virtual PerformanceInterface* GetPerformanceInterface();
@@ -543,7 +532,7 @@ private: // From Dali::Integration::RenderController
    */
   virtual void RequestProcessEventsOnIdle( bool forceProcess );
 
-private: // From Dali::Internal::Adaptor::WindowVisibilityObserver
+public: // From Dali::Internal::Adaptor::WindowVisibilityObserver
 
   /**
    * Called when the window becomes fully or partially visible.
@@ -653,7 +642,6 @@ private: // Data
   State                                 mState;                       ///< Current state of the adaptor
   Dali::Integration::Core*              mCore;                        ///< Dali Core
   ThreadController*                     mThreadController;            ///< Controls the threads
-  VSyncMonitor*                         mVSyncMonitor;                ///< Monitors VSync events
 
   GraphicsInterface*                    mGraphics;                    ///< Graphics interface
   Dali::DisplayConnection*              mDisplayConnection;           ///< Display connection
index db4a360..de6c4e3 100644 (file)
@@ -31,7 +31,6 @@
 #include <dali/internal/graphics/gles/egl-factory-interface.h>
 #include <dali/internal/network/common/socket-factory-interface.h>
 #include <dali/internal/system/common/performance-interface.h>
-#include <dali/internal/graphics/common/vsync-monitor-interface.h>
 #include <dali/internal/network/common/trace-interface.h>
 #include <dali/integration-api/render-surface.h>
 
@@ -100,11 +99,6 @@ public:
   virtual Dali::RenderSurfaceInterface* GetRenderSurfaceInterface() = 0;
 
   /**
-   * @return vsync monitor interface
-   */
-  virtual VSyncMonitorInterface* GetVSyncMonitorInterface() = 0;
-
-  /**
    * @return performance interface
    */
   virtual PerformanceInterface* GetPerformanceInterface() = 0;
index 17b0805..9b300bf 100755 (executable)
@@ -115,6 +115,11 @@ bool Adaptor::AddIdle( CallbackBase* callback, bool hasReturnValue )
   return mImpl->AddIdle( callback, hasReturnValue, false );
 }
 
+bool Adaptor::AddWindow( Dali::Integration::SceneHolder childWindow, const std::string& childWindowName, const std::string& childWindowClassName, bool childWindowMode )
+{
+  return mImpl->AddWindow( childWindow, childWindowName, childWindowClassName, childWindowMode );
+}
+
 void Adaptor::RemoveIdle( CallbackBase* callback )
 {
   mImpl->RemoveIdle( callback );
@@ -176,11 +181,6 @@ void Adaptor::SetPreRenderCallback( CallbackBase* callback )
   mImpl->SetPreRenderCallback( callback );
 }
 
-void Adaptor::SetUseHardwareVSync(bool useHardware)
-{
-  mImpl->SetUseHardwareVSync( useHardware );
-}
-
 Adaptor& Adaptor::Get()
 {
   return Internal::Adaptor::Adaptor::Get();
@@ -221,6 +221,16 @@ void Adaptor::SceneCreated()
   mImpl->SceneCreated();
 }
 
+void Adaptor::SurfaceResizePrepare( Dali::RenderSurfaceInterface* surface, SurfaceSize surfaceSize )
+{
+  mImpl->SurfaceResizePrepare( surface, surfaceSize );
+}
+
+void Adaptor::SurfaceResizeComplete( Dali::RenderSurfaceInterface* surface, SurfaceSize surfaceSize )
+{
+  mImpl->SurfaceResizeComplete( surface, surfaceSize );
+}
+
 void Adaptor::RenderOnce()
 {
   mImpl->RenderOnce();
@@ -246,6 +256,16 @@ Dali::WindowContainer Adaptor::GetWindows() const
   return mImpl->GetWindows();
 }
 
+void Adaptor::OnWindowShown()
+{
+  mImpl->OnWindowShown();
+}
+
+void Adaptor::OnWindowHidden()
+{
+  mImpl->OnWindowHidden();
+}
+
 Adaptor::Adaptor()
 : mImpl( NULL )
 {
index 2a7fc31..94196b7 100755 (executable)
@@ -242,12 +242,6 @@ void Application::OnInit()
   // Run the adaptor
   mAdaptor->Start();
 
-  // Check if user requires no vsyncing and set Adaptor
-  if (mCommandLineOptions->noVSyncOnRender)
-  {
-    mAdaptor->SetUseHardwareVSync(false);
-  }
-
   if( ! mStylesheet.empty() )
   {
     Dali::StyleMonitor::Get().SetTheme( mStylesheet );
@@ -442,6 +436,15 @@ void Application::SetStyleSheet( const std::string& stylesheet )
   mStylesheet = stylesheet;
 }
 
+void Application::SetCommandLineOptions( int* argc, char **argv[] )
+{
+  delete mCommandLineOptions;
+
+  mCommandLineOptions = new CommandLineOptions( argc, argv );
+
+  mFramework->SetCommandLineOptions( argc, argv );
+}
+
 ApplicationPtr Application::GetPreInitializedApplication()
 {
   return gPreInitializedApplication;
index b56814d..63bd089 100755 (executable)
@@ -248,6 +248,14 @@ public:
    */
   void SetStyleSheet( const std::string& stylesheet );
 
+  /**
+   * Sets a command line options.
+   * This is used in case of the preinitialized application.
+   * @param[in] argc A pointer to the number of arguments
+   * @param[in] argv A pointer to the argument list
+   */
+  void SetCommandLineOptions( int* argc, char **argv[] );
+
 public:  // Signals
 
   /**
index 0a53f75..9ac3303 100644 (file)
@@ -186,6 +186,19 @@ public:
   std::string GetBundleId() const;
 
   /**
+   * Sets a command line options.
+   * This is used in case of the preinitialized application.
+   * @param[in] argc A pointer to the number of arguments
+   * @param[in] argv A pointer to the argument list
+   */
+  void SetCommandLineOptions( int* argc, char **argv[] )
+  {
+    mArgc = argc;
+    mArgv = argv;
+  }
+
+
+  /**
    *  Gets the path at which application resources are stored.
    */
   static std::string GetResourcePath();
diff --git a/dali/internal/graphics/common/vsync-monitor-interface.h b/dali/internal/graphics/common/vsync-monitor-interface.h
deleted file mode 100644 (file)
index 63d70ba..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-#ifndef DALI_INTERNAL_BASE_VSYNC_MONITOR_INTERFACE_H
-#define DALI_INTERNAL_BASE_VSYNC_MONITOR_INTERFACE_H
-
-/*
- * Copyright (c) 2019 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
-// INTERNAL INCLUDES
-
-namespace Dali
-{
-
-namespace Internal
-{
-
-namespace Adaptor
-{
-
-/**
- * Interface for monitoring VSync
- * Implementations must provide a DoSync method
- */
-class VSyncMonitorInterface
-{
-public:
-
-  /**
-   * Initialize the vsync monitor.
-   */
-  virtual void Initialize() = 0;
-
-  /**
-   * Terminate the vsync monitor
-   */
-  virtual void Terminate() = 0;
-
-  /**
-   * Checks if hardware sync is available and enabled
-   * @return true if hardware sync is available and enabled
-   */
-  virtual bool UseHardware() = 0;
-
-  /**
-   * Wait for vertical blank sync.
-   * @param[out] frameNumber  The current sequence number for this vsync (increments by one for each vsync)
-   * @param[out] seconds      The timestamp (seconds) when the vsync occured
-   * @param[out] microseconds The timestamp (microseconds) when the vsync occured
-   * @return true if a valid sync was detected, false on error
-   */
-  virtual bool DoSync( unsigned int& frameNumber, unsigned int& seconds, unsigned int& microseconds ) = 0;
-
-protected:
-
-  /**
-   * Virtual protected destructor - no deletion through this interface
-   */
-  virtual ~VSyncMonitorInterface() {}
-
-}; // class VSyncMonitorInterface
-
-} // namespace Adaptor
-
-} // namespace Internal
-
-} // namespace Dali
-
-#endif // DALI_INTERNAL_BASE_VSYNC_MONITOR_INTERFACE_H
diff --git a/dali/internal/graphics/common/vsync-monitor.h b/dali/internal/graphics/common/vsync-monitor.h
deleted file mode 100644 (file)
index 5c34deb..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-#ifndef DALI_INTERNAL_VSYNC_MONITOR_IMPL_H
-#define DALI_INTERNAL_VSYNC_MONITOR_IMPL_H
-
-/*
- * Copyright (c) 2019 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 <xf86drm.h>
-
-// INTERNAL INCLUDES
-#include <dali/internal/graphics/common/vsync-monitor-interface.h>
-
-namespace Dali
-{
-
-namespace Internal
-{
-
-namespace Adaptor
-{
-
-/**
- * Tizen interface for monitoring VSync
- */
-class VSyncMonitor : public VSyncMonitorInterface
-{
-public:
-  /**
-   * Default constructor
-   */
-  VSyncMonitor();
-
-  /**
-   * Destructor
-   */
-  virtual ~VSyncMonitor();
-
-public:
-
-  /**
-   * Set the use hardware flag
-   * @param[in] useHardware The new state for the use hardware flag.
-   */
-  void SetUseHardwareVSync( bool useHardware );
-
-  /**
-   * Set whether the vsync hardware is available.
-   * (This is public to allow callback method to work...)
-   */
-  void SetHardwareVSyncAvailable(bool available);
-
-private: // From Dali::Internal::Adaptor::VSyncMonitorInterface
-
-  /**
-   * copydoc Dali::Internal::Adaptor::VSyncMonitorInterface::Initialize
-   */
-  virtual void Initialize();
-
-  /**
-   * copydoc Dali::Internal::Adaptor::VSyncMonitorInterface::Terminate
-   */
-  virtual void Terminate();
-
-  /**
-   * copydoc Dali::Internal::Adaptor::VSyncMonitorInterface::UseHardware
-   */
-  virtual bool UseHardware();
-
-  /**
-   * copydoc Dali::Internal::Adaptor::VSyncMonitorInterface::DoSync
-   */
-  virtual bool DoSync( unsigned int& frameNumber, unsigned int& seconds, unsigned int& microseconds );
-
-private:
-
-  int       mFileDescriptor;  ///< DRM dev node file descriptor
-  drmVBlank mVBlankInfo;
-  // NOTE cannot use booleans as these are used from multiple threads, must use variable with machine word size for atomic read/write
-  unsigned int mUseHardwareVSync; ///< Whether to use hardware vsync
-  unsigned int mHardwareVSyncAvailable; ///< Whether hardware vsync is available
-};
-
-} // namespace Adaptor
-
-} // namespace Internal
-
-} // namespace Dali
-
-#endif // DALI_INTERNAL_VSYNC_MONITOR_IMPL_H
index 016a3d8..2b40768 100644 (file)
@@ -12,10 +12,8 @@ adaptor_graphics_gles_src_files=\
 
 # module: graphics, backend: tizen
 adaptor_graphics_tizen_src_files=\
-    ${adaptor_graphics_dir}/tizen/egl-image-extensions-tizen.cpp \
-    ${adaptor_graphics_dir}/tizen/vsync-monitor-tizen.cpp
+    ${adaptor_graphics_dir}/tizen/egl-image-extensions-tizen.cpp
 
-# module: graphics, backend: ubuntu
+# module: graphics, backend: generic
 adaptor_graphics_ubuntu_src_files=\
-    ${adaptor_graphics_dir}/ubuntu/egl-image-extensions-ubuntu.cpp \
-    ${adaptor_graphics_dir}/ubuntu/vsync-monitor-ubuntu.cpp
+    ${adaptor_graphics_dir}/generic/egl-image-extensions-generic.cpp
@@ -81,9 +81,6 @@ void* EglImageExtensions::CreateImageKHR(EGLClientBuffer clientBuffer)
     EGL_NONE
   };
 
-// EGL constants use C casts
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wold-style-cast"
   EGLImageKHR eglImage  = eglCreateImageKHRProc( mEglImplementation->GetDisplay(),
                                              EGL_NO_CONTEXT,
                                              EGL_NATIVE_PIXMAP_KHR,
@@ -135,7 +132,6 @@ void* EglImageExtensions::CreateImageKHR(EGLClientBuffer clientBuffer)
       }
     }
   }
-#pragma GCC diagnostic pop
 
   return eglImage;
 }
index 2172e37..76fa78a 100755 (executable)
@@ -519,10 +519,10 @@ bool EglImplementation::ReplaceSurfaceWindow( EGLNativeWindowType window, EGLSur
   DestroySurface( eglSurface );
 
   // create the EGL surface
-  CreateSurfaceWindow( window, mColorDepth );
+  EGLSurface newEglSurface = CreateSurfaceWindow( window, mColorDepth );
 
   // set the context to be current with the new surface
-  MakeContextCurrent( eglSurface, eglContext );
+  MakeContextCurrent( newEglSurface, eglContext );
 
   return contextLost;
 }
diff --git a/dali/internal/graphics/tizen/vsync-monitor-tizen.cpp b/dali/internal/graphics/tizen/vsync-monitor-tizen.cpp
deleted file mode 100644 (file)
index 5892951..0000000
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * Copyright (c) 2014 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 <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <vconf.h>
-#include <vconf-keys.h>
-
-#include <dali/integration-api/debug.h>
-
-// INTERNAL INCLUDES
-#include <dali/internal/graphics/common/vsync-monitor.h>
-
-namespace Dali
-{
-
-namespace Internal
-{
-
-namespace Adaptor
-{
-
-namespace
-{
-// constants to keep code readability with unsigned int has to be used as boolean (due to multithreading)
-const unsigned int TRUE = 1u;
-const unsigned int FALSE = 0u;
-
-#if defined(DEBUG_ENABLED)
-Debug::Filter* gLogFilter = Debug::Filter::New(Debug::NoLogging, false, "LOG_VSYNC_MONITOR");
-#endif
-
-const char * const DRM_DEVICE( "/dev/dri/card0" );
-const int FD_NONE( -1 );
-
-void ScreenStatusChanged(keynode_t* node, void* data)
-{
-  VSyncMonitor* vsyncMonitor( static_cast< VSyncMonitor* >( data ) );
-
-  int status = 0;
-  vconf_get_int( VCONFKEY_PM_STATE, &status );
-
-  // status values
-  //  - VCONFKEY_PM_STATE_NORMAL : turn vsync on
-  //  - VCONFKEY_PM_STATE_LCDDIM : turn vsync off
-  //  - VCONFKEY_PM_STATE_LCDOFF : turn vsync off
-  //  - VCONFKEY_PM_STATE_SLEEP : turn vsync off
-  const unsigned int screenOn( VCONFKEY_PM_STATE_NORMAL == status );
-
-  vsyncMonitor->SetHardwareVSyncAvailable( screenOn );
-
-  DALI_LOG_INFO( gLogFilter, Debug::Concise, "%s, Screen %s.\n", __PRETTY_FUNCTION__, screenOn ? "On" : "Off" );
-}
-
-} // unnamed namespace
-
-VSyncMonitor::VSyncMonitor()
-: mFileDescriptor( FD_NONE ),
-  mUseHardwareVSync( TRUE ),
-  mHardwareVSyncAvailable( FALSE )
-{
-  vconf_notify_key_changed( VCONFKEY_PM_STATE, ScreenStatusChanged, this );
-}
-
-VSyncMonitor::~VSyncMonitor()
-{
-  Terminate();
-
-  vconf_ignore_key_changed( VCONFKEY_PM_STATE, ScreenStatusChanged );
-}
-
-void VSyncMonitor::SetUseHardwareVSync( bool useHardware )
-{
-  mUseHardwareVSync = useHardware;
-}
-
-void VSyncMonitor::SetHardwareVSyncAvailable( bool hardwareVSyncAvailable )
-{
-  mHardwareVSyncAvailable = hardwareVSyncAvailable;
-}
-
-void VSyncMonitor::Initialize()
-{
-  DALI_ASSERT_DEBUG( mFileDescriptor == FD_NONE && "VSyncMonitor::Initialize() called twice" );
-
-  // Read initial 'use hardware' status
-  ScreenStatusChanged( NULL, this );
-
-  // open /dev node
-  mFileDescriptor = open( DRM_DEVICE, O_RDWR );
-
-  // setup vblank request - block and wait for next vblank
-  mVBlankInfo.request.type = DRM_VBLANK_NEXTONMISS;
-  mVBlankInfo.request.sequence = 0;
-  mVBlankInfo.request.signal = 0;
-
-  // setup vblank reply - block and wait for next vblank
-  mVBlankInfo.reply.type = DRM_VBLANK_NEXTONMISS;
-  mVBlankInfo.reply.sequence = 0;
-  mVBlankInfo.reply.tval_sec = 0;
-  mVBlankInfo.reply.tval_usec = 0;
-}
-
-void VSyncMonitor::Terminate()
-{
-  if( mFileDescriptor != FD_NONE )
-  {
-    close( mFileDescriptor );
-    mFileDescriptor = FD_NONE;
-  }
-}
-
-bool VSyncMonitor::UseHardware()
-{
-  return mUseHardwareVSync && mHardwareVSyncAvailable && (FD_NONE != mFileDescriptor );
-}
-
-bool VSyncMonitor::DoSync( unsigned int& frameNumber, unsigned int& seconds, unsigned int& microseconds )
-{
-  DALI_ASSERT_DEBUG( mFileDescriptor != FD_NONE && "ECoreX::VSyncMonitor is not initialized" );
-
-  if( 0 == drmWaitVBlank( mFileDescriptor, &mVBlankInfo ) )
-  {
-    frameNumber = mVBlankInfo.reply.sequence;
-    seconds = mVBlankInfo.reply.tval_sec;
-    microseconds = mVBlankInfo.reply.tval_usec;
-
-    return true;
-  }
-
-  return false;
-}
-
-} // namespace Adaptor
-
-} // namespace Internal
-
-} // namespace Dali
diff --git a/dali/internal/graphics/ubuntu/vsync-monitor-ubuntu.cpp b/dali/internal/graphics/ubuntu/vsync-monitor-ubuntu.cpp
deleted file mode 100644 (file)
index 6edb84a..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Copyright (c) 2014 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/graphics/common/vsync-monitor.h>
-
-// EXTERNAL INCLUDES
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-
-#include <dali/integration-api/debug.h>
-
-namespace Dali
-{
-
-namespace Internal
-{
-
-namespace Adaptor
-{
-
-namespace
-{
-// constants to keep code readability with unsigned int has to be used as boolean (due to multithreading)
-const unsigned int TRUE = 1u;
-const unsigned int FALSE = 0u;
-
-const int FD_NONE( -1 );
-
-} // unnamed namespace
-
-VSyncMonitor::VSyncMonitor()
-: mFileDescriptor( FD_NONE ),
-  mUseHardwareVSync( FALSE ),
-  mHardwareVSyncAvailable( FALSE )
-{
-}
-
-VSyncMonitor::~VSyncMonitor()
-{
-  Terminate();
-}
-
-void VSyncMonitor::SetUseHardwareVSync( bool useHardware )
-{
-  mUseHardwareVSync = useHardware;
-}
-
-void VSyncMonitor::SetHardwareVSyncAvailable( bool hardwareVSyncAvailable )
-{
-  mHardwareVSyncAvailable = hardwareVSyncAvailable;
-}
-
-void VSyncMonitor::Initialize()
-{
-  DALI_ASSERT_DEBUG( mFileDescriptor == FD_NONE && "VSyncMonitor::Initialize() called twice" );
-
-  // setup vblank request - block and wait for next vblank
-  mVBlankInfo.request.type = DRM_VBLANK_NEXTONMISS;
-  mVBlankInfo.request.sequence = 0;
-  mVBlankInfo.request.signal = 0;
-
-  // setup vblank reply - block and wait for next vblank
-  mVBlankInfo.reply.type = DRM_VBLANK_NEXTONMISS;
-  mVBlankInfo.reply.sequence = 0;
-  mVBlankInfo.reply.tval_sec = 0;
-  mVBlankInfo.reply.tval_usec = 0;
-}
-
-void VSyncMonitor::Terminate()
-{
-}
-
-bool VSyncMonitor::UseHardware()
-{
-  return mUseHardwareVSync && mHardwareVSyncAvailable && (FD_NONE != mFileDescriptor );
-}
-
-
-bool VSyncMonitor::DoSync( unsigned int& frameNumber, unsigned int& seconds, unsigned int& microseconds )
-{
-  DALI_ASSERT_DEBUG( mFileDescriptor != FD_NONE && "ECoreX::VSyncMonitor is not initialized" );
-
-  if( 0 == drmWaitVBlank( mFileDescriptor, &mVBlankInfo ) )
-  {
-    frameNumber = mVBlankInfo.reply.sequence;
-    seconds = mVBlankInfo.reply.tval_sec;
-    microseconds = mVBlankInfo.reply.tval_usec;
-
-    return true;
-  }
-
-  return false;
-}
-
-} // namespace Adaptor
-
-} // namespace Internal
-
-} // namespace Dali
diff --git a/dali/internal/graphics/windows/vsync-monitor-win.cpp b/dali/internal/graphics/windows/vsync-monitor-win.cpp
deleted file mode 100755 (executable)
index 9ba3026..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * 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.
- * 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/graphics/common/vsync-monitor.h>
-
-// EXTERNAL INCLUDES
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-
-#include <dali/integration-api/debug.h>
-
-namespace Dali
-{
-
-namespace Internal
-{
-
-namespace Adaptor
-{
-
-namespace
-{
-// constants to keep code readability with unsigned int has to be used as boolean (due to multithreading)
-const unsigned int TRUE = 1u;
-const unsigned int FALSE = 0u;
-
-const int FD_NONE( -1 );
-
-} // unnamed namespace
-
-VSyncMonitor::VSyncMonitor()
-: mFileDescriptor( FD_NONE ),
-  mUseHardwareVSync( FALSE ),
-  mHardwareVSyncAvailable( FALSE )
-{
-}
-
-VSyncMonitor::~VSyncMonitor()
-{
-  Terminate();
-}
-
-void VSyncMonitor::SetUseHardwareVSync( bool useHardware )
-{
-  mUseHardwareVSync = useHardware;
-}
-
-void VSyncMonitor::SetHardwareVSyncAvailable( bool hardwareVSyncAvailable )
-{
-  mHardwareVSyncAvailable = hardwareVSyncAvailable;
-}
-
-void VSyncMonitor::Initialize()
-{
-  DALI_ASSERT_DEBUG( mFileDescriptor == FD_NONE && "VSyncMonitor::Initialize() called twice" );
-
-  // setup vblank request - block and wait for next vblank
-  mVBlankInfo.request.type = DRM_VBLANK_NEXTONMISS;
-  mVBlankInfo.request.sequence = 0;
-  mVBlankInfo.request.signal = 0;
-
-  // setup vblank reply - block and wait for next vblank
-  mVBlankInfo.reply.type = DRM_VBLANK_NEXTONMISS;
-  mVBlankInfo.reply.sequence = 0;
-  mVBlankInfo.reply.tval_sec = 0;
-  mVBlankInfo.reply.tval_usec = 0;
-}
-
-void VSyncMonitor::Terminate()
-{
-}
-
-bool VSyncMonitor::UseHardware()
-{
-  return mUseHardwareVSync && mHardwareVSyncAvailable && (FD_NONE != mFileDescriptor );
-}
-
-
-bool VSyncMonitor::DoSync( unsigned int& frameNumber, unsigned int& seconds, unsigned int& microseconds )
-{
-  DALI_ASSERT_DEBUG( mFileDescriptor != FD_NONE && "Windows::VSyncMonitor is not initialized" );
-  return false;
-}
-
-} // namespace Adaptor
-
-} // namespace Internal
-
-} // namespace Dali
index 474fe1b..2bc22b6 100644 (file)
@@ -68,9 +68,7 @@ bool IsDeviceButton( const char* keyName );
 const char* GetKeyName( Dali::KEY daliKey );
 
 /**
- * @brief Get the key code from a key name.
- * @param[in] keyName The key name
- * @return The key code. -1 if the daliKey does not exist in the supported key lookup table.
+ * @copydoc Dali::DevelKey::GetDaliKeyCode()
  */
 int GetDaliKeyCode( const char* keyName );
 
index 9af492e..accf6f2 100755 (executable)
 // EXTERNAL INCLUDES
 #include <Ecore_Input.h>
 
+#ifdef ECORE_WAYLAND2
+#include <Ecore_Wl2.h>
+#else
+#include <Ecore_Wayland.h>
+#endif
+
 #include <dali/public-api/events/key-event.h>
 #include <dali/public-api/adaptor-framework/key.h>
 #include <dali/public-api/object/type-registry.h>
@@ -269,7 +275,6 @@ InputMethodContextPtr InputMethodContextEcoreWl::New()
     Any nativeWindow = Dali::Adaptor::Get().GetNativeWindowHandle();
 
     // The window needs to use the InputMethodContext.
-    // Only when the render surface is window, we can get the window.
     if( !nativeWindow.Empty() )
     {
       inputMethodContext = new InputMethodContextEcoreWl();
@@ -325,11 +330,15 @@ void InputMethodContextEcoreWl::CreateContext()
     {
       // If we fail to get window id, we can't use the InputMethodContext correctly.
       // Thus you have to call "ecore_imf_context_client_window_set" somewhere.
-      // In EvasPlugIn, this function is called in EvasPlugin::ConnectEcoreEvent().
-      Dali::RenderSurfaceInterface& renderSurface = Dali::Adaptor::Get().GetSurface();
-      WindowRenderSurface& windowRenderSurface = static_cast< WindowRenderSurface& >( renderSurface );
 
-      int windowId = windowRenderSurface.GetNativeWindowId();
+      Any nativeWindowHandle = Dali::Adaptor::Get().GetNativeWindowHandle();
+
+#ifdef ECORE_WAYLAND2
+      int windowId = ecore_wl2_window_id_get( AnyCast< Ecore_Wl2_Window* >( nativeWindowHandle ) );
+#else
+      int windowId = ecore_wl_window_id_get( AnyCast< Ecore_Wl_Window* >( nativeWindowHandle ) );
+#endif
+
       if( windowId != 0 )
       {
         ecore_imf_context_client_window_set( mIMFContext, reinterpret_cast< void* >( windowId ) );
index 806e787..7270a23 100644 (file)
@@ -56,7 +56,6 @@ struct Argument
 
 Argument EXPECTED_ARGS[] =
 {
-  { "no-vsync",    "Disable VSync on Render" },
   { "width",       "Stage Width"             },
   { "height",      "Stage Height"            },
   { "dpi",         "Emulated DPI"            },
@@ -66,8 +65,7 @@ Argument EXPECTED_ARGS[] =
 
 enum Option
 {
-  OPTION_NO_VSYNC = 0,
-  OPTION_STAGE_WIDTH,
+  OPTION_STAGE_WIDTH = 0,
   OPTION_STAGE_HEIGHT,
   OPTION_DPI,
   OPTION_HELP
@@ -89,8 +87,8 @@ void ShowHelp()
 } // unnamed namespace
 
 CommandLineOptions::CommandLineOptions(int32_t *argc, char **argv[])
-: noVSyncOnRender(0),
-  stageWidth(0), stageHeight(0)
+: stageWidth(0),
+  stageHeight(0)
 {
   // Exit gracefully if no arguments provided
   if ( !argc || !argv )
@@ -108,7 +106,6 @@ CommandLineOptions::CommandLineOptions(int32_t *argc, char **argv[])
 
     const struct option options[]=
     {
-      { EXPECTED_ARGS[OPTION_NO_VSYNC].opt,     no_argument,       &noVSyncOnRender, 1   },  // "--no-vsync"
       { EXPECTED_ARGS[OPTION_STAGE_WIDTH].opt,  required_argument, NULL,             'w' },  // "--width"
       { EXPECTED_ARGS[OPTION_STAGE_HEIGHT].opt, required_argument, NULL,             'h' },  // "--height"
       { EXPECTED_ARGS[OPTION_DPI].opt,          required_argument, NULL,             'd' },  // "--dpi"
index 5738159..5277ffd 100644 (file)
@@ -38,7 +38,6 @@ namespace Adaptor
  * The following options are supported:
  *
  * @code
- *     --no-vsync       Disable VSync on Render
  *  -w|--width          Stage Width
  *  -h|--height         Stage Height
  *  -d|--dpi            Emulated DPI
@@ -66,7 +65,6 @@ public:
 
 public: // Command line parsed values
 
-  int32_t noVSyncOnRender; ///< If 1, then the user does not want VSync on Render
   int32_t stageWidth;      ///< The width of the stage required.  0 if not set.
   int32_t stageHeight;     ///< The height of the stage required.   0 if not set.
   std::string stageDPI;    ///< DPI stored as hxv, where h is horizontal DPI and v is vertical DPI
index 9b94bd6..833aa4e 100644 (file)
@@ -7,10 +7,10 @@ adaptor_trace_common_src_files=\
 
 # module: trace, backend: ubuntu
 adaptor_trace_ubuntu_src_files=\
-    ${adaptor_trace_dir}/ubuntu/trace-manager-impl-ubuntu.cpp \
-    ${adaptor_trace_dir}/ubuntu/trace-factory-ubuntu.cpp
+    ${adaptor_trace_dir}/generic/trace-manager-impl-generic.cpp \
+    ${adaptor_trace_dir}/generic/trace-factory-generic.cpp
 
 # module: trace, backend: tizen
 adaptor_trace_tizen_src_files=\
     ${adaptor_trace_dir}/tizen/trace-manager-impl-tizen.cpp \
-    ${adaptor_trace_dir}/tizen/trace-factory-tizen.cpp
\ No newline at end of file
+    ${adaptor_trace_dir}/tizen/trace-factory-tizen.cpp
@@ -16,7 +16,7 @@
  */
 
 #include <dali/internal/trace/common/trace-factory.h>
-#include <dali/internal/trace/ubuntu/trace-manager-impl-ubuntu.h>
+#include <dali/internal/trace/generic/trace-manager-impl-generic.h>
 
 namespace Dali
 {
@@ -16,8 +16,8 @@
  */
 
 // EXTERNAL INCLUDES
-#include <dali/internal/trace/ubuntu/trace-manager-impl-ubuntu.h>
 #include <dali/internal/system/common/performance-interface.h>
+#include "trace-manager-impl-generic.h"
 
 // INTERNAL INCLUDES
 
@@ -31,30 +31,30 @@ namespace Internal
 namespace Adaptor
 {
 
-TraceManagerUbuntu* TraceManagerUbuntu::traceManagerUbuntu = nullptr;
+TraceManagerGeneric* TraceManagerGeneric::traceManagerGeneric = nullptr;
 
-TraceManagerUbuntu::TraceManagerUbuntu( PerformanceInterface* performanceInterface )
+TraceManagerGeneric::TraceManagerGeneric( PerformanceInterface* performanceInterface )
 : TraceManager( performanceInterface )
 {
-  TraceManagerUbuntu::traceManagerUbuntu = this;
+  TraceManagerGeneric::traceManagerGeneric = this;
 }
 
-Dali::Integration::Trace::LogContextFunction TraceManagerUbuntu::GetLogContextFunction()
+Dali::Integration::Trace::LogContextFunction TraceManagerGeneric::GetLogContextFunction()
 {
   return LogContext;
 }
 
-void TraceManagerUbuntu::LogContext( bool start, const char* tag )
+void TraceManagerGeneric::LogContext( bool start, const char* tag )
 {
   if( start )
   {
-    unsigned short contextId = traceManagerUbuntu->mPerformanceInterface->AddContext( tag );
-    traceManagerUbuntu->mPerformanceInterface->AddMarker( PerformanceInterface::START, contextId );
+    unsigned short contextId = traceManagerGeneric->mPerformanceInterface->AddContext( tag );
+    traceManagerGeneric->mPerformanceInterface->AddMarker( PerformanceInterface::START, contextId );
   }
   else
   {
-    unsigned short contextId = traceManagerUbuntu->mPerformanceInterface->AddContext( tag );
-    traceManagerUbuntu->mPerformanceInterface->AddMarker( PerformanceInterface::END, contextId );
+    unsigned short contextId = traceManagerGeneric->mPerformanceInterface->AddContext( tag );
+    traceManagerGeneric->mPerformanceInterface->AddMarker( PerformanceInterface::END, contextId );
   }
 }
 
@@ -33,25 +33,25 @@ namespace Adaptor
 {
 class PerformanceInterface;
 
-class TraceManagerUbuntu : public Dali::Internal::Adaptor::TraceManager
+class TraceManagerGeneric : public Dali::Internal::Adaptor::TraceManager
 {
 public:
   /**
    * Static member to hold TraceManagerUbuntu instance. This allows
    * to access PerformanceInterface for network logging.
    */
-  static TraceManagerUbuntu* traceManagerUbuntu;
+  static TraceManagerGeneric* traceManagerGeneric;
 
   /**
    * Explicit Constructor
    */
-  explicit TraceManagerUbuntu( PerformanceInterface* performanceInterface );
+  explicit TraceManagerGeneric( PerformanceInterface* performanceInterface );
 
 protected:
   /**
    * Destructor
    */
-  ~TraceManagerUbuntu() override = default;
+  ~TraceManagerGeneric() override = default;
 
   /**
    * Obtain the LogContextFunction method (Ubuntu specific) used for tracing
index 38a44b4..dd35dcb 100644 (file)
@@ -195,6 +195,16 @@ bool NativeRenderSurfaceEcoreWl::ReplaceGraphicsSurface()
 
 void NativeRenderSurfaceEcoreWl::MoveResize( Dali::PositionSize positionSize )
 {
+  tbm_surface_queue_error_e error = TBM_SURFACE_QUEUE_ERROR_NONE;
+
+  error = tbm_surface_queue_reset( mTbmQueue, positionSize.width, positionSize.height, mTbmFormat );
+
+  if( error != TBM_SURFACE_QUEUE_ERROR_NONE )
+  {
+    DALI_LOG_ERROR( "Failed to resize tbm_surface_queue" );
+  }
+
+  mPosition = positionSize;
 }
 
 void NativeRenderSurfaceEcoreWl::StartRender()
index 676d658..8aa2318 100644 (file)
@@ -37,6 +37,8 @@ Application Application::New( int* argc, char **argv[] )
   Internal::Adaptor::ApplicationPtr internal = Internal::Adaptor::Application::GetPreInitializedApplication();
   if( internal )
   {
+    // pre-initialized application
+    internal->SetCommandLineOptions( argc, argv );
     if( argc && ( *argc > 0 ) )
     {
       internal->GetWindow().SetClass( (*argv)[0], "" );
@@ -57,6 +59,8 @@ Application Application::New( int* argc, char **argv[], const std::string& style
   Internal::Adaptor::ApplicationPtr internal = Internal::Adaptor::Application::GetPreInitializedApplication();
   if( internal )
   {
+    // pre-initialized application
+    internal->SetCommandLineOptions( argc, argv );
     if( argc && ( *argc > 0 ) )
     {
       internal->GetWindow().SetClass( (*argv)[0], "" );
@@ -78,6 +82,8 @@ Application Application::New( int* argc, char **argv[], const std::string& style
   Internal::Adaptor::ApplicationPtr internal = Internal::Adaptor::Application::GetPreInitializedApplication();
   if( internal )
   {
+    // pre-initialized application
+    internal->SetCommandLineOptions( argc, argv );
     if( argc && ( *argc > 0 ) )
     {
       internal->GetWindow().SetClass( (*argv)[0], "" );
@@ -101,6 +107,8 @@ Application Application::New( int* argc, char **argv[], const std::string& style
   Internal::Adaptor::ApplicationPtr internal = Internal::Adaptor::Application::GetPreInitializedApplication();
   if( internal )
   {
+    // pre-initialized application
+    internal->SetCommandLineOptions( argc, argv );
     if( argc && ( *argc > 0 ) )
     {
       internal->GetWindow().SetClass( (*argv)[0], "" );
index b5a0666..38dec63 100644 (file)
@@ -93,7 +93,6 @@ class Application;
  * This class accepts command line arguments as well. The following options are supported:
  *
  * @code
- *     --no-vsync       Disable VSync on Render
  *  -w|--width          Stage Width
  *  -h|--height         Stage Height
  *  -d|--dpi            Emulated DPI
index 2e6a28c..07ff286 100644 (file)
@@ -37,7 +37,7 @@ Window Window::New(PositionSize posSize, const std::string& name, bool isTranspa
 
   Dali::Adaptor& adaptor = Internal::Adaptor::Adaptor::Get();
   Integration::SceneHolder sceneHolder = Integration::SceneHolder( window );
-  Internal::Adaptor::Adaptor::GetImplementation( adaptor ).AddWindow( &sceneHolder, name, "", isTransparent );
+  Internal::Adaptor::Adaptor::GetImplementation( adaptor ).AddWindow( sceneHolder, name, "", isTransparent );
 
   return Window(window);
 }
@@ -48,7 +48,7 @@ Window Window::New(PositionSize posSize, const std::string& name, const std::str
 
   Dali::Adaptor& adaptor = Internal::Adaptor::Adaptor::Get();
   Integration::SceneHolder sceneHolder = Integration::SceneHolder( window );
-  Internal::Adaptor::Adaptor::GetImplementation( adaptor ).AddWindow( &sceneHolder, name, className, isTransparent );
+  Internal::Adaptor::Adaptor::GetImplementation( adaptor ).AddWindow( sceneHolder, name, className, isTransparent );
 
   return Window(window);
 }
index 4afbdb0..05fea4c 100644 (file)
@@ -28,7 +28,7 @@ namespace Dali
 
 const unsigned int ADAPTOR_MAJOR_VERSION = 1;
 const unsigned int ADAPTOR_MINOR_VERSION = 4;
-const unsigned int ADAPTOR_MICRO_VERSION = 25;
+const unsigned int ADAPTOR_MICRO_VERSION = 26;
 const char * const ADAPTOR_BUILD_DATE    = __DATE__ " " __TIME__;
 
 #ifdef DEBUG_ENABLED
index 465c29f..5ba8bb3 100644 (file)
@@ -17,7 +17,7 @@
 
 Name:       dali-adaptor
 Summary:    The DALi Tizen Adaptor
-Version:    1.4.25
+Version:    1.4.26
 Release:    1
 Group:      System/Libraries
 License:    Apache-2.0 and BSD-3-Clause and MIT