X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fvisuals%2Fimage-visual-shader-factory.h;h=604b49b5400c882243eeb4582ea7c0474b703617;hp=58b4dd07bee42d423c445d9503ea2d41b93453da;hb=6ae6f36998b3be4efa1114e2df856e51628bf812;hpb=66adf16a82bd15f4472d951b5e8a96ae297bbe41 diff --git a/dali-toolkit/internal/visuals/image-visual-shader-factory.h b/dali-toolkit/internal/visuals/image-visual-shader-factory.h index 58b4dd0..604b49b 100644 --- a/dali-toolkit/internal/visuals/image-visual-shader-factory.h +++ b/dali-toolkit/internal/visuals/image-visual-shader-factory.h @@ -2,7 +2,7 @@ #define DALI_TOOLKIT_IMAGE_VISUAL_SHADER_FACTORY_H /* - * Copyright (c) 2018 Samsung Electronics Co., Ltd. + * Copyright (c) 2021 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. @@ -21,15 +21,49 @@ // INTERNAL INCLUDES #include +#include namespace Dali { - namespace Toolkit { - namespace Internal { +/** + * @brief Whether use texture with atlas, or not + */ +enum class TextureAtlas +{ + DISABLED = 0, ///< Image visual use ATLAS + ENABLED ///< Image visual doesn't use ATLAS +}; + +/** + * @brief Whether apply to texture wraping in default, or not + */ +enum class DefaultTextureWrapMode +{ + DO_NOT_APPLY = 0, ///< Image visual doesn't apply to wraping texture in default + APPLY ///< Image visual apply to wraping texture in default +}; + +/** + * @brief Whether use rounded corner, or not + */ +enum class RoundedCorner +{ + DISABLED = 0, ///< Image visual doesn't use rounded corner + ENABLED ///< Image visual use rounded corner +}; + +/** + * @brief Whether use borderline, or not + */ +enum class Borderline +{ + DISABLED = 0, ///< Image visual doesn't use borderline + ENABLED ///< Image visual use borderline +}; /** * ImageVisualShaderFactory is an object that provides and shares shaders between image visuals @@ -38,8 +72,6 @@ class ImageVisualShaderFactory { public: -public: - /** * @brief Constructor */ @@ -55,23 +87,24 @@ public: * @param[in] factoryCache A pointer pointing to the VisualFactoryCache object * @param[in] atlasing Whether texture atlasing is applied. * @param[in] defaultTextureWrapping Whether the default texture wrap mode is applied. + * @param[in] roundedCorner Whether the rounded corder is applied. + * @param[in] borderline Whether the borderline of visual is applied. */ - Shader GetShader( VisualFactoryCache& factoryCache, bool atlasing, bool defaultTextureWrapping ); + Shader GetShader(VisualFactoryCache& factoryCache, TextureAtlas atlasing, DefaultTextureWrapMode defaultTextureWrapping, RoundedCorner roundedCorner, Borderline borderline); /** * Request the default vertex shader source. * @return The default vertex shader source. */ - const char* GetVertexShaderSource(); + std::string_view GetVertexShaderSource(); /** * Request the default fragment shader source. * @return The default fragment shader source. */ - const char* GetFragmentShaderSource(); + std::string_view GetFragmentShaderSource(); protected: - /** * Undefined copy constructor. */