Memory Pool Logging
[platform/core/uifw/dali-adaptor.git] / dali / internal / graphics / common / graphics-interface.h
index e61a2ac..53fa462 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_BASE_GRAPHICS_INTERFACE_H
 
 /*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 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.
@@ -86,6 +86,20 @@ public:
   virtual void ActivateResourceContext() = 0;
 
   /**
+   * Activate the surface context
+   *
+   * @param[in] surface The surface whose context to be switched to.
+   */
+  virtual void ActivateSurfaceContext(Dali::RenderSurfaceInterface* surface) = 0;
+
+  /**
+   * Inform graphics interface that all the surfaces have been rendered.
+   *
+   * @note This should not be called if uploading resource only without rendering any surface.
+   */
+  virtual void PostRender() = 0;
+
+  /**
    * Inform graphics interface that this is the first frame after a resume.
    */
   virtual void SetFirstFrameAfterResume() = 0;
@@ -133,6 +147,11 @@ public:
   virtual bool IsAdvancedBlendEquationSupported() = 0;
 
   /**
+   * @return true if multisampled render to texture is supported
+   */
+  virtual bool IsMultisampledRenderToTextureSupported() = 0;
+
+  /**
    * @return true if graphics subsystem is initialized
    */
   virtual bool IsInitialized() = 0;
@@ -148,6 +167,11 @@ public:
   virtual uint32_t GetMaxTextureSize() = 0;
 
   /**
+   * @return the maximum texture samples when we use multisampled texture
+   */
+  virtual uint8_t GetMaxTextureSamples() = 0;
+
+  /**
    * @return the version number of the shader language
    */
   virtual uint32_t GetShaderLanguageVersion() = 0;
@@ -157,6 +181,16 @@ public:
    */
   virtual void CacheConfigurations(ConfigurationManager& configurationManager) = 0;
 
+  /**
+   * Initialize data for logging frame info
+   */
+  virtual void FrameStart() = 0;
+
+  /**
+   * Log total capacity of memory pools during this frame
+   */
+  virtual void LogMemoryPools() = 0;
+
 protected:
   Integration::DepthBufferAvailable   mDepthBufferRequired;   ///< Whether the depth buffer is required
   Integration::StencilBufferAvailable mStencilBufferRequired; ///< Whether the stencil buffer is required