Dali::Graphics::BufferFactory::PointerType GraphicsBufferFactory::Create() const
{
auto buffer = std::make_unique< GraphicsBuffer >( mController, mUsageFlags, mSize );
- return std::move(buffer);
+ return buffer;
}
} // Test
Dali::Graphics::FramebufferFactory::PointerType GraphicsFramebufferFactory::Create() const
{
auto fb = std::make_unique<Test::GraphicsFramebuffer>( mController, mSize, mColorAttachments, mDepthAttachment );
- return std::move(fb);
+ return fb;
}
void GraphicsFramebufferFactory::TestReset()
$(internal_src_dir)/update/render-tasks/scene-graph-camera.cpp \
$(internal_src_dir)/update/render-tasks/scene-graph-render-task.cpp \
$(internal_src_dir)/update/render-tasks/scene-graph-render-task-list.cpp \
- $(internal_src_dir)/update/rendering/data-providers/render-data-provider.cpp \
$(internal_src_dir)/update/rendering/render-instruction-container.cpp \
$(internal_src_dir)/update/rendering/render-instruction.cpp \
$(internal_src_dir)/update/rendering/render-item.cpp \
#include <dali/internal/update/manager/transform-manager.h>
#include <dali/internal/update/manager/transform-manager-property.h>
#include <dali/internal/update/nodes/node-declarations.h>
-#include <dali/internal/update/rendering/data-providers/node-data-provider.h>
-
-//#include <dali/internal/update/rendering/scene-graph-renderer.h>
namespace Dali
+++ /dev/null
-#ifndef __DALI_INTERNAL_SCENE_GRAPH_NODE_DATA_PROVIDER_H__
-#define __DALI_INTERNAL_SCENE_GRAPH_NODE_DATA_PROVIDER_H__
-
-/*
- * 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#include <dali/internal/update/rendering/data-providers/uniform-map-data-provider.h>
-
-namespace Dali
-{
-struct Vector4;
-class Matrix;
-
-namespace Internal
-{
-namespace SceneGraph
-{
-
-/**
- * An interface to provide data for a Renderer
- */
-class NodeDataProvider : UniformMapDataProvider
-{
-public:
-
- /**
- * Constructor. Nothing to do as a pure interface.
- */
- NodeDataProvider() { }
-
- /**
- * @param bufferIndex to use
- * @return a reference to the model matrix
- */
- virtual const Matrix& GetModelMatrix( BufferIndex bufferIndex ) const = 0;
-
- /**
- * @param bufferIndex to use
- * @return a reference to the color
- */
- virtual const Vector4& GetRenderColor( BufferIndex bufferIndex ) const = 0;
-
- /**
- * @copydoc Dali::Internal::SceneGraph::UniformMapDataProvider::GetUniformMapChanged()
- */
- virtual bool GetUniformMapChanged( BufferIndex bufferIndex ) const = 0;
-
- /**
- * @copydoc Dali::Internal::SceneGraph::UniformMapDataProvider::GetUniformMap()
- */
- virtual const CollectedUniformMap& GetUniformMap( BufferIndex bufferIndex ) const = 0;
-
-protected:
- /**
- * Virtual destructor, this is an interface, no deletion through this interface
- */
- virtual ~NodeDataProvider() { }
-};
-
-} // SceneGraph
-} // Internal
-} // Dali
-
-#endif // __DALI_INTERNAL_SCENE_GRAPH_NODE_DATA_PROVIDER_H__
+++ /dev/null
-#ifndef DALI_INTERNAL_SCENE_GRAPH_PROPERTY_BUFFER_DATA_PROVIDER_H
-#define DALI_INTERNAL_SCENE_GRAPH_PROPERTY_BUFFER_DATA_PROVIDER_H
-
-/*
- * 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// EXTERNAL INCLUDES
-#include <string>
-
-// INTERNAL INCLUDES
-#include <dali/public-api/object/property.h>
-#include <dali/internal/common/buffer-index.h>
-
-namespace Dali
-{
-namespace Internal
-{
-namespace SceneGraph
-{
-
-class PropertyBufferDataProvider
-{
-public:
-
- /**
- * Type for the data contained in the buffer
- */
- typedef Dali::Vector< char > BufferType;
-
-public:
- /**
- * Constructor
- */
- PropertyBufferDataProvider()
- {
- }
-
- /**
- * Get the number of attributes
- * @param[in] bufferIndex Index to access double buffered values
- * @return the number of attributes
- */
- virtual unsigned int GetAttributeCount( BufferIndex bufferIndex ) const = 0;
-
- /**
- * Get the name of an attribute
- * @param[in] bufferIndex Index to access double buffered values
- * @param[in] index Index of the attribute
- * @return the name of the attribute
- */
- virtual const std::string& GetAttributeName( BufferIndex bufferIndex, unsigned int index ) const = 0;
-
- /**
- * Get the byte size of an attribute
- * @param[in] bufferIndex Index to access double buffered values
- * @param[in] index Index of the attribute
- * @return the byte size of the attribute
- */
- virtual size_t GetAttributeSize( BufferIndex bufferIndex, unsigned int index ) const = 0;
-
- /**
- * Get the type of an attribute
- * @param[in] bufferIndex Index to access double buffered values
- * @param[in] index Index of the attribute
- * @return the type of the attribute
- */
- virtual Property::Type GetAttributeType( BufferIndex bufferIndex, unsigned int index ) const = 0;
-
- /**
- * Get the byte offset of an attribute
- * @param[in] bufferIndex Index to access double buffered values
- * @param[in] index Index of the attribute
- * @return the byte offset of the attribute
- */
- virtual size_t GetAttributeOffset( BufferIndex bufferIndex, unsigned int index ) const = 0;
-
- /**
- * Get the property buffer data
- * @param[in] bufferIndex Index to access double buffered values
- * @return the property buffer's data array
- */
- virtual const BufferType& GetData( BufferIndex bufferIndex ) const = 0;
-
- /**
- * Get the size of the property buffer in bytes
- * @param[in] bufferIndex Index to access double buffered values
- * @return the size in bytes
- */
- virtual size_t GetDataSize( BufferIndex bufferIndex ) const = 0;
-
- /**
- * Get the size of an element of the buffer in bytes
- * @param[in] bufferIndex Index to access double buffered values
- * @return the element size in bytes
- */
- virtual size_t GetElementSize( BufferIndex bufferIndex ) const = 0;
-
- /**
- * Get the number of elements
- * @param[in] bufferIndex Index to access double buffered values
- * @return the number of elements
- */
- virtual unsigned int GetElementCount( BufferIndex bufferIndex ) const = 0;
-
- /**
- * Get Id of the GPU buffer associated with this propertyBuffer
- * @param[in] bufferIndex Index to access double buffered values
- * @return the Id
- */
- virtual unsigned int GetGpuBufferId( BufferIndex bufferIndex ) const = 0;
-
- /**
- * Checks if data in the PropertyBuffer has changed repect previous frame
- * @param[in] bufferIndex Index to access double buffered values
- * @return true if data has changed, false otherwise
- */
- virtual bool HasDataChanged( BufferIndex bufferIndex ) const = 0;
-
-protected:
- /**
- * No deletion through this interface
- */
- virtual ~PropertyBufferDataProvider()
- {
- }
-};
-
-} // namespace SceneGraph
-} // namespace Internal
-} // namespace Dali
-
-#endif // DALI_INTERNAL_SCENE_GRAPH_PROPERTY_BUFFER_DATA_PROVIDER_H
+++ /dev/null
-/*
- * 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#include <dali/internal/update/rendering/data-providers/render-data-provider.h>
-
-namespace Dali
-{
-namespace Internal
-{
-namespace SceneGraph
-{
-
-RenderDataProvider::RenderDataProvider( AnimatableProperty< float >& opacity )
-: mUniformMapDataProvider( NULL ),
- mShader( NULL ),
- mOpacity( opacity )
-{
-}
-
-RenderDataProvider::~RenderDataProvider()
-{
-}
-
-void RenderDataProvider::SetUniformMap(const UniformMapDataProvider& uniformMapDataProvider)
-{
- mUniformMapDataProvider = &uniformMapDataProvider;
-}
-
-const UniformMapDataProvider& RenderDataProvider::GetUniformMap() const
-{
- return *mUniformMapDataProvider;
-}
-
-void RenderDataProvider::SetShader( Shader& shader )
-{
- mShader = &shader;
-}
-
-Shader& RenderDataProvider::GetShader() const
-{
- return *mShader;
-}
-
-RenderDataProvider::Samplers& RenderDataProvider::GetSamplers()
-{
- return mSamplers;
-}
-
-std::vector<SceneGraph::Texture*>& RenderDataProvider::GetTextures()
-{
- return mTextures;
-}
-
-float RenderDataProvider::GetOpacity( BufferIndex bufferIndex )
-{
- return mOpacity[bufferIndex];
-}
-
-} // SceneGraph
-} // Internal
-} // Dali
+++ /dev/null
-#ifndef __DALI_INTERNAL_SCENE_GRAPH_RENDER_DATA_PROVIDER_H__
-#define __DALI_INTERNAL_SCENE_GRAPH_RENDER_DATA_PROVIDER_H__
-
-/*
- * 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#include <dali/public-api/common/vector-wrapper.h>
-#include <dali/public-api/rendering/renderer.h>
-#include <dali/internal/update/rendering/data-providers/node-data-provider.h>
-#include <dali/internal/update/rendering/data-providers/property-buffer-data-provider.h>
-#include <dali/internal/update/rendering/data-providers/uniform-map-data-provider.h>
-#include <dali/internal/update/rendering/scene-graph-sampler.h>
-#include <dali/internal/update/rendering/scene-graph-texture.h>
-#include <dali/internal/update/common/animatable-property.h>
-
-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
- * individual providers to change connections in the update thread without affecting
- * the current render. It essentially provides double buffering of the
- * provider accessor through the message system. It does not take ownership
- * of any objects.
- */
-class RenderDataProvider
-{
-public:
- typedef Dali::Vector< const PropertyBufferDataProvider* > VertexBuffers;
- typedef std::vector< SceneGraph::Sampler* > Samplers;
-
- /**
- * Constructor.
- * The RendererAttachment that creates this object will initialize the members
- * directly.
- */
- RenderDataProvider( AnimatableProperty< float >& opacity );
-
- /**
- * Destructor
- */
- ~RenderDataProvider();
-
-public:
-
- /**
- * Set the uniform map data provider
- * @param[in] uniformMapDataProvider The uniform map data provider
- */
- void SetUniformMap(const UniformMapDataProvider& uniformMapDataProvider);
-
- /**
- * Get the uniform map data provider
- */
- const UniformMapDataProvider& GetUniformMap() const;
-
- /**
- * Set the shader data provider
- * @param[in] shader The shader data provider
- */
- void SetShader( Shader& shader );
-
- /**
- * Returns the shader
- * @return The shader
- */
- Shader& GetShader() const;
-
- /**
- * Returns the list of samplers
- * @return The list of samplers
- */
- Samplers& GetSamplers();
-
- /**
- * Returns the list of Textures
- * @return The list of Textures
- */
- std::vector<SceneGraph::Texture*>& GetTextures();
-
- /**
- * Get the opacity
- * @return The opacity
- */
- float GetOpacity( BufferIndex bufferIndex );
-
-private:
-
- const UniformMapDataProvider* mUniformMapDataProvider;
- Shader* mShader;
- std::vector<SceneGraph::Texture*> mTextures;
- Samplers mSamplers;
- AnimatableProperty< float >& mOpacity;
-
- // Give Renderer access to our private data to reduce copying vectors on construction.
- friend class Renderer;
-};
-
-} // SceneGraph
-} // Internal
-} // Dali
-
-#endif // __DALI_INTERNAL_SCENE_GRAPH_RENDER_DATA_PROVIDER_H__
+++ /dev/null
-#ifndef DALI_INTERNAL_SCENE_GRAPH_UNIFORM_MAP_DATA_PROVIDER_H
-#define DALI_INTERNAL_SCENE_GRAPH_UNIFORM_MAP_DATA_PROVIDER_H
-
-/*
- * 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include <dali/public-api/common/dali-vector.h>
-#include <dali/internal/common/buffer-index.h>
-
-namespace Dali
-{
-namespace Internal
-{
-namespace SceneGraph
-{
-class UniformMap;
-class UniformPropertyMapping;
-
-typedef Dali::Vector< const UniformPropertyMapping* > CollectedUniformMap;
-
-/**
- * This class maps uniform names to property value pointers.
- */
-class UniformMapDataProvider
-{
-public:
- /**
- * Constructor
- */
- UniformMapDataProvider()
- {
- }
-
- /**
- * Return true if the uniform map has been changed this frame
- * Note, this only informs if the uniform mappings have changed,
- * not if any actual property value has changed.
- *
- * @param[in] bufferIndex The buffer index
- * @return true if the uniform map has changed
- */
- virtual bool GetUniformMapChanged( BufferIndex bufferIndex ) const = 0;
-
- /**
- * Get the complete map of uniforms to property value addresses
- * (The map is double buffered - it can be retrieved through this interface)
- *
- * @param[in] bufferIndex The bufferIndex
- * @return the uniform map
- */
- virtual const CollectedUniformMap& GetUniformMap( BufferIndex bufferIndex ) const = 0;
-
-protected:
- /**
- * No deletion through this interface
- */
- virtual ~UniformMapDataProvider()
- {
- }
-};
-
-} // namespace SceneGraph
-} // namespace Internal
-} // namespace Dali
-
-#endif // DALI_INTERNAL_SCENE_GRAPH_UNIFORM_MAP_DATA_PROVIDER_H
#include <dali/internal/update/common/property-owner.h>
#include <dali/internal/update/common/uniform-map.h>
#include <dali/internal/update/common/scene-graph-connection-change-propagator.h>
-#include <dali/internal/update/rendering/data-providers/uniform-map-data-provider.h>
#include <dali/internal/update/rendering/render-command-container.h>
#include <dali/internal/update/rendering/stencil-parameters.h>
#include <dali/graphics-api/graphics-api-controller.h>
typedef RendererContainer::Iterator RendererIter;
typedef RendererContainer::ConstIterator RendererConstIter;
+typedef Dali::Vector< const UniformPropertyMapping* > CollectedUniformMap;
+
class Renderer : public PropertyOwner,
public UniformMap::Observer,
public ConnectionChangePropagator::Observer
* @return The opacity
*/
float GetOpacity( BufferIndex updateBufferIndex ) const;
-
+
/**
* Helper function to update the uniform map.
* @param[in] bufferIndex The buffer to read from.
* @param[in] node NodeDataProvider to get uniform map
*/
void UpdateUniformMap( BufferIndex bufferIndex, Node& node );
-
+
/**
* Sets the rendering behavior
* @param[in] renderingBehavior The rendering behavior required.
*
* When an actor is connected, it will be directly or indirectly parented to the root Actor.
* @SINCE_1_0.0
- * @param[in] depth The depth in the hierarchy for the actor
*
* @note The root Actor is provided automatically by Dali::Stage, and is always considered to be connected.
* When the parent of a set of actors is connected to the stage, then all of the children
*
* @SINCE_1_0.0
* @param[in] implementation The implementation for this custom actor
- * @return A handle to a newly allocated Dali resource
*/
CustomActor(CustomActorImpl& implementation);
* @brief Default constructor.
* Creates an alpha function object with the default built-in alpha function.
* @SINCE_1_0.0
- * @return The alpha function
*/
AlphaFunction();
* to the constructor.
* @SINCE_1_0.0
* @param[in] function One of the built-in alpha functions
- * @return The alpha function
*/
AlphaFunction( BuiltinFunction function);
* to the constructor.
* @SINCE_1_0.0
* @param[in] function A pointer to an alpha function
- * @return The alpha function
*/
AlphaFunction( AlphaFunctionPrototype function);
* @SINCE_1_0.0
* @param[in] controlPoint0 A Vector2 which will be used as the first control point of the curve
* @param[in] controlPoint1 A Vector2 which will be used as the second control point of the curve
- * @return The alpha function
* @note The x components of the control points will be clamped to the range [0,1] to prevent
* non monotonic curves.
*/