[dali_2.3.22] Merge branch 'devel/master'
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / visuals / visual-factory-cache.h
index f1d9703..1b3f098 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_VISUAL_FACTORY_CACHE_H
 
 /*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 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.
@@ -19,6 +19,7 @@
 
 // EXTERNAL INCLUDES
 #include <dali/devel-api/common/owner-container.h>
+#include <dali/integration-api/adaptor-framework/shader-precompiler.h>
 #include <dali/public-api/math/uint-16-pair.h>
 #include <dali/public-api/object/ref-object.h>
 #include <dali/public-api/rendering/geometry.h>
@@ -105,6 +106,8 @@ public:
     NATIVE_IMAGE_SHADER_ROUNDED_CORNER_MASKING,
     NATIVE_IMAGE_SHADER_BORDERLINE_MASKING,
     NATIVE_IMAGE_SHADER_ROUNDED_BORDERLINE_MASKING,
+    NATIVE_IMAGE_SHADER_ATLAS_DEFAULT_WRAP,
+    NATIVE_IMAGE_SHADER_ATLAS_CUSTOM_WRAP,
     NINE_PATCH_SHADER,
     NINE_PATCH_MASK_SHADER,
     TEXT_SHADER_SINGLE_COLOR_TEXT,
@@ -183,11 +186,13 @@ public:
   Shader GetShader(ShaderType type);
 
   /**
-   * Cache the geometry of the give type.
-   * @param[in] type The geometry type.
-   * @param[in] geometry The geometry for caching.
+   * Generate and cache the shader of the give type. The name of shader will be installed to shader.
+   * @param[in] type The shder type.
+   * @param[in] vertexShader The vertex shader code.
+   * @param[in] fragmentShader The fragment shader code.
+   * @return The shader created by given vertex and fragment shader code.
    */
-  void SaveShader(ShaderType type, Shader shader);
+  Shader GenerateAndSaveShader(ShaderType type, std::string_view vertexShader, std::string_view fragmentShader);
 
   /*
    * Greate the quad geometry.