1 #ifndef DALI_INTERNAL_SCENE_GRAPH_RENDERER_H
2 #define DALI_INTERNAL_SCENE_GRAPH_RENDERER_H
5 * Copyright (c) 2020 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
20 #include <dali/public-api/rendering/geometry.h>
21 #include <dali/public-api/rendering/renderer.h> // Dali::Renderer
22 #include <dali/devel-api/rendering/renderer-devel.h>
23 #include <dali/internal/common/blending-options.h>
24 #include <dali/internal/common/type-abstraction-enums.h>
25 #include <dali/internal/event/common/event-thread-services.h>
26 #include <dali/internal/update/common/property-owner.h>
27 #include <dali/internal/update/common/uniform-map.h>
28 #include <dali/internal/update/common/scene-graph-connection-change-propagator.h>
29 #include <dali/internal/update/common/animatable-property.h>
30 #include <dali/internal/render/data-providers/render-data-provider.h>
31 #include <dali/internal/render/renderers/render-renderer.h>
47 class SceneController;
50 using RendererContainer = Dali::Vector<Renderer*>;
51 using RendererIter = RendererContainer::Iterator;
52 using RendererConstIter = RendererContainer::ConstIterator;
57 class Renderer : public PropertyOwner,
58 public UniformMapDataProvider,
59 public UniformMap::Observer,
60 public ConnectionChangePropagator::Observer
72 * Construct a new Renderer
74 static Renderer* New();
82 * Overriden delete operator
83 * Deletes the renderer from its global memory pool
85 void operator delete( void* ptr );
88 * Set the texture set for the renderer
89 * @param[in] textureSet The texture set this renderer will use
91 void SetTextures( TextureSet* textureSet );
94 * Returns current texture set object
95 * @return Pointer to the texture set
97 const TextureSet* GetTextures() const
103 * Set the shader for the renderer
104 * @param[in] shader The shader this renderer will use
106 void SetShader( Shader* shader );
109 * Get the shader used by this renderer
110 * @return the shader this renderer uses
112 const Shader& GetShader() const
118 * Set the geometry for the renderer
119 * @param[in] geometry The geometry this renderer will use
121 void SetGeometry( Render::Geometry* geometry );
124 * Set the depth index
125 * @param[in] depthIndex the new depth index to use
127 void SetDepthIndex( int depthIndex );
130 * @brief Get the depth index
131 * @return The depth index
133 int GetDepthIndex() const
139 * Set the face culling mode
140 * @param[in] faceCullingMode to use
142 void SetFaceCullingMode( FaceCullingMode::Type faceCullingMode );
145 * Get face culling mode
146 * @return The face culling mode
148 FaceCullingMode::Type GetFaceCullingMode() const;
151 * Set the blending mode
152 * @param[in] blendingMode to use
154 void SetBlendMode( BlendMode::Type blendingMode );
157 * Get the blending mode
158 * @return The the blending mode
160 BlendMode::Type GetBlendMode() const;
163 * Set the blending options. This should only be called from the update thread.
164 * @param[in] options A bitmask of blending options.
166 void SetBlendingOptions( uint32_t options );
169 * Get the blending options
170 * @return The the blending mode
172 uint32_t GetBlendingOptions() const;
175 * Set the blend color for blending operation
176 * @param blendColor to pass to GL
178 void SetBlendColor( const Vector4& blendColor );
181 * Get the blending color
182 * @return The blend color
184 Vector4 GetBlendColor() const;
187 * Set the index of first element for indexed draw
188 * @param[in] firstElement index of first element to draw
190 void SetIndexedDrawFirstElement( uint32_t firstElement );
193 * Get the index of first element for indexed draw
194 * @return The index of first element for indexed draw
196 uint32_t GetIndexedDrawFirstElement() const;
199 * Set the number of elements to draw by indexed draw
200 * @param[in] elementsCount number of elements to draw
202 void SetIndexedDrawElementsCount( uint32_t elementsCount );
205 * Get the number of elements to draw by indexed draw
206 * @return The number of elements to draw by indexed draw
208 uint32_t GetIndexedDrawElementsCount() const;
211 * @brief Set whether the Pre-multiplied Alpha Blending is required
212 * @param[in] preMultipled whether alpha is pre-multiplied.
214 void EnablePreMultipliedAlpha( bool preMultipled );
217 * @brief Query whether alpha is pre-multiplied.
218 * @return True is alpha is pre-multiplied, false otherwise.
220 bool IsPreMultipliedAlphaEnabled() const;
223 * Sets the depth buffer write mode
224 * @param[in] depthWriteMode The depth buffer write mode
226 void SetDepthWriteMode( DepthWriteMode::Type depthWriteMode );
229 * Get the depth buffer write mode
230 * @return The depth buffer write mode
232 DepthWriteMode::Type GetDepthWriteMode() const;
235 * Sets the depth buffer test mode
236 * @param[in] depthTestMode The depth buffer test mode
238 void SetDepthTestMode( DepthTestMode::Type depthTestMode );
241 * Get the depth buffer test mode
242 * @return The depth buffer test mode
244 DepthTestMode::Type GetDepthTestMode() const;
247 * Sets the depth function
248 * @param[in] depthFunction The depth function
250 void SetDepthFunction( DepthFunction::Type depthFunction );
253 * Get the depth function
254 * @return The depth function
256 DepthFunction::Type GetDepthFunction() const;
259 * Sets the render mode
260 * @param[in] mode The render mode
262 void SetRenderMode( RenderMode::Type mode );
265 * Sets the stencil function
266 * @param[in] stencilFunction The stencil function
268 void SetStencilFunction( StencilFunction::Type stencilFunction );
271 * Sets the stencil function mask
272 * @param[in] stencilFunctionMask The stencil function mask
274 void SetStencilFunctionMask( int stencilFunctionMask );
277 * Sets the stencil function reference
278 * @param[in] stencilFunctionReference The stencil function reference
280 void SetStencilFunctionReference( int stencilFunctionReference );
283 * Sets the stencil mask
284 * @param[in] stencilMask The stencil mask
286 void SetStencilMask( int stencilMask );
289 * Sets the stencil operation for when the stencil test fails
290 * @param[in] stencilOperationOnFail The stencil operation
292 void SetStencilOperationOnFail( StencilOperation::Type stencilOperationOnFail );
295 * Sets the stencil operation for when the depth test fails
296 * @param[in] stencilOperationOnZFail The stencil operation
298 void SetStencilOperationOnZFail( StencilOperation::Type stencilOperationOnZFail );
301 * Sets the stencil operation for when the depth test passes
302 * @param[in] stencilOperationOnZPass The stencil operation
304 void SetStencilOperationOnZPass( StencilOperation::Type stencilOperationOnZPass );
307 * Gets the stencil parameters
308 * @return The stencil parameters
310 const Render::Renderer::StencilParameters& GetStencilParameters() const;
314 * @param[in] updateBufferIndex The current update buffer index.
315 * @param[in] opacity The opacity
317 void BakeOpacity( BufferIndex updateBufferIndex, float opacity );
321 * @param[in] bufferIndex The buffer to read from.
322 * @return The opacity
324 float GetOpacity( BufferIndex updateBufferIndex ) const;
327 * Sets the rendering behavior
328 * @param[in] renderingBehavior The rendering behavior required.
330 void SetRenderingBehavior( DevelRenderer::Rendering::Type renderingBehavior );
333 * Gets the rendering behavior
334 * @return The rendering behavior
336 DevelRenderer::Rendering::Type GetRenderingBehavior() const;
339 * Prepare the object for rendering.
340 * This is called by the UpdateManager when an object is due to be rendered in the current frame.
341 * @param[in] updateBufferIndex The current update buffer index.
342 * @return Whether this renderer has been updated in the current frame
344 bool PrepareRender( BufferIndex updateBufferIndex );
347 * Retrieve the Render thread renderer
348 * @return The associated render thread renderer
350 Render::Renderer& GetRenderer();
353 * Query whether the renderer is fully opaque, fully transparent or transparent.
354 * @param[in] updateBufferIndex The current update buffer index.
355 * @return OPAQUE if fully opaque, TRANSPARENT if fully transparent and TRANSLUCENT if in between
357 OpacityType GetOpacityType( BufferIndex updateBufferIndex, const Node& node ) const;
360 * Called by the TextureSet to notify to the renderer that it has changed
362 void TextureSetChanged();
365 * Called by the TextureSet to notify to the renderer that it is about to be deleted
367 void TextureSetDeleted();
370 * Connect the object to the scene graph
372 * @param[in] sceneController The scene controller - used for sending messages to render thread
373 * @param[in] bufferIndex The current buffer index - used for sending messages to render thread
375 void ConnectToSceneGraph( SceneController& sceneController, BufferIndex bufferIndex );
378 * Disconnect the object from the scene graph
379 * @param[in] sceneController The scene controller - used for sending messages to render thread
380 * @param[in] bufferIndex The current buffer index - used for sending messages to render thread
382 void DisconnectFromSceneGraph( SceneController& sceneController, BufferIndex bufferIndex );
384 public: // Implementation of ConnectionChangePropagator
386 * @copydoc ConnectionChangePropagator::AddObserver
388 void AddConnectionObserver(ConnectionChangePropagator::Observer& observer){};
391 * @copydoc ConnectionChangePropagator::RemoveObserver
393 void RemoveConnectionObserver(ConnectionChangePropagator::Observer& observer){};
395 public: // UniformMap::Observer
397 * @copydoc UniformMap::Observer::UniformMappingsChanged
399 void UniformMappingsChanged( const UniformMap& mappings ) override;
401 public: // ConnectionChangePropagator::Observer
404 * @copydoc ConnectionChangePropagator::ConnectionsChanged
406 void ConnectionsChanged( PropertyOwner& owner ) override;
409 * @copydoc ConnectionChangePropagator::ConnectedUniformMapChanged
411 void ConnectedUniformMapChanged( ) override;
414 * @copydoc ConnectionChangePropagator::ConnectedUniformMapChanged
416 void ObservedObjectDestroyed(PropertyOwner& owner) override;
418 public: // PropertyOwner implementation
420 * @copydoc Dali::Internal::SceneGraph::PropertyOwner::ResetDefaultProperties()
422 virtual void ResetDefaultProperties( BufferIndex updateBufferIndex ){};
424 public: // From UniformMapDataProvider
427 * @copydoc UniformMapDataProvider::GetUniformMapChanged
429 bool GetUniformMapChanged( BufferIndex bufferIndex ) const override{ return mUniformMapChanged[bufferIndex];}
432 * @copydoc UniformMapDataProvider::GetUniformMap
434 const CollectedUniformMap& GetUniformMap( BufferIndex bufferIndex ) const override;
436 void SetDrawCommands( Dali::DevelRenderer::DrawCommand* pDrawCommands, uint32_t size );
441 * Protected constructor; See also Renderer::New()
446 * Update texture set to the render data provider
448 void UpdateTextureSet();
452 CollectedUniformMap mCollectedUniformMap[2]; ///< Uniform maps collected by the renderer
454 SceneController* mSceneController; ///< Used for initializing renderers
455 Render::Renderer* mRenderer; ///< Raw pointer to the renderer (that's owned by RenderManager)
456 TextureSet* mTextureSet; ///< The texture set this renderer uses. (Not owned)
457 Render::Geometry* mGeometry; ///< The geometry this renderer uses. (Not owned)
458 Shader* mShader; ///< The shader this renderer uses. (Not owned)
459 RenderDataProvider* mRenderDataProvider; ///< The render data provider
460 OwnerPointer< Vector4 > mBlendColor; ///< The blend color for blending operation
462 Dali::Internal::Render::Renderer::StencilParameters mStencilParameters; ///< Struct containing all stencil related options
464 uint32_t mIndexedDrawFirstElement; ///< first element index to be drawn using indexed draw
465 uint32_t mIndexedDrawElementsCount; ///< number of elements to be drawn using indexed draw
466 uint32_t mBlendBitmask; ///< The bitmask of blending options
467 uint32_t mRegenerateUniformMap; ///< 2 if the map should be regenerated, 1 if it should be copied.
468 uint32_t mResendFlag; ///< Indicate whether data should be resent to the renderer
470 DepthFunction::Type mDepthFunction:4; ///< Local copy of the depth function
471 FaceCullingMode::Type mFaceCullingMode:3; ///< Local copy of the mode of face culling
472 BlendMode::Type mBlendMode:3; ///< Local copy of the mode of blending
473 DepthWriteMode::Type mDepthWriteMode:3; ///< Local copy of the depth write mode
474 DepthTestMode::Type mDepthTestMode:3; ///< Local copy of the depth test mode
475 DevelRenderer::Rendering::Type mRenderingBehavior:2; ///< The rendering behavior
476 bool mUniformMapChanged[2]; ///< Records if the uniform map has been altered this frame
477 bool mPremultipledAlphaEnabled:1; ///< Flag indicating whether the Pre-multiplied Alpha Blending is required
479 std::vector<Dali::DevelRenderer::DrawCommand> mDrawCommands;
483 AnimatableProperty< float > mOpacity; ///< The opacity value
484 int32_t mDepthIndex; ///< Used only in PrepareRenderInstructions
490 inline void SetTexturesMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, const TextureSet& textureSet )
492 using LocalType = MessageValue1<Renderer, TextureSet*>;
494 // Reserve some memory inside the message queue
495 uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
497 // Construct message in the message queue memory; note that delete should not be called on the return value
498 new (slot) LocalType( &renderer, &Renderer::SetTextures, const_cast<TextureSet*>(&textureSet) );
501 inline void SetGeometryMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, const Render::Geometry& geometry )
503 using LocalType = MessageValue1<Renderer, Render::Geometry*>;
505 // Reserve some memory inside the message queue
506 uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
508 // Construct message in the message queue memory; note that delete should not be called on the return value
509 new (slot) LocalType( &renderer, &Renderer::SetGeometry, const_cast<Render::Geometry*>(&geometry) );
512 inline void SetShaderMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, const Shader& shader )
514 using LocalType = MessageValue1<Renderer, Shader*>;
516 // Reserve some memory inside the message queue
517 uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
519 // Construct message in the message queue memory; note that delete should not be called on the return value
520 new (slot) LocalType( &renderer, &Renderer::SetShader, const_cast<Shader*>( &shader ) );
523 inline void SetDepthIndexMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, int depthIndex )
525 using LocalType = MessageValue1<Renderer, int>;
527 // Reserve some memory inside the message queue
528 uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
530 // Construct message in the message queue memory; note that delete should not be called on the return value
531 new (slot) LocalType( &renderer, &Renderer::SetDepthIndex, depthIndex );
534 inline void SetFaceCullingModeMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, FaceCullingMode::Type faceCullingMode )
536 using LocalType = MessageValue1<Renderer, FaceCullingMode::Type>;
538 // Reserve some memory inside the message queue
539 uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
541 new (slot) LocalType( &renderer, &Renderer::SetFaceCullingMode, faceCullingMode );
544 inline void SetBlendModeMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, BlendMode::Type blendingMode )
546 using LocalType = MessageValue1<Renderer, BlendMode::Type>;
548 // Reserve some memory inside the message queue
549 uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
551 new (slot) LocalType( &renderer, &Renderer::SetBlendMode, blendingMode );
554 inline void SetBlendingOptionsMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, uint32_t options )
556 using LocalType = MessageValue1<Renderer, uint32_t>;
558 // Reserve some memory inside the message queue
559 uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
561 new (slot) LocalType( &renderer, &Renderer::SetBlendingOptions, options );
564 inline void SetBlendColorMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, const Vector4& blendColor )
566 using LocalType = MessageValue1<Renderer, Vector4>;
568 // Reserve some memory inside the message queue
569 uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
571 new (slot) LocalType( &renderer, &Renderer::SetBlendColor, blendColor );
574 inline void SetIndexedDrawFirstElementMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, uint32_t firstElement )
576 using LocalType = MessageValue1<Renderer, uint32_t>;
578 // Reserve some memory inside the message queue
579 uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
581 new (slot) LocalType( &renderer, &Renderer::SetIndexedDrawFirstElement, firstElement );
584 inline void SetIndexedDrawElementsCountMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, uint32_t elementsCount )
586 using LocalType = MessageValue1<Renderer, uint32_t>;
588 // Reserve some memory inside the message queue
589 uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
591 new (slot) LocalType( &renderer, &Renderer::SetIndexedDrawElementsCount, elementsCount );
594 inline void SetEnablePreMultipliedAlphaMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, bool preMultiplied )
596 using LocalType = MessageValue1<Renderer, bool>;
598 // Reserve some memory inside the message queue
599 uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
601 new (slot) LocalType( &renderer, &Renderer::EnablePreMultipliedAlpha, preMultiplied );
604 inline void SetDepthWriteModeMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, DepthWriteMode::Type depthWriteMode )
606 using LocalType = MessageValue1<Renderer, DepthWriteMode::Type>;
608 // Reserve some memory inside the message queue
609 uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
611 new (slot) LocalType( &renderer, &Renderer::SetDepthWriteMode, depthWriteMode );
614 inline void SetDepthTestModeMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, DepthTestMode::Type depthTestMode )
616 using LocalType = MessageValue1<Renderer, DepthTestMode::Type>;
618 // Reserve some memory inside the message queue
619 uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
621 new (slot) LocalType( &renderer, &Renderer::SetDepthTestMode, depthTestMode );
624 inline void SetDepthFunctionMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, DepthFunction::Type depthFunction )
626 using LocalType = MessageValue1<Renderer, DepthFunction::Type>;
628 // Reserve some memory inside the message queue
629 uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
631 new (slot) LocalType( &renderer, &Renderer::SetDepthFunction, depthFunction );
634 inline void SetRenderModeMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, RenderMode::Type mode )
636 using LocalType = MessageValue1<Renderer, RenderMode::Type>;
638 // Reserve some memory inside the message queue
639 uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
641 new (slot) LocalType( &renderer, &Renderer::SetRenderMode, mode );
644 inline void SetStencilFunctionMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, StencilFunction::Type stencilFunction )
646 using LocalType = MessageValue1<Renderer, StencilFunction::Type>;
648 // Reserve some memory inside the message queue
649 uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
651 new (slot) LocalType( &renderer, &Renderer::SetStencilFunction, stencilFunction );
654 inline void SetStencilFunctionMaskMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, int mask )
656 using LocalType = MessageValue1<Renderer, int>;
658 // Reserve some memory inside the message queue
659 uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
661 new (slot) LocalType( &renderer, &Renderer::SetStencilFunctionMask, mask );
664 inline void SetStencilFunctionReferenceMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, int stencilFunctionReference )
666 using LocalType = MessageValue1<Renderer, int>;
668 // Reserve some memory inside the message queue
669 uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
671 new (slot) LocalType( &renderer, &Renderer::SetStencilFunctionReference, stencilFunctionReference );
674 inline void SetStencilMaskMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, int stencilMask )
676 using LocalType = MessageValue1<Renderer, int>;
678 // Reserve some memory inside the message queue
679 uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
681 new (slot) LocalType( &renderer, &Renderer::SetStencilMask, stencilMask );
684 inline void SetStencilOperationOnFailMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, StencilOperation::Type stencilOperation )
686 using LocalType = MessageValue1<Renderer, StencilOperation::Type>;
688 // Reserve some memory inside the message queue
689 uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
691 new (slot) LocalType( &renderer, &Renderer::SetStencilOperationOnFail, stencilOperation );
694 inline void SetStencilOperationOnZFailMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, StencilOperation::Type stencilOperation )
696 using LocalType = MessageValue1<Renderer, StencilOperation::Type>;
698 // Reserve some memory inside the message queue
699 uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
701 new (slot) LocalType( &renderer, &Renderer::SetStencilOperationOnZFail, stencilOperation );
704 inline void SetStencilOperationOnZPassMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, StencilOperation::Type stencilOperation )
706 using LocalType = MessageValue1<Renderer, StencilOperation::Type>;
708 // Reserve some memory inside the message queue
709 uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
711 new (slot) LocalType( &renderer, &Renderer::SetStencilOperationOnZPass, stencilOperation );
714 inline void BakeOpacityMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, float opacity )
716 using LocalType = MessageDoubleBuffered1<Renderer, float>;
718 // Reserve some memory inside the message queue
719 uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
721 new (slot) LocalType( &renderer, &Renderer::BakeOpacity, opacity );
724 inline void SetRenderingBehaviorMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, DevelRenderer::Rendering::Type renderingBehavior )
726 using LocalType = MessageValue1< Renderer, DevelRenderer::Rendering::Type >;
728 // Reserve some memory inside the message queue
729 uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
731 new (slot) LocalType( &renderer, &Renderer::SetRenderingBehavior, renderingBehavior );
734 inline void SetDrawCommandsMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, Dali::DevelRenderer::DrawCommand* pDrawCommands, uint32_t size )
736 using LocalType = MessageValue2<Renderer, Dali::DevelRenderer::DrawCommand*, uint32_t>;
738 // Reserve some memory inside the message queue
739 uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
741 new (slot) LocalType( &renderer, &Renderer::SetDrawCommands, pDrawCommands, size );
745 } // namespace SceneGraph
746 } // namespace Internal
749 #endif // DALI_INTERNAL_SCENE_GRAPH_RENDERER_H