X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-toolkit%2Futc-Dali-GlViewDirectRendering.cpp;h=85f17461d7271b3e573bb8ebe4ea9e7bbb0c2967;hb=HEAD;hp=e018c494a03c12d1332b6f32e23732c545c89ff2;hpb=4685e8e1f8d09c2b9c08a45f899dc936c1a9fcde;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/automated-tests/src/dali-toolkit/utc-Dali-GlViewDirectRendering.cpp b/automated-tests/src/dali-toolkit/utc-Dali-GlViewDirectRendering.cpp index e018c49..85f1746 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-GlViewDirectRendering.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-GlViewDirectRendering.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Samsung Electronics Co., Ltd. + * Copyright (c) 2024 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. @@ -384,6 +384,32 @@ int UtcDaliGlViewDirectRenderingResize(void) END_TEST; } +int UtcDaliGlViewDirectRenderingDirectResize(void) +{ + ToolkitTestApplication application; + tet_infoline("UtcDaliGlViewDirectRenderingResize"); + GlView view = Toolkit::GlView::New(GlView::BackendMode::UNSAFE_DIRECT_RENDERING, GlView::ColorFormat::RGB888); + + application.GetScene().Add(view); + view.SetGraphicsConfig(true, true, 0, GlView::GraphicsApiVersion::GLES_VERSION_2_0); + view.RegisterGlCallbacks(Dali::MakeCallback(DirectRenderingCode::glInit), Dali::MakeCallback(DirectRenderingCode::glRenderFrame), Dali::MakeCallback(DirectRenderingCode::glTerminate)); + view.SetResizeCallback(Dali::MakeCallback(DirectRenderingCode::resizeCB)); + view.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT); + view.SetProperty(Actor::Property::SIZE, Vector2(360.0f, 360.0f)); + + application.SendNotification(); + application.Render(); + + //To GlViewRenderThread can recognize Resize signal the main thread have to sleep. + std::this_thread::sleep_for(std::chrono::milliseconds(100)); + + application.SendNotification(); + application.Render(); + + DALI_TEST_CHECK(true); + END_TEST; +} + int UtcDaliGlViewDirectRenderingTerminateCallback(void) { ToolkitTestApplication application;