Merge "[AT-SPI] Add Table and TableCell interfaces" into devel/master
authorSeoyeon Kim <seoyeon2.kim@samsung.com>
Wed, 31 May 2023 07:18:43 +0000 (07:18 +0000)
committerGerrit Code Review <gerrit@review>
Wed, 31 May 2023 07:18:43 +0000 (07:18 +0000)
automated-tests/src/dali-adaptor/dali-test-suite-utils/test-application.cpp
automated-tests/src/dali-adaptor/dali-test-suite-utils/test-application.h
dali/internal/graphics/gles-impl/gles-graphics-program.cpp
dali/internal/graphics/gles-impl/gles-graphics-types.h
dali/internal/window-system/common/window-impl.cpp
dali/internal/window-system/common/window-impl.h
dali/public-api/adaptor-framework/window.cpp
dali/public-api/adaptor-framework/window.h

index a8354e8..47487e2 100644 (file)
@@ -85,6 +85,8 @@ void TestApplication::CreateScene()
   rtInfo.SetSurface(&mSurfaceWidth); // Can point to anything, really.
 
   mScene.SetSurfaceRenderTarget(rtInfo);
+
+  mScenes.push_back(mScene);
 }
 
 void TestApplication::InitializeCore()
@@ -212,8 +214,11 @@ bool TestApplication::Render(uint32_t intervalMilliseconds, const char* location
   mCore->PreRender(mRenderStatus, false /*do not force clear*/);
   if(!uploadOnly)
   {
-    mCore->RenderScene(mRenderStatus, mScene, true /*render the off-screen buffers*/);
-    mCore->RenderScene(mRenderStatus, mScene, false /*render the surface*/);
+    for(auto&& scene : mScenes)
+    {
+      mCore->RenderScene(mRenderStatus, scene, true /*render the off-screen buffers*/);
+      mCore->RenderScene(mRenderStatus, scene, false /*render the surface*/);
+    }
   }
   mCore->PostRender();
 
@@ -243,6 +248,36 @@ bool TestApplication::RenderWithPartialUpdate(std::vector<Rect<int>>& damagedRec
   return mStatus.KeepUpdating() || mRenderStatus.NeedsUpdate();
 }
 
+bool TestApplication::RenderWithPartialUpdate(uint32_t intervalMilliseconds, const char* location)
+{
+  DoUpdate(intervalMilliseconds, location);
+
+  // Reset the status
+  mRenderStatus.SetNeedsUpdate(false);
+  mRenderStatus.SetNeedsPostRender(false);
+
+  mCore->PreRender(mRenderStatus, false /*do not force clear*/);
+
+  for(auto&& scene : mScenes)
+  {
+    std::vector<Rect<int>> damagedRects;
+    Rect<int>              clippingRect{};
+
+    mCore->PreRender(scene, damagedRects);
+    mCore->RenderScene(mRenderStatus, scene, true /*render the off-screen buffers*/);
+    for(auto&& iter : damagedRects)
+    {
+      clippingRect.Merge(iter);
+    }
+    mCore->RenderScene(mRenderStatus, scene, false /*render the surface*/, clippingRect);
+  }
+  mCore->PostRender();
+
+  mFrame++;
+
+  return mStatus.KeepUpdating() || mRenderStatus.NeedsUpdate();
+}
+
 uint32_t TestApplication::GetUpdateStatus()
 {
   return mStatus.KeepUpdating();
@@ -297,4 +332,14 @@ uint32_t TestApplication::Wait(uint32_t durationToWait)
   return time;
 }
 
+void TestApplication::AddScene(Integration::Scene scene)
+{
+  mScenes.push_back(scene);
+}
+
+void TestApplication::RemoveScene(Integration::Scene scene)
+{
+  mScenes.erase(std::remove(mScenes.begin(), mScenes.end(), scene), mScenes.end());
+}
+
 } // namespace Dali
index ce0e151..5e86b3c 100644 (file)
@@ -75,6 +75,7 @@ public:
   bool        Render(uint32_t intervalMilliseconds = DEFAULT_RENDER_INTERVAL, const char* location = NULL, bool uploadOnly = false);
   bool        PreRenderWithPartialUpdate(uint32_t intervalMilliseconds, const char* location, std::vector<Rect<int>>& damagedRects);
   bool        RenderWithPartialUpdate(std::vector<Rect<int>>& damagedRects, Rect<int>& clippingRect);
+  bool        RenderWithPartialUpdate(uint32_t intervalMilliseconds, const char* location = NULL);
   uint32_t    GetUpdateStatus();
   bool        UpdateOnly(uint32_t intervalMilliseconds = DEFAULT_RENDER_INTERVAL);
   bool        RenderOnly();
