void SceneHolder::SurfaceResized(float width, float height)
{
- mScene.SurfaceResized(width, height);
+ if(DALI_LIKELY(mScene))
+ {
+ mScene.SurfaceResized(width, height);
+ }
mSurface->SetFullSwapNextFrame();
void SceneHolder::SurfaceRotated(float width, float height, int32_t windowOrientation, int32_t screenOrientation)
{
- mScene.SurfaceRotated(width, height, windowOrientation, screenOrientation);
+ if(DALI_LIKELY(mScene))
+ {
+ mScene.SurfaceRotated(width, height, windowOrientation, screenOrientation);
+ }
}
void SceneHolder::SetRotationCompletedAcknowledgement()
{
- mScene.SetRotationCompletedAcknowledgement();
+ if(DALI_LIKELY(mScene))
+ {
+ mScene.SetRotationCompletedAcknowledgement();
+ }
}
void SceneHolder::FeedTouchPoint(Dali::Integration::Point& point, int timeStamp)
bridge->Emit(accessible, Accessibility::WindowEvent::DESTROY);
}
- if(mAdaptor)
+ if(DALI_LIKELY(mAdaptor))
{
mAdaptor->RemoveWindow(this);
}
mVisibilityChangedSignal.Emit(handle, false);
Dali::Accessibility::Bridge::GetCurrentBridge()->WindowHidden(handle);
- WindowVisibilityObserver* observer(mAdaptor);
- observer->OnWindowHidden();
+ if(DALI_LIKELY(mAdaptor))
+ {
+ WindowVisibilityObserver* observer(mAdaptor);
+ observer->OnWindowHidden();
+ }
}
DALI_LOG_RELEASE_INFO("Window (%p), WinId (%d), Iconified: visible = %d\n", this, mNativeWindowId, mVisible);
mVisibilityChangedSignal.Emit(handle, true);
Dali::Accessibility::Bridge::GetCurrentBridge()->WindowShown(handle);
- WindowVisibilityObserver* observer(mAdaptor);
- observer->OnWindowShown();
+ if(DALI_LIKELY(mAdaptor))
+ {
+ WindowVisibilityObserver* observer(mAdaptor);
+ observer->OnWindowShown();
+ }
}
DALI_LOG_RELEASE_INFO("Window (%p), WinId (%d), Deiconified: visible = %d\n", this, mNativeWindowId, mVisible);
SurfaceRotated(static_cast<float>(positionSize.width), static_cast<float>(positionSize.height), mRotationAngle, mWindowBase->GetScreenRotationAngle());
- mAdaptor->SurfaceResizePrepare(mSurface.get(), Adaptor::SurfaceSize(positionSize.width, positionSize.height));
- mAdaptor->SurfaceResizeComplete(mSurface.get(), Adaptor::SurfaceSize(positionSize.width, positionSize.height));
+ if(DALI_LIKELY(mAdaptor))
+ {
+ mAdaptor->SurfaceResizePrepare(mSurface.get(), Adaptor::SurfaceSize(positionSize.width, positionSize.height));
+ mAdaptor->SurfaceResizeComplete(mSurface.get(), Adaptor::SurfaceSize(positionSize.width, positionSize.height));
+ }
}
void Window::OnDeleteRequest()
void Window::OnWindowRedrawRequest()
{
- mAdaptor->RenderOnce();
+ if(DALI_LIKELY(mAdaptor))
+ {
+ mAdaptor->RenderOnce();
+ }
}
void Window::OnUpdatePositionSize(Dali::PositionSize& positionSize)
SurfaceResized(static_cast<float>(mWindowWidth), static_cast<float>(mWindowHeight));
- mAdaptor->SurfaceResizePrepare(mSurface.get(), newSize);
+ if(DALI_LIKELY(mAdaptor))
+ {
+ mAdaptor->SurfaceResizePrepare(mSurface.get(), newSize);
+ }
DALI_LOG_RELEASE_INFO("Window (%p), WinId (%d), Resized signal emit [%d x %d]\n", this, mNativeWindowId, newRect.width, newRect.height);
mResizeSignal.Emit(handle, newSize);
- mAdaptor->SurfaceResizeComplete(mSurface.get(), newSize);
+ if(DALI_LIKELY(mAdaptor))
+ {
+ mAdaptor->SurfaceResizeComplete(mSurface.get(), newSize);
+ }
}
mSurface->SetFullSwapNextFrame();
- Dali::Accessibility::Accessible::Get(mScene.GetRootLayer())->EmitBoundsChanged(Dali::Rect<>(positionSize.x, positionSize.y, positionSize.width, positionSize.height));
+ if(DALI_LIKELY(mScene))
+ {
+ Dali::Accessibility::Accessible::Get(mScene.GetRootLayer())->EmitBoundsChanged(Dali::Rect<>(positionSize.x, positionSize.y, positionSize.width, positionSize.height));
+ }
}
void Window::OnTouchPoint(Dali::Integration::Point& point, int timeStamp)
SurfaceRotated(static_cast<float>(mWindowWidth), static_cast<float>(mWindowHeight), mRotationAngle, mWindowBase->GetScreenRotationAngle());
- mAdaptor->SurfaceResizePrepare(mSurface.get(), Adaptor::SurfaceSize(mWindowWidth, mWindowHeight));
+ if(DALI_LIKELY(mAdaptor))
+ {
+ mAdaptor->SurfaceResizePrepare(mSurface.get(), Adaptor::SurfaceSize(mWindowWidth, mWindowHeight));
+ }
Dali::Window handle(this);
mResizeSignal.Emit(handle, Dali::Window::WindowSize(mWindowWidth, mWindowHeight));
mOrientationChangedSignal.Emit(handle, GetCurrentOrientation());
- mAdaptor->SurfaceResizeComplete(mSurface.get(), Adaptor::SurfaceSize(mWindowWidth, mWindowHeight));
+ if(DALI_LIKELY(mAdaptor))
+ {
+ mAdaptor->SurfaceResizeComplete(mSurface.get(), Adaptor::SurfaceSize(mWindowWidth, mWindowHeight));
+ }
}
void Window::OnRotationFinished()