[Tizen] Support MultiSampling FrameBuffer
[platform/core/uifw/dali-adaptor.git] / dali / internal / graphics / gles / egl-graphics.h
index 68e2ab3..48dd0b7 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_BASE_GRAPHICS_IMPLEMENTATION_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.
@@ -22,8 +22,8 @@
 #include <dali/integration-api/adaptor-framework/egl-interface.h>
 #include <dali/internal/graphics/common/egl-image-extensions.h>
 #include <dali/internal/graphics/common/graphics-interface.h>
+#include <dali/internal/graphics/gles-impl/egl-graphics-controller.h>
 #include <dali/internal/graphics/gles/egl-context-helper-implementation.h>
-#include <dali/internal/graphics/gles/egl-graphics-controller.h>
 #include <dali/internal/graphics/gles/egl-implementation.h>
 #include <dali/internal/graphics/gles/egl-sync-implementation.h>
 #include <dali/internal/graphics/gles/gl-implementation.h>
@@ -84,6 +84,20 @@ public:
   void ActivateResourceContext() override;
 
   /**
+   * Activate the surface context
+   *
+   * @param[in] surface The surface whose context to be switched to.
+   */
+  void ActivateSurfaceContext(Dali::RenderSurfaceInterface* surface) override;
+
+  /**
+   * This is called after all the surfaces have been rendered.
+   *
+   * @note This should not be called if uploading resource only without rendering any surface.
+   */
+  void PostRender() override;
+
+  /**
    * Inform graphics interface that this is the first frame after a resume.
    * (For debug only)
    */
@@ -157,17 +171,22 @@ public:
     return mGLES->IsAdvancedBlendEquationSupported();
   }
 
+  bool IsMultisampledRenderToTextureSupported() override
+  {
+    return mGLES->IsMultisampledRenderToTextureSupported();
+  }
+
   /**
    * @return true if graphics subsystem is initialized
    */
   bool IsInitialized() override
   {
-    return mEglImplementation->IsGlesInitialized();
+    return mEglImplementation && mEglImplementation->IsGlesInitialized();
   }
 
   bool IsResourceContextSupported() override
   {
-    return mEglImplementation->IsSurfacelessContextSupported();
+    return mEglImplementation && mEglImplementation->IsSurfacelessContextSupported();
   }
 
   uint32_t GetMaxTextureSize() override
@@ -175,11 +194,21 @@ public:
     return mGLES->GetMaxTextureSize();
   }
 
+  uint8_t GetMaxTextureSamples() override
+  {
+    return mGLES->GetMaxTextureSamples();
+  }
+
   uint32_t GetShaderLanguageVersion() override
   {
     return mGLES->GetShadingLanguageVersion();
   }
 
+  bool ApplyNativeFragmentShader(std::string& shader, const char* customSamplerType)
+  {
+    return mGLES->ApplyNativeFragmentShader(shader, customSamplerType);
+  }
+
   void CacheConfigurations(ConfigurationManager& configurationManager) override;
 
 private: