/*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*/
if(scene && resizingSurface)
{
- int totalAngle = 0;
+ int totalAngle = 0;
bool isScreenOrientationChanging = false;
if(mWindowRotationAngle != scene.GetCurrentSurfaceOrientation())
{
- mWindowRotationAngle = scene.GetCurrentSurfaceOrientation();
+ mWindowRotationAngle = scene.GetCurrentSurfaceOrientation();
mIsWindowOrientationChanging = true;
}
if(mScreenRotationAngle != scene.GetCurrentScreenOrientation())
{
- mScreenRotationAngle = scene.GetCurrentScreenOrientation();
+ mScreenRotationAngle = scene.GetCurrentScreenOrientation();
isScreenOrientationChanging = true;
}
totalAngle = (mWindowRotationAngle + mScreenRotationAngle) % 360;
Rect<int> surfaceSize = scene.GetCurrentSurfaceRect();
//update surface size
- mPositionSize.width = surfaceSize.width;
+ mPositionSize.width = surfaceSize.width;
mPositionSize.height = surfaceSize.height;
DALI_LOG_RELEASE_INFO("Window is resizing, (%d, %d), [%d x %d]\n", mPositionSize.x, mPositionSize.y, mPositionSize.width, mPositionSize.height);
void WindowRenderSurface::OnFileDescriptorEventDispatched(FileDescriptorMonitor::EventType eventBitMask, int fileDescriptor)
{
- if(!(eventBitMask & FileDescriptorMonitor::FD_READABLE))
- {
- DALI_LOG_ERROR("WindowRenderSurface::OnFileDescriptorEventDispatched: file descriptor error [%d]\n", eventBitMask);
- close(fileDescriptor);
- return;
- }
-
DALI_LOG_RELEASE_INFO("WindowRenderSurface::OnFileDescriptorEventDispatched: Frame rendered [%d]\n", fileDescriptor);
std::unique_ptr<FrameCallbackInfo> callbackInfo;
}
// Call the connected callback
- if(callbackInfo)
+ if(callbackInfo && (eventBitMask & FileDescriptorMonitor::FD_READABLE))
{
for(auto&& iter : (callbackInfo)->callbacks)
{
Dali::Integration::Scene scene = mScene.GetHandle();
if(scene)
{
- surfaceRect = scene.GetCurrentSurfaceRect();
+ surfaceRect = scene.GetCurrentSurfaceRect();
int32_t totalAngle = scene.GetCurrentSurfaceOrientation() + scene.GetCurrentScreenOrientation();
if(totalAngle >= 360)
{