1 #ifndef DALI_INTERNAL_SCENE_GRAPH_RENDERER_H
2 #define DALI_INTERNAL_SCENE_GRAPH_RENDERER_H
5 * Copyright (c) 2022 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/devel-api/rendering/renderer-devel.h>
21 #include <dali/internal/common/blending-options.h>
22 #include <dali/internal/common/type-abstraction-enums.h>
23 #include <dali/internal/event/common/event-thread-services.h>
24 #include <dali/internal/event/rendering/visual-renderer-impl.h>
25 #include <dali/internal/render/data-providers/render-data-provider.h>
26 #include <dali/internal/render/renderers/render-renderer.h>
27 #include <dali/internal/update/common/animatable-property.h>
28 #include <dali/internal/update/common/property-owner.h>
29 #include <dali/internal/update/common/scene-graph-connection-change-propagator.h>
30 #include <dali/internal/update/common/uniform-map.h>
31 #include <dali/public-api/rendering/geometry.h>
32 #include <dali/public-api/rendering/renderer.h> // Dali::Renderer
46 class SceneController;
49 using RendererContainer = Dali::Vector<Renderer*>;
50 using RendererIter = RendererContainer::Iterator;
51 using RendererConstIter = RendererContainer::ConstIterator;
56 class Renderer : public PropertyOwner,
57 public UniformMapDataProvider,
58 public RenderDataProvider,
59 public UniformMap::Observer,
60 public ConnectionChangePropagator::Observer
71 * Construct a new Renderer
73 static Renderer* New();
81 * Overriden delete operator
82 * Deletes the renderer from its global memory pool
84 void operator delete(void* ptr);
87 * Set the texture set for the renderer
88 * @param[in] textureSet The texture set this renderer will use
90 void SetTextures(TextureSet* textureSet);
92 const SceneGraph::TextureSet* GetTextureSet() const
98 * @copydoc RenderDataProvider::GetTextures()
100 const Vector<Render::Texture*>* GetTextures() const override;
103 * @copydoc RenderDataProvider::GetSamplers()
105 const Vector<Render::Sampler*>* GetSamplers() const override;
108 * Set the shader for the renderer
109 * @param[in] shader The shader this renderer will use
111 void SetShader(Shader* shader);
114 * @copydoc RenderDataProvider::GetShader()
116 const Shader& GetShader() const override
122 * Set the geometry for the renderer
123 * @param[in] geometry The geometry this renderer will use
125 void SetGeometry(Render::Geometry* geometry);
128 * Set the depth index
129 * @param[in] depthIndex the new depth index to use
131 void SetDepthIndex(int depthIndex);
134 * @brief Get the depth index
135 * @return The depth index
137 int GetDepthIndex() const
143 * Set the face culling mode
144 * @param[in] faceCullingMode to use
146 void SetFaceCullingMode(FaceCullingMode::Type faceCullingMode);
149 * Get face culling mode
150 * @return The face culling mode
152 FaceCullingMode::Type GetFaceCullingMode() const;
155 * Set the blending mode
156 * @param[in] blendingMode to use
158 void SetBlendMode(BlendMode::Type blendingMode);
161 * Get the blending mode
162 * @return The the blending mode
164 BlendMode::Type GetBlendMode() const;
167 * Set the blending options. This should only be called from the update thread.
168 * @param[in] options A bitmask of blending options.
170 void SetBlendingOptions(uint32_t options);
173 * Get the blending options
174 * @return The the blending mode
176 uint32_t GetBlendingOptions() const;
179 * Set the blend color for blending operation
180 * @param blendColor to pass to GL
182 void SetBlendColor(const Vector4& blendColor);
185 * Get the blending color
186 * @return The blend color
188 Vector4 GetBlendColor() const;
191 * Set the index of first element for indexed draw
192 * @param[in] firstElement index of first element to draw
194 void SetIndexedDrawFirstElement(uint32_t firstElement);
197 * Get the index of first element for indexed draw
198 * @return The index of first element for indexed draw
200 uint32_t GetIndexedDrawFirstElement() const;
203 * Set the number of elements to draw by indexed draw
204 * @param[in] elementsCount number of elements to draw
206 void SetIndexedDrawElementsCount(uint32_t elementsCount);
209 * Get the number of elements to draw by indexed draw
210 * @return The number of elements to draw by indexed draw
212 uint32_t GetIndexedDrawElementsCount() const;
215 * @brief Set whether the Pre-multiplied Alpha Blending is required
216 * @param[in] preMultipled whether alpha is pre-multiplied.
218 void EnablePreMultipliedAlpha(bool preMultipled);
221 * @brief Query whether alpha is pre-multiplied.
222 * @return True is alpha is pre-multiplied, false otherwise.
224 bool IsPreMultipliedAlphaEnabled() const;
227 * Sets the depth buffer write mode
228 * @param[in] depthWriteMode The depth buffer write mode
230 void SetDepthWriteMode(DepthWriteMode::Type depthWriteMode);
233 * Get the depth buffer write mode
234 * @return The depth buffer write mode
236 DepthWriteMode::Type GetDepthWriteMode() const;
239 * Sets the depth buffer test mode
240 * @param[in] depthTestMode The depth buffer test mode
242 void SetDepthTestMode(DepthTestMode::Type depthTestMode);
245 * Get the depth buffer test mode
246 * @return The depth buffer test mode
248 DepthTestMode::Type GetDepthTestMode() const;
251 * Sets the depth function
252 * @param[in] depthFunction The depth function
254 void SetDepthFunction(DepthFunction::Type depthFunction);
257 * Get the depth function
258 * @return The depth function
260 DepthFunction::Type GetDepthFunction() const;
263 * Sets the render mode
264 * @param[in] mode The render mode
266 void SetRenderMode(RenderMode::Type mode);
269 * Sets the stencil function
270 * @param[in] stencilFunction The stencil function
272 void SetStencilFunction(StencilFunction::Type stencilFunction);
275 * Sets the stencil function mask
276 * @param[in] stencilFunctionMask The stencil function mask
278 void SetStencilFunctionMask(int stencilFunctionMask);
281 * Sets the stencil function reference
282 * @param[in] stencilFunctionReference The stencil function reference
284 void SetStencilFunctionReference(int stencilFunctionReference);
287 * Sets the stencil mask
288 * @param[in] stencilMask The stencil mask
290 void SetStencilMask(int stencilMask);
293 * Sets the stencil operation for when the stencil test fails
294 * @param[in] stencilOperationOnFail The stencil operation
296 void SetStencilOperationOnFail(StencilOperation::Type stencilOperationOnFail);
299 * Sets the stencil operation for when the depth test fails
300 * @param[in] stencilOperationOnZFail The stencil operation
302 void SetStencilOperationOnZFail(StencilOperation::Type stencilOperationOnZFail);
305 * Sets the stencil operation for when the depth test passes
306 * @param[in] stencilOperationOnZPass The stencil operation
308 void SetStencilOperationOnZPass(StencilOperation::Type stencilOperationOnZPass);
311 * Gets the stencil parameters
312 * @return The stencil parameters
314 const Render::Renderer::StencilParameters& GetStencilParameters() const;
318 * @param[in] updateBufferIndex The current update buffer index.
319 * @param[in] opacity The opacity
321 void BakeOpacity(BufferIndex updateBufferIndex, float opacity);
324 * @copydoc RenderDataProvider::GetOpacity()
326 float GetOpacity(BufferIndex updateBufferIndex) const override;
329 * Sets the rendering behavior
330 * @param[in] renderingBehavior The rendering behavior required.
332 void SetRenderingBehavior(DevelRenderer::Rendering::Type renderingBehavior);
335 * Gets the rendering behavior
336 * @return The rendering behavior
338 DevelRenderer::Rendering::Type GetRenderingBehavior() const;
341 * Prepare the object for rendering.
342 * This is called by the UpdateManager when an object is due to be rendered in the current frame.
343 * @param[in] updateBufferIndex The current update buffer index.
344 * @return Whether this renderer has been updated in the current frame
346 bool PrepareRender(BufferIndex updateBufferIndex);
349 * Retrieve the Render thread renderer
350 * @return The associated render thread renderer
352 Render::Renderer& GetRenderer();
355 * Query whether the renderer is fully opaque, fully transparent or transparent.
356 * @param[in] updateBufferIndex The current update buffer index.
357 * @return OPAQUE if fully opaque, TRANSPARENT if fully transparent and TRANSLUCENT if in between
359 OpacityType GetOpacityType(BufferIndex updateBufferIndex, const Node& node) const;
362 * Connect the object to the scene graph
364 * @param[in] sceneController The scene controller - used for sending messages to render thread
365 * @param[in] bufferIndex The current buffer index - used for sending messages to render thread
367 void ConnectToSceneGraph(SceneController& sceneController, BufferIndex bufferIndex);
370 * Disconnect the object from the scene graph
371 * @param[in] sceneController The scene controller - used for sending messages to render thread
372 * @param[in] bufferIndex The current buffer index - used for sending messages to render thread
374 void DisconnectFromSceneGraph(SceneController& sceneController, BufferIndex bufferIndex);
377 * @copydoc RenderDataProvider::GetUniformMapDataProvider()
379 const UniformMapDataProvider& GetUniformMapDataProvider() const override
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
403 * @copydoc ConnectionChangePropagator::ConnectionsChanged
405 void ConnectionsChanged(PropertyOwner& owner) override;
408 * @copydoc ConnectionChangePropagator::ConnectedUniformMapChanged
410 void ConnectedUniformMapChanged() override;
413 * @copydoc ConnectionChangePropagator::ConnectedUniformMapChanged
415 void ObservedObjectDestroyed(PropertyOwner& owner) override;
417 public: // PropertyOwner implementation
419 * @copydoc Dali::Internal::SceneGraph::PropertyOwner::ResetDefaultProperties()
421 virtual void ResetDefaultProperties(BufferIndex updateBufferIndex){};
423 public: // From UniformMapDataProvider
425 * @copydoc UniformMapDataProvider::GetUniformMapChanged
427 bool GetUniformMapChanged(BufferIndex bufferIndex) const override
429 return mUniformMapChanged[bufferIndex];
433 * @copydoc UniformMapDataProvider::GetUniformMap
435 const CollectedUniformMap& GetUniformMap(BufferIndex bufferIndex) const override;
437 void SetDrawCommands(Dali::DevelRenderer::DrawCommand* pDrawCommands, uint32_t size);
439 public: // For VisualProperties
441 * To be used only for 1st stage initialization in event thread.
443 void SetVisualProperties(Internal::VisualRenderer::AnimatableVisualProperties* visualProperties)
445 mVisualProperties = visualProperties;
449 * May be accessed from event thread
451 const Internal::VisualRenderer::AnimatableVisualProperties* GetVisualProperties() const
453 return mVisualProperties;
458 * Protected constructor; See also Renderer::New()
463 CollectedUniformMap mCollectedUniformMap[2]; ///< Uniform maps collected by the renderer
465 SceneController* mSceneController; ///< Used for initializing renderers
466 Render::Renderer* mRenderer; ///< Raw pointer to the renderer (that's owned by RenderManager)
467 TextureSet* mTextureSet; ///< The texture set this renderer uses. (Not owned)
468 Render::Geometry* mGeometry; ///< The geometry this renderer uses. (Not owned)
469 Shader* mShader; ///< The shader this renderer uses. (Not owned)
470 VisualRenderer::AnimatableVisualProperties* mVisualProperties{nullptr}; ///< VisualProperties (optional/owned)
471 OwnerPointer<Vector4> mBlendColor; ///< The blend color for blending operation
473 Dali::Internal::Render::Renderer::StencilParameters mStencilParameters; ///< Struct containing all stencil related options
475 uint32_t mIndexedDrawFirstElement; ///< first element index to be drawn using indexed draw
476 uint32_t mIndexedDrawElementsCount; ///< number of elements to be drawn using indexed draw
477 uint32_t mBlendBitmask; ///< The bitmask of blending options
478 uint32_t mRegenerateUniformMap; ///< 2 if the map should be regenerated, 1 if it should be copied.
479 uint32_t mResendFlag; ///< Indicate whether data should be resent to the renderer
481 DepthFunction::Type mDepthFunction : 4; ///< Local copy of the depth function
482 FaceCullingMode::Type mFaceCullingMode : 3; ///< Local copy of the mode of face culling
483 BlendMode::Type mBlendMode : 3; ///< Local copy of the mode of blending
484 DepthWriteMode::Type mDepthWriteMode : 3; ///< Local copy of the depth write mode
485 DepthTestMode::Type mDepthTestMode : 3; ///< Local copy of the depth test mode
486 DevelRenderer::Rendering::Type mRenderingBehavior : 2; ///< The rendering behavior
487 bool mUniformMapChanged[2]; ///< Records if the uniform map has been altered this frame
488 bool mPremultipledAlphaEnabled : 1; ///< Flag indicating whether the Pre-multiplied Alpha Blending is required
490 std::vector<Dali::DevelRenderer::DrawCommand> mDrawCommands;
493 AnimatableProperty<float> mOpacity; ///< The opacity value
494 int32_t mDepthIndex; ///< Used only in PrepareRenderInstructions
498 inline void SetTexturesMessage(EventThreadServices& eventThreadServices, const Renderer& renderer, const TextureSet& textureSet)
500 using LocalType = MessageValue1<Renderer, TextureSet*>;
502 // Reserve some memory inside the message queue
503 uint32_t* slot = eventThreadServices.ReserveMessageSlot(sizeof(LocalType));
505 // Construct message in the message queue memory; note that delete should not be called on the return value
506 new(slot) LocalType(&renderer, &Renderer::SetTextures, const_cast<TextureSet*>(&textureSet));
509 inline void SetGeometryMessage(EventThreadServices& eventThreadServices, const Renderer& renderer, const Render::Geometry& geometry)
511 using LocalType = MessageValue1<Renderer, Render::Geometry*>;
513 // Reserve some memory inside the message queue
514 uint32_t* slot = eventThreadServices.ReserveMessageSlot(sizeof(LocalType));
516 // Construct message in the message queue memory; note that delete should not be called on the return value
517 new(slot) LocalType(&renderer, &Renderer::SetGeometry, const_cast<Render::Geometry*>(&geometry));
520 inline void SetShaderMessage(EventThreadServices& eventThreadServices, const Renderer& renderer, const Shader& shader)
522 using LocalType = MessageValue1<Renderer, Shader*>;
524 // Reserve some memory inside the message queue
525 uint32_t* slot = eventThreadServices.ReserveMessageSlot(sizeof(LocalType));
527 // Construct message in the message queue memory; note that delete should not be called on the return value
528 new(slot) LocalType(&renderer, &Renderer::SetShader, const_cast<Shader*>(&shader));
531 inline void SetDepthIndexMessage(EventThreadServices& eventThreadServices, const Renderer& renderer, int depthIndex)
533 using LocalType = MessageValue1<Renderer, int>;
535 // Reserve some memory inside the message queue
536 uint32_t* slot = eventThreadServices.ReserveMessageSlot(sizeof(LocalType));
538 // Construct message in the message queue memory; note that delete should not be called on the return value
539 new(slot) LocalType(&renderer, &Renderer::SetDepthIndex, depthIndex);
542 inline void SetFaceCullingModeMessage(EventThreadServices& eventThreadServices, const Renderer& renderer, FaceCullingMode::Type faceCullingMode)
544 using LocalType = MessageValue1<Renderer, FaceCullingMode::Type>;
546 // Reserve some memory inside the message queue
547 uint32_t* slot = eventThreadServices.ReserveMessageSlot(sizeof(LocalType));
549 new(slot) LocalType(&renderer, &Renderer::SetFaceCullingMode, faceCullingMode);
552 inline void SetBlendModeMessage(EventThreadServices& eventThreadServices, const Renderer& renderer, BlendMode::Type blendingMode)
554 using LocalType = MessageValue1<Renderer, BlendMode::Type>;
556 // Reserve some memory inside the message queue
557 uint32_t* slot = eventThreadServices.ReserveMessageSlot(sizeof(LocalType));
559 new(slot) LocalType(&renderer, &Renderer::SetBlendMode, blendingMode);
562 inline void SetBlendingOptionsMessage(EventThreadServices& eventThreadServices, const Renderer& renderer, uint32_t options)
564 using LocalType = MessageValue1<Renderer, uint32_t>;
566 // Reserve some memory inside the message queue
567 uint32_t* slot = eventThreadServices.ReserveMessageSlot(sizeof(LocalType));
569 new(slot) LocalType(&renderer, &Renderer::SetBlendingOptions, options);
572 inline void SetBlendColorMessage(EventThreadServices& eventThreadServices, const Renderer& renderer, const Vector4& blendColor)
574 using LocalType = MessageValue1<Renderer, Vector4>;
576 // Reserve some memory inside the message queue
577 uint32_t* slot = eventThreadServices.ReserveMessageSlot(sizeof(LocalType));
579 new(slot) LocalType(&renderer, &Renderer::SetBlendColor, blendColor);
582 inline void SetIndexedDrawFirstElementMessage(EventThreadServices& eventThreadServices, const Renderer& renderer, uint32_t firstElement)
584 using LocalType = MessageValue1<Renderer, uint32_t>;
586 // Reserve some memory inside the message queue
587 uint32_t* slot = eventThreadServices.ReserveMessageSlot(sizeof(LocalType));
589 new(slot) LocalType(&renderer, &Renderer::SetIndexedDrawFirstElement, firstElement);
592 inline void SetIndexedDrawElementsCountMessage(EventThreadServices& eventThreadServices, const Renderer& renderer, uint32_t elementsCount)
594 using LocalType = MessageValue1<Renderer, uint32_t>;
596 // Reserve some memory inside the message queue
597 uint32_t* slot = eventThreadServices.ReserveMessageSlot(sizeof(LocalType));
599 new(slot) LocalType(&renderer, &Renderer::SetIndexedDrawElementsCount, elementsCount);
602 inline void SetEnablePreMultipliedAlphaMessage(EventThreadServices& eventThreadServices, const Renderer& renderer, bool preMultiplied)
604 using LocalType = MessageValue1<Renderer, bool>;
606 // Reserve some memory inside the message queue
607 uint32_t* slot = eventThreadServices.ReserveMessageSlot(sizeof(LocalType));
609 new(slot) LocalType(&renderer, &Renderer::EnablePreMultipliedAlpha, preMultiplied);
612 inline void SetDepthWriteModeMessage(EventThreadServices& eventThreadServices, const Renderer& renderer, DepthWriteMode::Type depthWriteMode)
614 using LocalType = MessageValue1<Renderer, DepthWriteMode::Type>;
616 // Reserve some memory inside the message queue
617 uint32_t* slot = eventThreadServices.ReserveMessageSlot(sizeof(LocalType));
619 new(slot) LocalType(&renderer, &Renderer::SetDepthWriteMode, depthWriteMode);
622 inline void SetDepthTestModeMessage(EventThreadServices& eventThreadServices, const Renderer& renderer, DepthTestMode::Type depthTestMode)
624 using LocalType = MessageValue1<Renderer, DepthTestMode::Type>;
626 // Reserve some memory inside the message queue
627 uint32_t* slot = eventThreadServices.ReserveMessageSlot(sizeof(LocalType));
629 new(slot) LocalType(&renderer, &Renderer::SetDepthTestMode, depthTestMode);
632 inline void SetDepthFunctionMessage(EventThreadServices& eventThreadServices, const Renderer& renderer, DepthFunction::Type depthFunction)
634 using LocalType = MessageValue1<Renderer, DepthFunction::Type>;
636 // Reserve some memory inside the message queue
637 uint32_t* slot = eventThreadServices.ReserveMessageSlot(sizeof(LocalType));
639 new(slot) LocalType(&renderer, &Renderer::SetDepthFunction, depthFunction);
642 inline void SetRenderModeMessage(EventThreadServices& eventThreadServices, const Renderer& renderer, RenderMode::Type mode)
644 using LocalType = MessageValue1<Renderer, RenderMode::Type>;
646 // Reserve some memory inside the message queue
647 uint32_t* slot = eventThreadServices.ReserveMessageSlot(sizeof(LocalType));
649 new(slot) LocalType(&renderer, &Renderer::SetRenderMode, mode);
652 inline void SetStencilFunctionMessage(EventThreadServices& eventThreadServices, const Renderer& renderer, StencilFunction::Type stencilFunction)
654 using LocalType = MessageValue1<Renderer, StencilFunction::Type>;
656 // Reserve some memory inside the message queue
657 uint32_t* slot = eventThreadServices.ReserveMessageSlot(sizeof(LocalType));
659 new(slot) LocalType(&renderer, &Renderer::SetStencilFunction, stencilFunction);
662 inline void SetStencilFunctionMaskMessage(EventThreadServices& eventThreadServices, const Renderer& renderer, int mask)
664 using LocalType = MessageValue1<Renderer, int>;
666 // Reserve some memory inside the message queue
667 uint32_t* slot = eventThreadServices.ReserveMessageSlot(sizeof(LocalType));
669 new(slot) LocalType(&renderer, &Renderer::SetStencilFunctionMask, mask);
672 inline void SetStencilFunctionReferenceMessage(EventThreadServices& eventThreadServices, const Renderer& renderer, int stencilFunctionReference)
674 using LocalType = MessageValue1<Renderer, int>;
676 // Reserve some memory inside the message queue
677 uint32_t* slot = eventThreadServices.ReserveMessageSlot(sizeof(LocalType));
679 new(slot) LocalType(&renderer, &Renderer::SetStencilFunctionReference, stencilFunctionReference);
682 inline void SetStencilMaskMessage(EventThreadServices& eventThreadServices, const Renderer& renderer, int stencilMask)
684 using LocalType = MessageValue1<Renderer, int>;
686 // Reserve some memory inside the message queue
687 uint32_t* slot = eventThreadServices.ReserveMessageSlot(sizeof(LocalType));
689 new(slot) LocalType(&renderer, &Renderer::SetStencilMask, stencilMask);
692 inline void SetStencilOperationOnFailMessage(EventThreadServices& eventThreadServices, const Renderer& renderer, StencilOperation::Type stencilOperation)
694 using LocalType = MessageValue1<Renderer, StencilOperation::Type>;
696 // Reserve some memory inside the message queue
697 uint32_t* slot = eventThreadServices.ReserveMessageSlot(sizeof(LocalType));
699 new(slot) LocalType(&renderer, &Renderer::SetStencilOperationOnFail, stencilOperation);
702 inline void SetStencilOperationOnZFailMessage(EventThreadServices& eventThreadServices, const Renderer& renderer, StencilOperation::Type stencilOperation)
704 using LocalType = MessageValue1<Renderer, StencilOperation::Type>;
706 // Reserve some memory inside the message queue
707 uint32_t* slot = eventThreadServices.ReserveMessageSlot(sizeof(LocalType));
709 new(slot) LocalType(&renderer, &Renderer::SetStencilOperationOnZFail, stencilOperation);
712 inline void SetStencilOperationOnZPassMessage(EventThreadServices& eventThreadServices, const Renderer& renderer, StencilOperation::Type stencilOperation)
714 using LocalType = MessageValue1<Renderer, StencilOperation::Type>;
716 // Reserve some memory inside the message queue
717 uint32_t* slot = eventThreadServices.ReserveMessageSlot(sizeof(LocalType));
719 new(slot) LocalType(&renderer, &Renderer::SetStencilOperationOnZPass, stencilOperation);
722 inline void BakeOpacityMessage(EventThreadServices& eventThreadServices, const Renderer& renderer, float opacity)
724 using LocalType = MessageDoubleBuffered1<Renderer, float>;
726 // Reserve some memory inside the message queue
727 uint32_t* slot = eventThreadServices.ReserveMessageSlot(sizeof(LocalType));
729 new(slot) LocalType(&renderer, &Renderer::BakeOpacity, opacity);
732 inline void SetRenderingBehaviorMessage(EventThreadServices& eventThreadServices, const Renderer& renderer, DevelRenderer::Rendering::Type renderingBehavior)
734 using LocalType = MessageValue1<Renderer, DevelRenderer::Rendering::Type>;
736 // Reserve some memory inside the message queue
737 uint32_t* slot = eventThreadServices.ReserveMessageSlot(sizeof(LocalType));
739 new(slot) LocalType(&renderer, &Renderer::SetRenderingBehavior, renderingBehavior);
742 inline void SetDrawCommandsMessage(EventThreadServices& eventThreadServices, const Renderer& renderer, Dali::DevelRenderer::DrawCommand* pDrawCommands, uint32_t size)
744 using LocalType = MessageValue2<Renderer, Dali::DevelRenderer::DrawCommand*, uint32_t>;
746 // Reserve some memory inside the message queue
747 uint32_t* slot = eventThreadServices.ReserveMessageSlot(sizeof(LocalType));
749 new(slot) LocalType(&renderer, &Renderer::SetDrawCommands, pDrawCommands, size);
752 } // namespace SceneGraph
753 } // namespace Internal
756 #endif // DALI_INTERNAL_SCENE_GRAPH_RENDERER_H