X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Frender%2Fdata-providers%2Frender-data-provider.h;h=478718e66eee82cd454f77a4632a199899561239;hb=0643c768fd100bd7ffb522e3358b88d075bc1d2e;hp=cf3aeb6171f00328cfaccd76ced28967709f06b6;hpb=6e611d3be935ab4de2f4cfecc5082295260b6a30;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 index cf3aeb6..478718e 100644 --- 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,17 +18,22 @@ * */ -#include -#include +#include +#include #include -#include #include #include +#include +#include +#include namespace Dali { namespace Internal { + +struct BlendingOptions; + namespace SceneGraph { class PropertyBuffer; @@ -40,21 +45,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 +67,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,25 +90,33 @@ 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 RendererAttachment access to our private data to reduce copying vectors on construction. - friend class RendererAttachment; + 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; }; } // SceneGraph