GlSyncAbstraction& glSyncAbstraction,
GestureManager& gestureManager,
ResourcePolicy::DataRetention dataRetentionPolicy,
- bool renderToFboEnabled )
+ Integration::RenderToFrameBuffer renderToFboEnabled,
+ Integration::DepthBufferAvailable depthBufferAvailable,
+ Integration::StencilBufferAvailable stencilBufferAvailable )
: mRenderController( renderController ),
mPlatform(platform),
mProcessingEvent(false)
mRenderTaskProcessor = new SceneGraph::RenderTaskProcessor();
- mRenderManager = RenderManager::New( glAbstraction, glSyncAbstraction );
+ mRenderManager = RenderManager::New( glAbstraction, glSyncAbstraction, depthBufferAvailable, stencilBufferAvailable );
RenderQueue& renderQueue = mRenderManager->GetRenderQueue();
// This must be called after stage is created but before stage initialization
mRelayoutController = IntrusivePtr< RelayoutController >( new RelayoutController( mRenderController ) );
- mStage->Initialize( renderToFboEnabled );
+ mStage->Initialize( renderToFboEnabled == Integration::RenderToFrameBuffer::TRUE );
mGestureEventProcessor = new GestureEventProcessor( *mStage, *mUpdateManager, gestureManager, mRenderController );
mEventProcessor = new EventProcessor( *mStage, *mNotificationManager, *mGestureEventProcessor );
mRelayoutController->SetStageSize( size.width, size.height );
}
+void Core::SurfaceResized( unsigned int width, unsigned int height, int orientation )
+{
+ mStage->SurfaceResized( width, height, orientation );
+
+ // The stage-size may be less than surface-size (reduced by top-margin)
+ Vector2 size = mStage->GetSize();
+ mRelayoutController->SetStageSize( size.width, size.height );
+}
+
void Core::SetTopMargin( unsigned int margin )
{
mStage->SetTopMargin( margin );
// Check the Notification Manager message queue to set needsNotification
status.needsNotification = mNotificationManager->MessagesToProcess();
+ // Check if the default surface is changed
+ status.surfaceRectChanged = mUpdateManager->IsDefaultSurfaceRectChanged();
+
// No need to keep update running if there are notifications to process.
// Any message to update will wake it up anyways
}