@@ -92,6 +93,9 @@ public:
     return mScene;
   }
 
+  void AddScene(Integration::Scene scene);
+  void RemoveScene(Integration::Scene scene);
+
 private:
   void DoUpdate(uint32_t intervalMilliseconds, const char* location = NULL, bool uploadOnly = false);
 
@@ -103,8 +107,9 @@ protected:
   Integration::UpdateStatus mStatus;
   Integration::RenderStatus mRenderStatus;
 
-  Integration::Core*       mCore;
-  Dali::Integration::Scene mScene;
+  Integration::Core*              mCore;
+  Dali::Integration::Scene        mScene;
+  std::vector<Integration::Scene> mScenes;
 
   uint32_t mSurfaceWidth;
   uint32_t mSurfaceHeight;
index 6fa3d8f..8fa051c 100644 (file)
@@ -323,6 +323,12 @@ void ProgramImpl::BuildStandaloneUniformCache()
         mImpl->uniformSetters[index].type         = UniformSetter::Type::INT;
         break;
       }
+      case GLType::INT:
+      {
+        mImpl->uniformSetters[index].uniformiProc = &GlAbstraction::Uniform1iv;
+        mImpl->uniformSetters[index].type         = UniformSetter::Type::INT;
+        break;
+      }
       case GLType::BOOL:
       case GLType::BOOL_VEC2:
       case GLType::BOOL_VEC3:
index 548d217..6541de3 100644 (file)
@@ -1715,6 +1715,11 @@ struct GLTypeConversion
         type = GLType::FLOAT;
         break;
       }
+      case GL_INT:
+      {
+        type = GLType::INT;
+        break;
+      }
       default:
       {
         type = GLType::UNDEFINED;
index 9d6fcee..f1c4ac9 100644 (file)
@@ -331,6 +331,11 @@ Dali::RenderTaskList Window::GetRenderTaskList() const
   return mScene.GetRenderTaskList();
 }
 
+void Window::KeepRendering(float durationSeconds)
+{
+  mScene.KeepRendering(durationSeconds);
+}
+
 std::string Window::GetNativeResourceId() const
 {
   return mWindowBase->GetNativeWindowResourceId();
index 849e540..407e966 100644 (file)
@@ -165,11 +165,16 @@ public:
   Dali::Layer GetLayer(uint32_t depth) const;
 
   /**
-   * @copydoc Dali::DevelWindow::GetRenderTaskList()
+   * @copydoc Dali::Window::GetRenderTaskList()
    */
   Dali::RenderTaskList GetRenderTaskList() const;
 
   /**
+   * @copydoc Dali::Window::KeepRendering()
+   */
+  void KeepRendering(float durationSeconds);
+
+  /**
    * @brief Get window resource ID assigned by window manager
    * @return The resource ID of the window
    */
@@ -816,10 +821,10 @@ private:
   std::vector<int> mAvailableAngles;
   int              mPreferredAngle;
 
-  int mRotationAngle;               ///< The angle of the rotation
-  int mWindowWidth;                 ///< The width of the window
-  int mWindowHeight;                ///< The height of the window
-  int mNativeWindowId;              ///< The Native Window Id
+  int mRotationAngle;  ///< The angle of the rotation
+  int mWindowWidth;    ///< The width of the window
+  int mWindowHeight;   ///< The height of the window
+  int mNativeWindowId; ///< The Native Window Id
 
   EventHandlerPtr mEventHandler;    ///< The window events handler
   OrientationMode mOrientationMode; ///< The physical screen mode is portrait or landscape
index 4e834a6..0e23346 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 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.
@@ -338,6 +338,11 @@ Dali::RenderTaskList Window::GetRenderTaskList()
   return GetImplementation(*this).GetRenderTaskList();
 }
 
+void Window::KeepRendering(float durationSeconds)
+{
+  GetImplementation(*this).KeepRendering(durationSeconds);
+}
+
 Window::KeyEventSignalType& Window::KeyEventSignal()
 {
   return GetImplementation(*this).KeyEventSignal();
index 1d1f8a8..c66abe4 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_WINDOW_H
 
 /*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 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.
@@ -580,6 +580,17 @@ public:
    */
   RenderTaskList GetRenderTaskList();
 
+  /**
+   * @brief Keep rendering for at least the given amount of time.
+   *
+   * By default, Dali will stop rendering when no Actor positions are being set, and when no animations are running etc.
+   * This method is useful to force screen refreshes.
+   *
+   * @SINCE_2_2.29
+   * @param[in] durationSeconds Time to keep rendering, 0 means render at least one more frame
+   */
+  void KeepRendering(float durationSeconds);
+
 public: // Signals
   /**
    * @brief The user should connect to this signal to get a timing when window gains focus or loses focus.