When window rotation events come from ecore, the result will be stored
at mPositionSize, and send event message to render thread.
But when the event is not comes to render thread,
the window's size value (mPositionSize) and
the scene's size value (scene.GetCurrentSurfaceRect()) mismatched
So the clippingRect will calculate wrong value.
This patch make clipping area always use current scene surface
Change-Id: Id70fd2819b84314db5ef441512a7e042da1b1c81
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
SetBufferDamagedRects(mDamagedRects, clippingRect);
SetBufferDamagedRects(mDamagedRects, clippingRect);
- Rect<int> surfaceRect(0, 0, mPositionSize.width, mPositionSize.height);
- if(clippingRect == surfaceRect)
- {
- mDamagedRects.assign(1, surfaceRect);
- }
- else if(mDamagedRects.empty() && !clippingRect.IsEmpty())
- // We will render clippingRect area but mDamagedRects is empty.
- // So make mDamagedRects same with clippingRect to swap buffers.
- mDamagedRects.assign(1, clippingRect);
+ Rect<int> surfaceRect = scene.GetCurrentSurfaceRect();
+ if(clippingRect == surfaceRect)
+ {
+ mDamagedRects.assign(1, surfaceRect);
+ }
+ else if(mDamagedRects.empty() && !clippingRect.IsEmpty())
+ {
+ // We will render clippingRect area but mDamagedRects is empty.
+ // So make mDamagedRects same with clippingRect to swap buffers.
+ mDamagedRects.assign(1, clippingRect);
+ }
}
// This is now done when the render pass for the render surface begins
}
// This is now done when the render pass for the render surface begins
auto eglGraphics = static_cast<EglGraphics*>(mGraphics);
if(eglGraphics)
{
auto eglGraphics = static_cast<EglGraphics*>(mGraphics);
if(eglGraphics)
{
+ // If scene is not exist, just use stored mPositionSize.
Rect<int> surfaceRect(0, 0, mPositionSize.width, mPositionSize.height);
Rect<int> surfaceRect(0, 0, mPositionSize.width, mPositionSize.height);
+ Dali::Integration::Scene scene = mScene.GetHandle();
+ if(scene)
+ {
+ surfaceRect = scene.GetCurrentSurfaceRect();
+ }
+
Internal::Adaptor::EglImplementation& eglImpl = eglGraphics->GetEglImplementation();
if(!eglImpl.IsPartialUpdateRequired() || mFullSwapNextFrame)
{
Internal::Adaptor::EglImplementation& eglImpl = eglGraphics->GetEglImplementation();
if(!eglImpl.IsPartialUpdateRequired() || mFullSwapNextFrame)
{
if(!clippingRect.IsEmpty())
{
if(!clippingRect.IsEmpty())
{
- std::vector<Rect<int>> damagedRegion;
- Dali::Integration::Scene scene = mScene.GetHandle();
+ std::vector<Rect<int>> damagedRegion;
if(scene)
{
damagedRegion.push_back(RecalculateRect[std::min(scene.GetCurrentSurfaceOrientation() / 90, 3)](clippingRect, scene.GetCurrentSurfaceRect()));
if(scene)
{
damagedRegion.push_back(RecalculateRect[std::min(scene.GetCurrentSurfaceOrientation() / 90, 3)](clippingRect, scene.GetCurrentSurfaceRect()));