2 * Copyright (c) 2017 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 #include <dali/internal/event/common/stage-impl.h>
24 #include <cstring> // for strcmp
27 #include <dali/integration-api/system-overlay.h>
28 #include <dali/internal/event/actors/layer-impl.h>
29 #include <dali/internal/event/actors/layer-list.h>
30 #include <dali/internal/event/actors/camera-actor-impl.h>
31 #include <dali/internal/event/common/system-overlay-impl.h>
32 #include <dali/internal/event/common/thread-local-storage.h>
33 #include <dali/internal/event/common/property-notification-manager.h>
34 #include <dali/internal/event/render-tasks/render-task-list-impl.h>
35 #include <dali/internal/update/nodes/node.h>
36 #include <dali/internal/event/common/object-registry-impl.h>
37 #include <dali/integration-api/platform-abstraction.h>
38 #include <dali/public-api/common/constants.h>
39 #include <dali/public-api/events/touch-data.h>
40 #include <dali/public-api/object/type-registry.h>
41 #include <dali/public-api/render-tasks/render-task-list.h>
43 using Dali::Internal::SceneGraph::Node;
47 #if defined(DEBUG_ENABLED)
48 Debug::Filter* gLogFilter = Debug::Filter::New(Debug::NoLogging, false, "LOG_DEPTH_TIMER" );
61 const float DEFAULT_STEREO_BASE( 65.0f );
65 const char* const SIGNAL_KEY_EVENT = "keyEvent";
66 const char* const SIGNAL_KEY_EVENT_GENERATED = "keyEventGenerated";
67 const char* const SIGNAL_EVENT_PROCESSING_FINISHED = "eventProcessingFinished";
68 const char* const SIGNAL_TOUCHED = "touched";
69 const char* const SIGNAL_TOUCH = "touch";
70 const char* const SIGNAL_WHEEL_EVENT = "wheelEvent";
71 const char* const SIGNAL_CONTEXT_LOST = "contextLost";
72 const char* const SIGNAL_CONTEXT_REGAINED = "contextRegained";
73 const char* const SIGNAL_SCENE_CREATED = "sceneCreated";
75 TypeRegistration mType( typeid(Dali::Stage), typeid(Dali::BaseHandle), NULL );
77 SignalConnectorType signalConnector1( mType, SIGNAL_KEY_EVENT, &Stage::DoConnectSignal );
78 SignalConnectorType signalConnector2( mType, SIGNAL_EVENT_PROCESSING_FINISHED, &Stage::DoConnectSignal );
79 SignalConnectorType signalConnector3( mType, SIGNAL_TOUCHED, &Stage::DoConnectSignal );
80 SignalConnectorType signalConnector4( mType, SIGNAL_WHEEL_EVENT, &Stage::DoConnectSignal );
81 SignalConnectorType signalConnector5( mType, SIGNAL_CONTEXT_LOST, &Stage::DoConnectSignal );
82 SignalConnectorType signalConnector6( mType, SIGNAL_CONTEXT_REGAINED, &Stage::DoConnectSignal );
83 SignalConnectorType signalConnector7( mType, SIGNAL_SCENE_CREATED, &Stage::DoConnectSignal );
84 SignalConnectorType signalConnector8( mType, SIGNAL_KEY_EVENT_GENERATED, &Stage::DoConnectSignal );
85 SignalConnectorType signalConnector9( mType, SIGNAL_TOUCH, &Stage::DoConnectSignal );
87 } // unnamed namespace
89 StagePtr Stage::New( AnimationPlaylist& playlist,
90 PropertyNotificationManager& propertyNotificationManager,
91 SceneGraph::UpdateManager& updateManager,
92 NotificationManager& notificationManager,
93 Integration::RenderController& renderController )
95 return StagePtr( new Stage( playlist, propertyNotificationManager, updateManager, notificationManager, renderController ) );
98 void Stage::Initialize()
100 mObjectRegistry = ObjectRegistry::New();
102 // Create the ordered list of layers
103 mLayerList = LayerList::New( mUpdateManager, false/*not system-level*/ );
105 // The stage owns the default layer
106 mRootLayer = Layer::NewRoot( *mLayerList, mUpdateManager, false/*not system-level*/ );
107 mRootLayer->SetName("RootLayer");
108 // The root layer needs to have a fixed resize policy (as opposed to the default USE_NATURAL_SIZE).
109 // This stops actors parented to the stage having their relayout requests propagating
110 // up to the root layer, and down through other children unnecessarily.
111 mRootLayer->SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS );
113 // Create the default camera actor first; this is needed by the RenderTaskList
114 CreateDefaultCameraActor();
116 // Create the list of render-tasks
117 mRenderTaskList = RenderTaskList::New( *this, *this, false/*not system-level*/ );
119 // Create the default render-task
120 Dali::RenderTask defaultRenderTask = mRenderTaskList->CreateTask();
123 void Stage::Uninitialize()
125 // Remove actors added to SystemOverlay
126 delete mSystemOverlay;
127 mSystemOverlay = NULL;
131 // its enough to release the handle so the object is released
132 // don't need to remove it from root actor as root actor will delete the object
133 mDefaultCamera.Reset();
138 // we are closing down so just delete the root, no point emit disconnect
139 // signals or send messages to update
144 StagePtr Stage::GetCurrent()
146 StagePtr stage( NULL );
147 // no checking in this version
148 ThreadLocalStorage* tls = ThreadLocalStorage::GetInternal();
151 stage = tls->GetCurrentStage();
156 bool Stage::IsInstalled()
158 return ThreadLocalStorage::Created();
161 ObjectRegistry& Stage::GetObjectRegistry()
163 return *mObjectRegistry;
166 void Stage::RegisterObject( Dali::BaseObject* object )
168 mObjectRegistry->RegisterObject( object );
171 void Stage::UnregisterObject( Dali::BaseObject* object )
173 mObjectRegistry->UnregisterObject( object );
176 Layer& Stage::GetRootActor()
181 AnimationPlaylist& Stage::GetAnimationPlaylist()
183 return mAnimationPlaylist;
186 PropertyNotificationManager& Stage::GetPropertyNotificationManager()
188 return mPropertyNotificationManager;
191 void Stage::Add( Actor& actor )
193 mRootLayer->Add( actor );
196 void Stage::Remove( Actor& actor )
198 mRootLayer->Remove( actor );
201 void Stage::SurfaceResized( float width, float height )
203 if( ( fabs( width - mSurfaceSize.width ) > Math::MACHINE_EPSILON_1000 ) || ( fabs( height - mSurfaceSize.height ) > Math::MACHINE_EPSILON_1000 ) )
205 mSurfaceSize.width = width;
206 mSurfaceSize.height = height;
208 // Internally we want to report the actual size of the stage.
210 mSize.height = height - mTopMargin;
212 // Calculates the aspect ratio, near and far clipping planes, field of view and camera Z position.
213 mDefaultCamera->SetPerspectiveProjection( mSurfaceSize );
215 // Adjust the camera height to allow for top-margin
216 SetDefaultCameraPosition();
218 mRootLayer->SetSize( mSize.width, mSize.height );
220 // Repeat for SystemOverlay actors
223 // Note that the SystemOverlay has a separate camera, configured for the full surface-size.
224 // This will remain unaffected by changes in SetDefaultCameraPosition()
225 mSystemOverlay->GetImpl()->SetSize( width, height );
228 SetDefaultSurfaceRectMessage( mUpdateManager, Rect<int>( 0, 0, width, height ) );
230 // if single render task to screen then set its viewport parameters
231 if( 1 == mRenderTaskList->GetTaskCount() )
233 Dali::RenderTask mDefaultRenderTask = mRenderTaskList->GetTask( 0u );
235 if(!mDefaultRenderTask.GetTargetFrameBuffer())
237 mDefaultRenderTask.SetViewport( Viewport(0, 0, width, height) );
243 Vector2 Stage::GetSize() const
248 void Stage::SetTopMargin( unsigned int margin )
250 if (mTopMargin == margin)
256 mSize.width = mSurfaceSize.width;
257 mSize.height = mSurfaceSize.height - mTopMargin;
259 // Adjust the camera height to allow for top-margin
260 SetDefaultCameraPosition();
262 mRootLayer->SetSize( mSize.width, mSize.height );
265 RenderTaskList& Stage::GetRenderTaskList() const
267 return *mRenderTaskList;
270 void Stage::CreateDefaultCameraActor()
272 // The default camera attributes and position is such that
273 // children of the default layer, can be positioned at (0,0) and
274 // be at the top-left of the viewport.
275 mDefaultCamera = CameraActor::New( Size::ZERO );
276 mDefaultCamera->SetParentOrigin(ParentOrigin::CENTER);
277 Add(*(mDefaultCamera.Get()));
280 void Stage::SetDefaultCameraPosition()
282 mDefaultCamera->SetY( -(static_cast<float>(mTopMargin) * 0.5f) );
285 Actor& Stage::GetDefaultRootActor()
290 CameraActor& Stage::GetDefaultCameraActor()
292 return *mDefaultCamera;
295 unsigned int Stage::GetLayerCount() const
297 return mLayerList->GetLayerCount();
300 Dali::Layer Stage::GetLayer( unsigned int depth ) const
302 return Dali::Layer(mLayerList->GetLayer( depth ));
305 Dali::Layer Stage::GetRootLayer() const
307 return Dali::Layer( mRootLayer.Get() );
310 LayerList& Stage::GetLayerList()
315 Integration::SystemOverlay& Stage::GetSystemOverlay()
317 // Lazily create system-level if requested
318 if( !mSystemOverlay )
320 mSystemOverlay = new Integration::SystemOverlay( SystemOverlay::New( *this ) );
321 DALI_ASSERT_ALWAYS( NULL != mSystemOverlay && "Failed to create system overlay" );
323 mSystemOverlay->GetImpl()->SetSize( mSize.width, mSize.height );
326 return *mSystemOverlay;
329 SystemOverlay* Stage::GetSystemOverlayInternal()
331 SystemOverlay* overlay( NULL );
335 overlay = mSystemOverlay->GetImpl();
341 void Stage::SetViewMode( ViewMode viewMode )
343 if( mViewMode != viewMode )
345 DALI_LOG_INFO( Debug::Filter::gActor, Debug::Concise, "View mode changed from %d to %d\n", mViewMode, viewMode);
347 if( mViewMode == MONO )
349 mDefaultCamera->SetOrientation( Dali::ANGLE_180, Vector3::YAXIS );
350 mRenderTaskList->GetTask(0).SetSourceActor( Dali::Actor() );
352 //Create camera and RenderTask for left eye
353 mLeftCamera = CameraActor::New( Size::ZERO );
354 mLeftCamera->SetParentOrigin( ParentOrigin::CENTER );
355 mDefaultCamera->Add( *mLeftCamera.Get() );
356 mLeftRenderTask = mRenderTaskList->CreateTask();
357 mLeftRenderTask.SetCameraActor( Dali::CameraActor( mLeftCamera.Get() ) );
358 mLeftCamera->SetType( Dali::Camera::FREE_LOOK );
360 //Create camera and RenderTask for right eye
361 mRightCamera = CameraActor::New( Size::ZERO );
362 mRightCamera->SetParentOrigin( ParentOrigin::CENTER );
363 mDefaultCamera->Add( *mRightCamera.Get() );
364 mRightRenderTask = mRenderTaskList->CreateTask();
365 mRightRenderTask.SetClearColor( Vector4( 1.0f,0.0f,0.0f,1.0f));
367 mRightRenderTask.SetCameraActor( Dali::CameraActor( mRightCamera.Get() ) );
368 mRightCamera->SetType( Dali::Camera::FREE_LOOK );
372 mViewMode = viewMode;
378 // delete extra stereoscopic render tasks and cameras
379 mRenderTaskList->RemoveTask( mLeftRenderTask );
380 mDefaultCamera->Remove( *mLeftCamera.Get() );
381 mLeftRenderTask.Reset();
383 mRenderTaskList->RemoveTask( mRightRenderTask );
384 mDefaultCamera->Remove( *mRightCamera.Get() );
385 mRightRenderTask.Reset();
386 mRightCamera.Reset();
387 mDefaultCamera->SetOrientation( Dali::ANGLE_0, Vector3::YAXIS );
388 mDefaultCamera->SetType( Dali::Camera::LOOK_AT_TARGET );
389 mRenderTaskList->GetTask(0).SetSourceActor( Dali::Layer(mRootLayer.Get()) );
393 case STEREO_HORIZONTAL:
395 //Stereo mode with horizontal split is for landscape mode. That's the reason for the cameras being rotated
396 //Top camera renders the scene as seen from the right eye and bottom camera as seen from left.
398 //Calculate separation in pixels along vertical axis ( mStereoBase is defined in millimetres )
399 const float stereoBase( ( (mStereoBase / 25.4f) * GetDpi().y ) * 0.5f );
401 //Calculate aspect ratio
402 float aspect = mSize.width / (mSize.height * 0.5f);
404 mLeftCamera->SetPerspectiveProjection( mSize, Vector2( 0.0f,stereoBase) );
405 mLeftCamera->SetAspectRatio( aspect );
407 mLeftCamera->SetOrientation( -Dali::ANGLE_90, Vector3::ZAXIS );
408 mLeftCamera->SetPosition( Vector3( stereoBase, 0.0f, 0.0f ) );
409 mLeftRenderTask.SetViewport( Viewport(0, mSize.height * 0.5f, mSize.width, mSize.height * 0.5f) );
411 mRightCamera->SetPerspectiveProjection( mSize, Vector2( 0.0, -stereoBase) );
412 mRightCamera->SetAspectRatio( aspect );
413 mRightCamera->SetOrientation( -Dali::ANGLE_90, Vector3::ZAXIS );
414 mRightCamera->SetPosition( Vector3(-stereoBase, 0.0f, 0.0f ) );
415 mRightRenderTask.SetViewport( Viewport(0, 0, mSize.width, mSize.height * 0.5f ) );
419 case STEREO_VERTICAL:
421 //Calculate separation in pixels along horizontal axis
422 const float stereoBase( ( (mStereoBase / 25.4f) * GetDpi().x ) * 0.5f );
424 //Recalculate fov based on viewport size
425 const float fov = 2.0f * std::atan( mSize.y / (2.0f * std::max( mSize.x*0.5f, mSize.y )) );
427 mLeftCamera->SetPerspectiveProjection( Size( mSize.x * 0.5f, mSize.y ), Vector2(stereoBase,0.0f) );
428 mLeftCamera->SetFieldOfView( fov );
429 mLeftCamera->SetOrientation( Dali::ANGLE_0, Vector3::ZAXIS );
430 mLeftCamera->SetPosition( Vector3( stereoBase, 0.0f, 0.0f ) );
431 mLeftRenderTask.SetViewport( Viewport(0, 0, mSize.width * 0.5f, mSize.height ) );
433 mRightCamera->SetPerspectiveProjection( Size( mSize.x * 0.5f, mSize.y ), Vector2(-stereoBase,0.0f) );
434 mRightCamera->SetFieldOfView( fov );
435 mRightCamera->SetOrientation( Dali::ANGLE_0, Vector3::ZAXIS );
436 mRightCamera->SetPosition( Vector3( -stereoBase, 0.0f, 0.0f ) );
437 mRightRenderTask.SetViewport( Viewport(mSize.width * 0.5f, 0, mSize.width * 0.5f, mSize.height ) );
441 case STEREO_INTERLACED:
449 ViewMode Stage::GetViewMode() const
454 void Stage::SetStereoBase( float stereoBase )
456 if( ! Equals( mStereoBase, stereoBase ) )
458 DALI_LOG_INFO( Debug::Filter::gActor, Debug::Concise, "old( %.2f) new(%.2f)\n", mStereoBase, stereoBase );
459 mStereoBase = stereoBase;
463 case STEREO_HORIZONTAL:
465 stereoBase = mStereoBase / 25.4f * GetDpi().y * 0.5f;
466 float aspect = mSize.width / (mSize.height * 0.5f);
468 mLeftCamera->SetPerspectiveProjection( mSize, Vector2( 0.0, stereoBase) );
469 mLeftCamera->SetAspectRatio( aspect );
470 mLeftCamera->SetPosition( Vector3( stereoBase, 0.0f, 0.0f ) );
472 mRightCamera->SetPerspectiveProjection( mSize, Vector2( 0.0, -stereoBase) );
473 mRightCamera->SetAspectRatio( aspect );
474 mRightCamera->SetPosition( Vector3(-stereoBase, 0.0f, 0.0f ) );
478 case STEREO_VERTICAL:
480 stereoBase = mStereoBase / 25.4f * GetDpi().x * 0.5f;
481 const float fov = 2.0f * std::atan( mSize.y / (2.0f * std::max( mSize.x*0.5f, mSize.y )) );
483 mLeftCamera->SetPerspectiveProjection( Size( mSize.x * 0.5f, mSize.y ), Vector2(stereoBase,0.0f) );
484 mLeftCamera->SetFieldOfView( fov );
485 mLeftCamera->SetPosition( Vector3( stereoBase, 0.0f, 0.0f ) );
487 mRightCamera->SetPerspectiveProjection( Size( mSize.x * 0.5f, mSize.y ), Vector2(-stereoBase,0.0f) );
488 mRightCamera->SetFieldOfView( fov );
489 mRightCamera->SetPosition( Vector3(-stereoBase, 0.0f, 0.0f ) );
499 float Stage::GetStereoBase() const
504 void Stage::SetBackgroundColor(Vector4 color)
506 // Cache for public GetBackgroundColor()
507 mBackgroundColor = color;
509 // Send message to change color in next frame
510 SetBackgroundColorMessage( mUpdateManager, color );
513 Vector4 Stage::GetBackgroundColor() const
515 return mBackgroundColor;
518 Vector2 Stage::GetDpi() const
523 void Stage::SetDpi(Vector2 dpi)
528 void Stage::KeepRendering( float durationSeconds )
530 // Send message to keep rendering
531 KeepRenderingMessage( mUpdateManager, durationSeconds );
534 bool Stage::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor )
536 bool connected( true );
537 Stage* stage = static_cast< Stage* >(object); // TypeRegistry guarantees that this is the correct type.
539 if( 0 == strcmp( signalName.c_str(), SIGNAL_KEY_EVENT ) )
541 stage->KeyEventSignal().Connect( tracker, functor );
543 else if( 0 == strcmp( signalName.c_str(), SIGNAL_KEY_EVENT_GENERATED ) )
545 stage->KeyEventGeneratedSignal().Connect( tracker, functor );
547 else if( 0 == strcmp( signalName.c_str(), SIGNAL_EVENT_PROCESSING_FINISHED ) )
549 stage->EventProcessingFinishedSignal().Connect( tracker, functor );
551 else if( 0 == strcmp( signalName.c_str(), SIGNAL_TOUCHED ) )
553 stage->TouchedSignal().Connect( tracker, functor );
555 else if( 0 == strcmp( signalName.c_str(), SIGNAL_TOUCH ) )
557 stage->TouchSignal().Connect( tracker, functor );
559 else if( 0 == strcmp( signalName.c_str(), SIGNAL_WHEEL_EVENT ) )
561 stage->WheelEventSignal().Connect( tracker, functor );
563 else if( 0 == strcmp( signalName.c_str(), SIGNAL_CONTEXT_LOST ) )
565 stage->ContextLostSignal().Connect( tracker, functor );
567 else if( 0 == strcmp( signalName.c_str(), SIGNAL_CONTEXT_REGAINED ) )
569 stage->ContextRegainedSignal().Connect( tracker, functor );
571 else if( 0 == strcmp( signalName.c_str(), SIGNAL_SCENE_CREATED ) )
573 stage->SceneCreatedSignal().Connect( tracker, functor );
577 // signalName does not match any signal
584 void Stage::EmitKeyEventSignal(const KeyEvent& event)
586 // Emit the key event signal when no actor in the stage has gained the key input focus
588 mKeyEventSignal.Emit( event );
591 bool Stage::EmitKeyEventGeneratedSignal(const KeyEvent& event)
593 // Emit the KeyEventGenerated signal when KeyEvent is generated
595 return mKeyEventGeneratedSignal.Emit( event );
598 void Stage::EmitEventProcessingFinishedSignal()
600 mEventProcessingFinishedSignal.Emit();
603 void Stage::EmitTouchedSignal( const TouchEvent& touchEvent, const Dali::TouchData& touch )
605 mTouchedSignal.Emit( touchEvent );
606 mTouchSignal.Emit( touch );
609 void Stage::EmitWheelEventSignal(const WheelEvent& event)
611 // Emit the wheel event signal when no actor in the stage has gained the wheel input focus
613 mWheelEventSignal.Emit( event );
616 void Stage::EmitSceneCreatedSignal()
618 mSceneCreatedSignal.Emit();
621 Dali::Stage::KeyEventSignalType& Stage::KeyEventSignal()
623 return mKeyEventSignal;
626 Dali::DevelStage::KeyEventGeneratedSignalType& Stage::KeyEventGeneratedSignal()
628 return mKeyEventGeneratedSignal;
631 Dali::Stage::EventProcessingFinishedSignalType& Stage::EventProcessingFinishedSignal()
633 return mEventProcessingFinishedSignal;
636 Dali::Stage::TouchedSignalType& Stage::TouchedSignal()
638 DALI_LOG_WARNING( "Deprecated. Use TouchSignal() instead.\n" );
639 return mTouchedSignal;
642 Dali::Stage::TouchSignalType& Stage::TouchSignal()
647 Dali::Stage::WheelEventSignalType& Stage::WheelEventSignal()
649 return mWheelEventSignal;
652 Dali::Stage::ContextStatusSignal& Stage::ContextLostSignal()
654 return mContextLostSignal;
657 Dali::Stage::ContextStatusSignal& Stage::ContextRegainedSignal()
659 return mContextRegainedSignal;
662 Dali::Stage::SceneCreatedSignalType& Stage::SceneCreatedSignal()
664 return mSceneCreatedSignal;
667 void Stage::NotifyContextLost()
669 mContextLostSignal.Emit();
672 void Stage::NotifyContextRegained()
674 mContextRegainedSignal.Emit();
678 void Stage::RequestRebuildDepthTree()
680 DALI_LOG_INFO(gLogFilter, Debug::General, "RequestRebuildDepthTree()\n");
681 mDepthTreeDirty = true;
684 void Stage::RebuildDepthTree()
686 // If the depth tree needs rebuilding, do it in this frame only.
687 if( mDepthTreeDirty )
689 DALI_LOG_INFO(gLogFilter, Debug::Concise, "RebuildDepthTree() dirty:T\n");
691 ActorPtr actor( mRootLayer.Get() );
692 actor->RebuildDepthTree();
693 mDepthTreeDirty = false;
698 Stage::Stage( AnimationPlaylist& playlist,
699 PropertyNotificationManager& propertyNotificationManager,
700 SceneGraph::UpdateManager& updateManager,
701 NotificationManager& notificationManager,
702 Integration::RenderController& renderController )
703 : mAnimationPlaylist( playlist ),
704 mPropertyNotificationManager( propertyNotificationManager ),
705 mUpdateManager( updateManager ),
706 mNotificationManager( notificationManager ),
707 mRenderController( renderController ),
708 mSize( Vector2::ZERO ),
709 mBackgroundColor( Dali::Stage::DEFAULT_BACKGROUND_COLOR ),
711 mStereoBase( DEFAULT_STEREO_BASE ),
713 mSystemOverlay( NULL ),
714 mDepthTreeDirty( false ),
715 mForceNextUpdate( false )
719 SceneGraph::UpdateManager& Stage::GetUpdateManager()
721 return mUpdateManager;
724 Integration::RenderController& Stage::GetRenderController()
726 return mRenderController;
729 unsigned int* Stage::ReserveMessageSlot( std::size_t size, bool updateScene )
731 return mUpdateManager.ReserveMessageSlot( size, updateScene );
734 BufferIndex Stage::GetEventBufferIndex() const
736 return mUpdateManager.GetEventBufferIndex();
739 void Stage::ForceNextUpdate()
741 mForceNextUpdate = true;
744 bool Stage::IsNextUpdateForced()
746 bool nextUpdateForced = mForceNextUpdate;
747 mForceNextUpdate = false;
748 return nextUpdateForced;
753 delete mSystemOverlay;
755 mObjectRegistry.Reset();
758 } // namespace Internal