projects
/
platform
/
core
/
uifw
/
dali-toolkit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[dali_2.3.1] Merge branch 'devel/master'
[platform/core/uifw/dali-toolkit.git]
/
dali-toolkit
/
internal
/
visuals
/
visual-factory-impl.h
diff --git
a/dali-toolkit/internal/visuals/visual-factory-impl.h
b/dali-toolkit/internal/visuals/visual-factory-impl.h
index
1e5ac93
..
76bacf9
100644
(file)
--- a/
dali-toolkit/internal/visuals/visual-factory-impl.h
+++ b/
dali-toolkit/internal/visuals/visual-factory-impl.h
@@
-18,7
+18,9
@@
*/
// EXTERNAL INCLUDES
*/
// EXTERNAL INCLUDES
+#include <dali/public-api/common/vector-wrapper.h>
#include <dali/public-api/object/base-object.h>
#include <dali/public-api/object/base-object.h>
+#include <dali/integration-api/adaptor-framework/shader-precompiler.h>
// INTERNAL INCLUDES
#include <dali-toolkit/devel-api/visual-factory/visual-base.h>
// INTERNAL INCLUDES
#include <dali-toolkit/devel-api/visual-factory/visual-base.h>
@@
-85,6
+87,16
@@
public:
bool GetPreMultiplyOnLoad() const;
/**
bool GetPreMultiplyOnLoad() const;
/**
+ * @copydoc Toolkit::VisualFactory::DiscardVisual()
+ */
+ void DiscardVisual(Toolkit::Visual::Base visual);
+
+ /**
+ * @copydoc Toolkit::VisualFactory::UsePreCompiledShader()
+ */
+ void UsePreCompiledShader();
+
+ /**
* @return the reference to texture manager
*/
Internal::TextureManager& GetTextureManager();
* @return the reference to texture manager
*/
Internal::TextureManager& GetTextureManager();
@@
-103,6
+115,12
@@
private:
void SetBrokenImageUrl(Toolkit::StyleManager& styleManager);
/**
void SetBrokenImageUrl(Toolkit::StyleManager& styleManager);
/**
+ * @brief Get the default shader source.
+ * @param[in] shaders shaderList for precompile
+ */
+ void GetPreCompiledShader(RawShaderData& shaders);
+
+ /**
* Get the factory cache, creating it if necessary.
*/
Internal::VisualFactoryCache& GetFactoryCache();
* Get the factory cache, creating it if necessary.
*/
Internal::VisualFactoryCache& GetFactoryCache();
@@
-117,6
+135,16
@@
private:
*/
TextVisualShaderFactory& GetTextVisualShaderFactory();
*/
TextVisualShaderFactory& GetTextVisualShaderFactory();
+ /**
+ * @brief Callbacks called for clear discarded visuals.
+ */
+ void OnDiscardCallback();
+
+ /**
+ * @brief Register idle callback for discard visuals if need.
+ */
+ void RegisterDiscardCallback();
+
VisualFactory(const VisualFactory&) = delete;
VisualFactory& operator=(const VisualFactory& rhs) = delete;
VisualFactory(const VisualFactory&) = delete;
VisualFactory& operator=(const VisualFactory& rhs) = delete;
@@
-126,8
+154,12
@@
private:
std::unique_ptr<ImageVisualShaderFactory> mImageVisualShaderFactory;
std::unique_ptr<TextVisualShaderFactory> mTextVisualShaderFactory;
SlotDelegate<VisualFactory> mSlotDelegate;
std::unique_ptr<ImageVisualShaderFactory> mImageVisualShaderFactory;
std::unique_ptr<TextVisualShaderFactory> mTextVisualShaderFactory;
SlotDelegate<VisualFactory> mSlotDelegate;
+ CallbackBase* mIdleCallback;
+ using DiscardedVisualContainer = std::vector<Toolkit::Visual::Base>;
+ DiscardedVisualContainer mDiscardedVisuals{};
bool mDebugEnabled : 1;
bool mPreMultiplyOnLoad : 1; ///< Local store for this flag
bool mDebugEnabled : 1;
bool mPreMultiplyOnLoad : 1; ///< Local store for this flag
+ bool mPrecompiledShaderRequested : 1;
};
/**
};
/**