Removing rendering backend
[platform/core/uifw/dali-core.git] / dali / internal / update / rendering / scene-graph-renderer.h
1 #ifndef DALI_INTERNAL_SCENE_GRAPH_RENDERER_H
2 #define DALI_INTERNAL_SCENE_GRAPH_RENDERER_H
3
4 /*
5  * Copyright (c) 2018 Samsung Electronics Co., Ltd.
6  *
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
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
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.
18  */
19
20 #include <dali/public-api/rendering/geometry.h>
21 #include <dali/public-api/rendering/renderer.h> // Dali::Renderer
22 #include <dali/internal/common/blending-options.h>
23 #include <dali/internal/common/type-abstraction-enums.h>
24 #include <dali/internal/event/common/event-thread-services.h>
25 #include <dali/internal/update/common/property-owner.h>
26 #include <dali/internal/update/common/uniform-map.h>
27 #include <dali/internal/update/common/scene-graph-connection-change-propagator.h>
28 #include <dali/internal/update/rendering/data-providers/render-data-provider.h>
29 #include <dali/internal/update/rendering/stencil-parameters.h>
30 #include <dali/graphics-api/graphics-api-render-command.h>
31 #include <dali/graphics-api/graphics-api-controller.h>
32
33 namespace Dali
34 {
35
36 namespace Internal
37 {
38
39
40
41 namespace SceneGraph
42 {
43 class Geometry;
44 class SceneController;
45 class TextureSet;
46
47 class Renderer;
48 typedef Dali::Vector< Renderer* > RendererContainer;
49 typedef RendererContainer::Iterator RendererIter;
50 typedef RendererContainer::ConstIterator RendererConstIter;
51
52
53 class Renderer : public PropertyOwner,
54                  public UniformMapDataProvider,
55                  public UniformMap::Observer,
56                  public ConnectionChangePropagator::Observer
57 {
58 public:
59
60   enum Opacity
61   {
62     OPAQUE,
63     TRANSPARENT,
64     TRANSLUCENT
65   };
66
67   /**
68    * Construct a new Renderer
69    */
70   static Renderer* New();
71
72   /**
73    * Destructor
74    */
75   virtual ~Renderer();
76
77   /**
78    * Overriden delete operator
79    * Deletes the renderer from its global memory pool
80    */
81   void operator delete( void* ptr );
82
83   /**
84    * Set the texture set for the renderer
85    * @param[in] textureSet The texture set this renderer will use
86    */
87   void SetTextures( TextureSet* textureSet );
88
89   /**
90    * Returns current texture set object
91    * @return Pointer to the texture set
92    */
93   const TextureSet* GetTextures() const
94   {
95     return mTextureSet;
96   }
97
98   /**
99    * Set the shader for the renderer
100    * @param[in] shader The shader this renderer will use
101    */
102   void SetShader( Shader* shader );
103
104   /**
105    * Get the shader used by this renderer
106    * @return the shader this renderer uses
107    */
108   const Shader& GetShader() const
109   {
110     return *mShader;
111   }
112
113   /**
114    * Set the geometry for the renderer
115    * @param[in] geometry The geometry this renderer will use
116    */
117   void SetGeometry( SceneGraph::Geometry* geometry );
118
119   /**
120    * Get the geometry for the renderer
121    * @return The geometry this renderer will use
122    */
123   SceneGraph::Geometry* GetGeometry() const
124   {
125     return mGeometry;
126   }
127
128   /**
129    * Set the depth index
130    * @param[in] depthIndex the new depth index to use
131    */
132   void SetDepthIndex( int depthIndex );
133
134   /**
135    * @brief Get the depth index
136    * @return The depth index
137    */
138   int GetDepthIndex() const
139   {
140     return mDepthIndex;
141   }
142
143   /**
144    * Set the face culling mode
145    * @param[in] faceCullingMode to use
146    */
147   void SetFaceCullingMode( FaceCullingMode::Type faceCullingMode );
148
149   /**
150    * Set the blending mode
151    * @param[in] blendingMode to use
152    */
153   void SetBlendMode( BlendMode::Type blendingMode );
154
155   /**
156    * Set the blending options. This should only be called from the update thread.
157    * @param[in] options A bitmask of blending options.
158    */
159   void SetBlendingOptions( unsigned int options );
160
161   /**
162    * Set the blend color for blending operation
163    * @param blendColor to pass to GL
164    */
165   void SetBlendColor( const Vector4& blendColor );
166
167   /**
168    * Set the index of first element for indexed draw
169    * @param[in] firstElement index of first element to draw
170    */
171   void SetIndexedDrawFirstElement( size_t firstElement );
172
173   /**
174    * Set the number of elements to draw by indexed draw
175    * @param[in] elementsCount number of elements to draw
176    */
177   void SetIndexedDrawElementsCount( size_t elementsCount );
178
179   /**
180    * @brief Set whether the Pre-multiplied Alpha Blending is required
181    * @param[in] preMultipled whether alpha is pre-multiplied.
182    */
183   void EnablePreMultipliedAlpha( bool preMultipled );
184
185   /**
186    * Sets the depth buffer write mode
187    * @param[in] depthWriteMode The depth buffer write mode
188    */
189   void SetDepthWriteMode( DepthWriteMode::Type depthWriteMode );
190
191   /**
192    * Sets the depth buffer test mode
193    * @param[in] depthTestMode The depth buffer test mode
194    */
195   void SetDepthTestMode( DepthTestMode::Type depthTestMode );
196
197   /**
198    * Sets the depth function
199    * @param[in] depthFunction The depth function
200    */
201   void SetDepthFunction( DepthFunction::Type depthFunction );
202
203   /**
204    * Sets the render mode
205    * @param[in] mode The render mode
206    */
207   void SetRenderMode( RenderMode::Type mode );
208
209   /**
210    * Sets the stencil function
211    * @param[in] stencilFunction The stencil function
212    */
213   void SetStencilFunction( StencilFunction::Type stencilFunction );
214
215   /**
216    * Sets the stencil function mask
217    * @param[in] stencilFunctionMask The stencil function mask
218    */
219   void SetStencilFunctionMask( int stencilFunctionMask );
220
221   /**
222    * Sets the stencil function reference
223    * @param[in] stencilFunctionReference The stencil function reference
224    */
225   void SetStencilFunctionReference( int stencilFunctionReference );
226
227   /**
228    * Sets the stencil mask
229    * @param[in] stencilMask The stencil mask
230    */
231   void SetStencilMask( int stencilMask );
232
233   /**
234    * Sets the stencil operation for when the stencil test fails
235    * @param[in] stencilOperationOnFail The stencil operation
236    */
237   void SetStencilOperationOnFail( StencilOperation::Type stencilOperationOnFail );
238
239   /**
240    * Sets the stencil operation for when the depth test fails
241    * @param[in] stencilOperationOnZFail The stencil operation
242    */
243   void SetStencilOperationOnZFail( StencilOperation::Type stencilOperationOnZFail );
244
245   /**
246    * Sets the stencil operation for when the depth test passes
247    * @param[in] stencilOperationOnZPass The stencil operation
248    */
249   void SetStencilOperationOnZPass( StencilOperation::Type stencilOperationOnZPass );
250
251   /**
252    * Prepare the object for rendering.
253    * This is called by the UpdateManager when an object is due to be rendered in the current frame.
254    * @param[in] updateBufferIndex The current update buffer index.
255    */
256   void PrepareRender( BufferIndex updateBufferIndex );
257
258   /**
259    * AB: preparing the command data
260    * @param controller
261    * @param updateBufferIndex
262    */
263   void PrepareRender( Graphics::API::Controller& controller, BufferIndex updateBufferIndex );
264
265   Graphics::API::RenderCommand& GetGfxRenderCommand()
266   {
267     return *mGfxRenderCommand.get();
268   }
269
270   template<class T>
271   void WriteUniform( const std::string& name, const T& data )
272   {
273     WriteUniform( name, &data, sizeof(T) );
274   }
275
276   void WriteUniform( const std::string& name, const void* data, uint32_t size );
277
278
279   /**
280    * Query whether the renderer is fully opaque, fully transparent or transparent.
281    * @param[in] updateBufferIndex The current update buffer index.
282    * @return OPAQUE if fully opaque, TRANSPARENT if fully transparent and TRANSLUCENT if in between
283    */
284   Opacity GetOpacity( BufferIndex updateBufferIndex, const Node& node ) const;
285
286   /**
287    * Called by the TextureSet to notify to the renderer that it has changed
288    */
289   void TextureSetChanged();
290
291   /**
292    * Called by the TextureSet to notify to the renderer that it is about to be deleted
293    */
294   void TextureSetDeleted();
295
296   /**
297    * Connect the object to the scene graph
298    *
299    * @param[in] bufferIndex The current buffer index - used for sending messages to render thread
300    */
301   void ConnectToSceneGraph( BufferIndex bufferIndex );
302
303   /**
304    * Disconnect the object from the scene graph
305    * @param[in] bufferIndex The current buffer index - used for sending messages to render thread
306    */
307   void DisconnectFromSceneGraph( BufferIndex bufferIndex );
308
309 public: // Implementation of ConnectionChangePropagator
310   /**
311    * @copydoc ConnectionChangePropagator::AddObserver
312    */
313   void AddConnectionObserver(ConnectionChangePropagator::Observer& observer){};
314
315   /**
316    * @copydoc ConnectionChangePropagator::RemoveObserver
317    */
318   void RemoveConnectionObserver(ConnectionChangePropagator::Observer& observer){};
319
320 public: // UniformMap::Observer
321   /**
322    * @copydoc UniformMap::Observer::UniformMappingsChanged
323    */
324   virtual void UniformMappingsChanged( const UniformMap& mappings );
325
326 public: // ConnectionChangePropagator::Observer
327
328   /**
329    * @copydoc ConnectionChangePropagator::ConnectionsChanged
330    */
331   virtual void ConnectionsChanged( PropertyOwner& owner );
332
333   /**
334    * @copydoc ConnectionChangePropagator::ConnectedUniformMapChanged
335    */
336   virtual void ConnectedUniformMapChanged( );
337
338   /**
339    * @copydoc ConnectionChangePropagator::ConnectedUniformMapChanged
340    */
341   virtual void ObservedObjectDestroyed(PropertyOwner& owner);
342
343 public: // PropertyOwner implementation
344   /**
345    * @copydoc Dali::Internal::SceneGraph::PropertyOwner::ResetDefaultProperties()
346    */
347   virtual void ResetDefaultProperties( BufferIndex updateBufferIndex ){};
348
349 public: // From UniformMapDataProvider
350
351   /**
352    * @copydoc UniformMapDataProvider::GetUniformMapChanged
353    */
354   virtual bool GetUniformMapChanged( BufferIndex bufferIndex ) const{ return mUniformMapChanged[bufferIndex];}
355
356   /**
357    * @copydoc UniformMapDataProvider::GetUniformMap
358    */
359   virtual const CollectedUniformMap& GetUniformMap( BufferIndex bufferIndex ) const;
360
361 private:
362
363   /**
364    * Protected constructor; See also Renderer::New()
365    */
366   Renderer();
367
368   /**
369    * Helper function to create a new render data provider
370    * @return the new (initialized) data provider
371    */
372   RenderDataProvider* NewRenderDataProvider();
373
374   /**
375    * Helper function to retrieve the blend color.
376    * @return The blend color.
377    */
378   const Vector4& GetBlendColor() const;
379
380
381 private:
382
383   CollectedUniformMap          mCollectedUniformMap[2];           ///< Uniform maps collected by the renderer
384   std::unique_ptr<RenderDataProvider> mRenderDataProvider;        ///< Contains data for graphics renderer @todo Refactor
385   TextureSet*                  mTextureSet;                       ///< The texture set this renderer uses. (Not owned)
386   SceneGraph::Geometry*        mGeometry;                         ///< The geometry this renderer uses. (Not owned)
387   Shader*                      mShader;                           ///< The shader this renderer uses. (Not owned)
388   OwnerPointer< Vector4 >      mBlendColor;                       ///< The blend color for blending operation
389
390   StencilParameters            mStencilParameters;                ///< Struct containing all stencil related options
391
392   size_t                       mIndexedDrawFirstElement;          ///< first element index to be drawn using indexed draw
393   size_t                       mIndexedDrawElementsCount;         ///< number of elements to be drawn using indexed draw
394   unsigned int                 mBlendBitmask;                     ///< The bitmask of blending options
395   unsigned int                 mRegenerateUniformMap;             ///< 2 if the map should be regenerated, 1 if it should be copied.
396   unsigned int                 mResendFlag;                       ///< Indicate whether data should be resent to the renderer
397
398   DepthFunction::Type          mDepthFunction:3;                  ///< Local copy of the depth function
399   FaceCullingMode::Type        mFaceCullingMode:2;                ///< Local copy of the mode of face culling
400   BlendMode::Type              mBlendMode:2;                      ///< Local copy of the mode of blending
401   DepthWriteMode::Type         mDepthWriteMode:2;                 ///< Local copy of the depth write mode
402   DepthTestMode::Type          mDepthTestMode:2;                  ///< Local copy of the depth test mode
403
404   bool                         mUniformMapChanged[2];             ///< Records if the uniform map has been altered this frame
405   bool                         mPremultipledAlphaEnabled:1;       ///< Flag indicating whether the Pre-multiplied Alpha Blending is required
406
407   std::vector<std::vector<char>> mUboMemory;                      ///< Transient memory allocated for each UBO
408   std::unique_ptr<Graphics::API::RenderCommand> mGfxRenderCommand;
409
410 public:
411   int                          mDepthIndex;                       ///< Used only in PrepareRenderInstructions
412 };
413
414
415 /// Messages
416 inline void SetTexturesMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, const TextureSet& textureSet )
417 {
418   typedef MessageValue1< Renderer, TextureSet* > LocalType;
419
420   // Reserve some memory inside the message queue
421   unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
422
423   // Construct message in the message queue memory; note that delete should not be called on the return value
424   new (slot) LocalType( &renderer, &Renderer::SetTextures, const_cast<TextureSet*>(&textureSet) );
425 }
426
427 inline void SetGeometryMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, const SceneGraph::Geometry& geometry )
428 {
429   typedef MessageValue1< Renderer, SceneGraph::Geometry* > LocalType;
430
431   // Reserve some memory inside the message queue
432   unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
433
434   // Construct message in the message queue memory; note that delete should not be called on the return value
435   new (slot) LocalType( &renderer, &Renderer::SetGeometry, const_cast<SceneGraph::Geometry*>(&geometry) );
436 }
437
438 inline void SetShaderMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, Shader& shader )
439 {
440   typedef MessageValue1< Renderer, Shader* > LocalType;
441
442   // Reserve some memory inside the message queue
443   unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
444
445   // Construct message in the message queue memory; note that delete should not be called on the return value
446   new (slot) LocalType( &renderer, &Renderer::SetShader, &shader );
447 }
448
449 inline void SetDepthIndexMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, int depthIndex )
450 {
451   typedef MessageValue1< Renderer, int > LocalType;
452
453   // Reserve some memory inside the message queue
454   unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
455
456   // Construct message in the message queue memory; note that delete should not be called on the return value
457   new (slot) LocalType( &renderer, &Renderer::SetDepthIndex, depthIndex );
458 }
459
460 inline void SetFaceCullingModeMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, FaceCullingMode::Type faceCullingMode )
461 {
462   typedef MessageValue1< Renderer, FaceCullingMode::Type > LocalType;
463
464   // Reserve some memory inside the message queue
465   unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
466
467   new (slot) LocalType( &renderer, &Renderer::SetFaceCullingMode, faceCullingMode );
468 }
469
470 inline void SetBlendModeMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, BlendMode::Type blendingMode )
471 {
472   typedef MessageValue1< Renderer, BlendMode::Type > LocalType;
473
474   // Reserve some memory inside the message queue
475   unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
476
477   new (slot) LocalType( &renderer, &Renderer::SetBlendMode, blendingMode );
478 }
479
480 inline void SetBlendingOptionsMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, unsigned int options )
481 {
482   typedef MessageValue1< Renderer, unsigned int > LocalType;
483
484   // Reserve some memory inside the message queue
485   unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
486
487   new (slot) LocalType( &renderer, &Renderer::SetBlendingOptions, options );
488 }
489
490 inline void SetBlendColorMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, const Vector4& blendColor )
491 {
492   typedef MessageValue1< Renderer, Vector4 > LocalType;
493
494   // Reserve some memory inside the message queue
495   unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
496
497   new (slot) LocalType( &renderer, &Renderer::SetBlendColor, blendColor );
498 }
499
500 inline void SetIndexedDrawFirstElementMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, size_t firstElement )
501 {
502   typedef MessageValue1< Renderer, size_t > LocalType;
503
504   // Reserve some memory inside the message queue
505   unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
506
507   new (slot) LocalType( &renderer, &Renderer::SetIndexedDrawFirstElement, firstElement );
508 }
509
510 inline void SetIndexedDrawElementsCountMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, size_t elementsCount )
511 {
512   typedef MessageValue1< Renderer, size_t > LocalType;
513
514   // Reserve some memory inside the message queue
515   unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
516
517   new (slot) LocalType( &renderer, &Renderer::SetIndexedDrawElementsCount, elementsCount );
518 }
519
520 inline void SetEnablePreMultipliedAlphaMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, bool preMultiplied )
521 {
522   typedef MessageValue1< Renderer, bool > LocalType;
523
524   // Reserve some memory inside the message queue
525   unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
526
527   new (slot) LocalType( &renderer, &Renderer::EnablePreMultipliedAlpha, preMultiplied );
528 }
529
530 inline void SetDepthWriteModeMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, DepthWriteMode::Type depthWriteMode )
531 {
532   typedef MessageValue1< Renderer, DepthWriteMode::Type > LocalType;
533
534   // Reserve some memory inside the message queue
535   unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
536
537   new (slot) LocalType( &renderer, &Renderer::SetDepthWriteMode, depthWriteMode );
538 }
539
540 inline void SetDepthTestModeMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, DepthTestMode::Type depthTestMode )
541 {
542   typedef MessageValue1< Renderer, DepthTestMode::Type > LocalType;
543
544   // Reserve some memory inside the message queue
545   unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
546
547   new (slot) LocalType( &renderer, &Renderer::SetDepthTestMode, depthTestMode );
548 }
549
550 inline void SetDepthFunctionMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, DepthFunction::Type depthFunction )
551 {
552   typedef MessageValue1< Renderer, DepthFunction::Type > LocalType;
553
554   // Reserve some memory inside the message queue
555   unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
556
557   new (slot) LocalType( &renderer, &Renderer::SetDepthFunction, depthFunction );
558 }
559
560 inline void SetRenderModeMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, RenderMode::Type mode )
561 {
562   typedef MessageValue1< Renderer, RenderMode::Type > LocalType;
563
564   // Reserve some memory inside the message queue
565   unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
566
567   new (slot) LocalType( &renderer, &Renderer::SetRenderMode, mode );
568 }
569
570 inline void SetStencilFunctionMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, StencilFunction::Type stencilFunction )
571 {
572   typedef MessageValue1< Renderer, StencilFunction::Type > LocalType;
573
574   // Reserve some memory inside the message queue
575   unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
576
577   new (slot) LocalType( &renderer, &Renderer::SetStencilFunction, stencilFunction );
578 }
579
580 inline void SetStencilFunctionMaskMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, int mask )
581 {
582   typedef MessageValue1< Renderer, int > LocalType;
583
584   // Reserve some memory inside the message queue
585   unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
586
587   new (slot) LocalType( &renderer, &Renderer::SetStencilFunctionMask, mask );
588 }
589
590 inline void SetStencilFunctionReferenceMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, int stencilFunctionReference )
591 {
592   typedef MessageValue1< Renderer, int > LocalType;
593
594   // Reserve some memory inside the message queue
595   unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
596
597   new (slot) LocalType( &renderer, &Renderer::SetStencilFunctionReference, stencilFunctionReference );
598 }
599
600 inline void SetStencilMaskMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, int stencilMask )
601 {
602   typedef MessageValue1< Renderer, int > LocalType;
603
604   // Reserve some memory inside the message queue
605   unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
606
607   new (slot) LocalType( &renderer, &Renderer::SetStencilMask, stencilMask );
608 }
609
610 inline void SetStencilOperationOnFailMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, StencilOperation::Type stencilOperation )
611 {
612   typedef MessageValue1< Renderer, StencilOperation::Type > LocalType;
613
614   // Reserve some memory inside the message queue
615   unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
616
617   new (slot) LocalType( &renderer, &Renderer::SetStencilOperationOnFail, stencilOperation );
618 }
619
620 inline void SetStencilOperationOnZFailMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, StencilOperation::Type stencilOperation )
621 {
622   typedef MessageValue1< Renderer, StencilOperation::Type > LocalType;
623
624   // Reserve some memory inside the message queue
625   unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
626
627   new (slot) LocalType( &renderer, &Renderer::SetStencilOperationOnZFail, stencilOperation );
628 }
629
630 inline void SetStencilOperationOnZPassMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, StencilOperation::Type stencilOperation )
631 {
632   typedef MessageValue1< Renderer, StencilOperation::Type > LocalType;
633
634   // Reserve some memory inside the message queue
635   unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
636
637   new (slot) LocalType( &renderer, &Renderer::SetStencilOperationOnZPass, stencilOperation );
638 }
639
640 } // namespace SceneGraph
641 } // namespace Internal
642 } // namespace Dali
643
644 #endif //  DALI_INTERNAL_SCENE_GRAPH_RENDERER_H