X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Frender%2Fdata-providers%2Frender-data-provider.h;h=aae42628a7de1fa38b07d930220d613537b24437;hb=4d75040ab200bd306ec5a48f2a617480062eef4c;hp=512e0c7fdac77b1bac857e39c0aba50185d04a17;hpb=dd4bc34bdeb8d96806a4683367d08af4f98fbb51;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/internal/render/data-providers/render-data-provider.h b/dali/internal/render/data-providers/render-data-provider.h old mode 100644 new mode 100755 index 512e0c7..aae4262 --- a/dali/internal/render/data-providers/render-data-provider.h +++ b/dali/internal/render/data-providers/render-data-provider.h @@ -2,7 +2,7 @@ #define __DALI_INTERNAL_SCENE_GRAPH_RENDER_DATA_PROVIDER_H__ /* - * Copyright (c) 2015 Samsung Electronics Co., Ltd. + * Copyright (c) 2018 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. @@ -18,21 +18,27 @@ * */ -#include -#include +#include +#include #include -#include #include #include +#include +#include +#include namespace Dali { namespace Internal { + +struct BlendingOptions; + namespace SceneGraph { class PropertyBuffer; class Shader; +class Renderer; /** * Wraps all the data providers for the renderer. This allows the @@ -40,21 +46,19 @@ class Shader; * the current render. It essentially provides double buffering of the * provider accessor through the message system. It does not take ownership * of any objects. - * - * @todo - Add set of bools to state what changed (For improving performance) */ class RenderDataProvider { public: typedef Dali::Vector< const PropertyBufferDataProvider* > VertexBuffers; - typedef Dali::Vector< const SamplerDataProvider* > Samplers; + typedef std::vector< Render::Sampler* > Samplers; /** * Constructor. * The RendererAttachment that creates this object will initialize the members * directly. */ - RenderDataProvider(); + RenderDataProvider( AnimatableProperty< float >& opacity ); /** * Destructor @@ -64,18 +68,6 @@ public: public: /** - * Set the material data provider - * @param[in] materialDataProvider The material data provider - */ - void SetMaterial( const MaterialDataProvider& materialDataProvider ); - - /** - * Get the material data provider - * @return the material data provider - */ - const MaterialDataProvider& GetMaterial() const; - - /** * Set the uniform map data provider * @param[in] uniformMapDataProvider The uniform map data provider */ @@ -99,24 +91,32 @@ public: Shader& GetShader() const; /** - * Set the sampler data providers - * @param[in] samplers The sampler data providers + * Returns the list of samplers + * @return The list of samplers */ - void SetSamplers( const Samplers& samplers ); + Samplers& GetSamplers(); /** - * Returns the list of sampler data providers - * @return The list of samplers + * Returns the list of Textures + * @return The list of Textures */ - const Samplers& GetSamplers() const; + std::vector& GetTextures(); + + /** + * Get the opacity + * @return The opacity + */ + float GetOpacity( BufferIndex bufferIndex ); private: - const MaterialDataProvider* mMaterialDataProvider; - const UniformMapDataProvider* mUniformMapDataProvider; - Shader* mShader; - Samplers mSamplers; -// Give Renderer access to our private data to reduce copying vectors on construction. + const UniformMapDataProvider* mUniformMapDataProvider; + Shader* mShader; + std::vector mTextures; + Samplers mSamplers; + AnimatableProperty< float >& mOpacity; + + // Give Renderer access to our private data to reduce copying vectors on construction. friend class Renderer; };