From: Joogab Yun Date: Wed, 28 Nov 2018 05:20:45 +0000 (+0900) Subject: Merge branch 'devel/master' into tizen X-Git-Tag: submit/tizen/20181128.063102~1 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git;a=commitdiff_plain;h=1f0b06f56e2145a70206d85a32c16e409d25907a;hp=13c5207cb6fd6564e78f0d8362d0822278e1a213 Merge branch 'devel/master' into tizen --- diff --git a/automated-tests/src/dali-adaptor/utc-Dali-Application.cpp b/automated-tests/src/dali-adaptor/utc-Dali-Application.cpp index a237f50..75175ff 100644 --- a/automated-tests/src/dali-adaptor/utc-Dali-Application.cpp +++ b/automated-tests/src/dali-adaptor/utc-Dali-Application.cpp @@ -265,74 +265,6 @@ int UtcDaliApplicationReplaceWindowN(void) END_TEST; } -int UtcDaliApplicationSetViewModeN(void) -{ - Application application; - - try - { - application.SetViewMode( STEREO_VERTICAL ); - DALI_TEST_CHECK( false ); // Should not get here - } - catch( ... ) - { - DALI_TEST_CHECK( true ); - } - - END_TEST; -} - -int UtcDaliApplicationGetViewModeN(void) -{ - Application application; - - try - { - (void) application.GetViewMode(); - DALI_TEST_CHECK( false ); // Should not get here - } - catch( ... ) - { - DALI_TEST_CHECK( true ); - } - - END_TEST; -} - -int UtcDaliApplicationSetStereoBaseN(void) -{ - Application application; - - try - { - application.SetStereoBase( 1.0f ); - DALI_TEST_CHECK( false ); // Should not get here - } - catch( ... ) - { - DALI_TEST_CHECK( true ); - } - - END_TEST; -} - -int UtcDaliApplicationGetStereoBaseN(void) -{ - Application application; - - try - { - (void) application.GetStereoBase(); - DALI_TEST_CHECK( false ); // Should not get here - } - catch( ... ) - { - DALI_TEST_CHECK( true ); - } - - END_TEST; -} - int UtcDaliApplicationInitSignalP(void) { Application application = Application::New(); diff --git a/build/tizen/adaptor/Makefile.am b/build/tizen/adaptor/Makefile.am index 3ce8237..9ab4793 100644 --- a/build/tizen/adaptor/Makefile.am +++ b/build/tizen/adaptor/Makefile.am @@ -61,6 +61,7 @@ LIBDALI_ADAPTOR_LA_SOURCES = \ $(adaptor_text_common_src_files) \ $(adaptor_text_ubuntu_src_files) \ $(adaptor_resampler_src_files) \ + $(adaptor_vector_animation_common_src_files) \ $(adaptor_video_common_src_files) \ $(adaptor_web_engine_common_src_files) \ $(adaptor_window_system_common_src_files) \ @@ -114,6 +115,7 @@ LIBDALI_ADAPTOR_LA_SOURCES = \ $(adaptor_system_tizen_wayland_src_files) \ $(adaptor_text_common_src_files) \ $(adaptor_resampler_src_files) \ + $(adaptor_vector_animation_common_src_files) \ $(adaptor_video_common_src_files) \ $(adaptor_web_engine_common_src_files) \ $(adaptor_window_system_common_src_files) \ @@ -177,6 +179,7 @@ LIBDALI_ADAPTOR_LA_SOURCES = \ $(adaptor_system_tizen_wayland_src_files) \ $(adaptor_text_common_src_files) \ $(adaptor_resampler_src_files) \ + $(adaptor_vector_animation_common_src_files) \ $(adaptor_video_common_src_files) \ $(adaptor_web_engine_common_src_files) \ $(adaptor_window_system_common_src_files) \ @@ -239,6 +242,7 @@ LIBDALI_ADAPTOR_LA_SOURCES = \ $(adaptor_system_tizen_wayland_src_files) \ $(adaptor_text_common_src_files) \ $(adaptor_resampler_src_files) \ + $(adaptor_vector_animation_common_src_files) \ $(adaptor_video_common_src_files) \ $(adaptor_web_engine_common_src_files) \ $(adaptor_window_system_common_src_files) \ @@ -300,6 +304,7 @@ LIBDALI_ADAPTOR_LA_SOURCES = \ $(adaptor_system_tizen_wayland_src_files) \ $(adaptor_text_common_src_files) \ $(adaptor_resampler_src_files) \ + $(adaptor_vector_animation_common_src_files) \ $(adaptor_video_common_src_files) \ $(adaptor_web_engine_common_src_files) \ $(adaptor_window_system_common_src_files) \ @@ -364,6 +369,7 @@ LIBDALI_ADAPTOR_LA_SOURCES = \ $(adaptor_system_tizen_wearable_src_files) \ $(adaptor_text_common_src_files) \ $(adaptor_resampler_src_files) \ + $(adaptor_vector_animation_common_src_files) \ $(adaptor_video_common_src_files) \ $(adaptor_web_engine_common_src_files) \ $(adaptor_window_system_common_src_files) \ diff --git a/build/tizen/adaptor/configure.ac b/build/tizen/adaptor/configure.ac index 6fc5844..11a6816 100644 --- a/build/tizen/adaptor/configure.ac +++ b/build/tizen/adaptor/configure.ac @@ -306,7 +306,7 @@ fi if test "x$enable_wayland" = "xyes"; then if test "x$enable_ecore_wayland2" = "xyes"; then -PKG_CHECK_MODULES(WAYLAND, [ecore-wl2 egl wayland-egl wayland-client >= 1.2.0 xkbcommon libtbm]) +PKG_CHECK_MODULES(WAYLAND, [ecore-wl2 egl wayland-egl wayland-egl-tizen wayland-client >= 1.2.0 xkbcommon libtbm]) else PKG_CHECK_MODULES(WAYLAND, [ecore-wayland egl wayland-egl wayland-client >= 1.2.0 xkbcommon libtbm]) fi diff --git a/build/tizen/adaptor/module.list b/build/tizen/adaptor/module.list index 30e4128..97727a4 100644 --- a/build/tizen/adaptor/module.list +++ b/build/tizen/adaptor/module.list @@ -71,6 +71,10 @@ include ../../../dali/internal/trace/file.list adaptor_thread_dir = ../../../dali/internal/thread include ../../../dali/internal/thread/file.list +# Module: vector-animation +adaptor_vector_animation_dir = ../../../dali/internal/vector-animation +include ../../../dali/internal/vector-animation/file.list + # Module: public-api adaptor_public_api_dir = ../../../dali/public-api include ../../../dali/public-api/file.list diff --git a/dali/devel-api/adaptor-framework/vector-animation-renderer-plugin.h b/dali/devel-api/adaptor-framework/vector-animation-renderer-plugin.h new file mode 100644 index 0000000..316d007 --- /dev/null +++ b/dali/devel-api/adaptor-framework/vector-animation-renderer-plugin.h @@ -0,0 +1,92 @@ +#ifndef DALI_VECTOR_ANIMATION_RENDERER_PLUGIN_H +#define DALI_VECTOR_ANIMATION_RENDERER_PLUGIN_H + +/* + * Copyright (c) 2018 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// EXTERNAL INCLUDES +#include +#include + +namespace Dali +{ + +/** + * VectorAnimationRendererPlugin is an abstract interface, used by dali-adaptor to render a vector animation. + * A concrete implementation must be created for each platform and provided as a dynamic library which + * will be loaded at run time by the adaptor. + */ +class VectorAnimationRendererPlugin +{ +public: + + /** + * @brief Constructor + */ + VectorAnimationRendererPlugin() {} + + /** + * @brief Destructor + */ + virtual ~VectorAnimationRendererPlugin() {} + + /** + * @brief Creates a renderer to render an vector animation file. + * + * @param[in] url The url of an animation file + * @param[in] renderer The renderer used to render the image + * @param[in] width The target image width + * @param[in] height The target image height + * @return True if the renderer is successfully created, false otherwise + */ + virtual bool CreateRenderer( const std::string& url, Renderer renderer, uint32_t width, uint32_t height ) = 0; + + /** + * @brief Starts the rendering. + * + * @return True if the renderer is successfully started, false otherwise + */ + virtual bool StartRender() = 0; + + /** + * @brief Stops the rendering. + */ + virtual void StopRender() = 0; + + /** + * @brief Renders the content to the target buffer synchronously. + * + * @param[in] frameNumber The frame number to be rendered + */ + virtual void Render( uint32_t frameNumber ) = 0; + + /** + * @brief Gets the total number of frames of the file + * + * @return The total number of frames + */ + virtual uint32_t GetTotalFrameNumber() = 0; + + /** + * @brief Function pointer called in adaptor to create a plugin instance. + */ + using CreateVectorAnimationRendererFunction = VectorAnimationRendererPlugin* (*)(); +}; + +} // namespace Dali + +#endif // DALI_VECTOR_ANIMATION_RENDERER_PLUGIN_H diff --git a/dali/devel-api/adaptor-framework/vector-animation-renderer.cpp b/dali/devel-api/adaptor-framework/vector-animation-renderer.cpp new file mode 100755 index 0000000..3349741 --- /dev/null +++ b/dali/devel-api/adaptor-framework/vector-animation-renderer.cpp @@ -0,0 +1,82 @@ +/* + * Copyright (c) 2018 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// CLASS HEADER +#include + +// INTERNAL INCLUDES +#include + +namespace Dali +{ + +VectorAnimationRenderer VectorAnimationRenderer::New( const std::string& url, Renderer renderer, uint32_t width, uint32_t height ) +{ + Internal::Adaptor::VectorAnimationRendererPtr animationRenderer = Internal::Adaptor::VectorAnimationRenderer::New(); + if( animationRenderer ) + { + animationRenderer->Initialize( url, renderer, width, height ); + } + + return VectorAnimationRenderer( animationRenderer.Get() ); +} + +VectorAnimationRenderer::VectorAnimationRenderer() +{ +} + +VectorAnimationRenderer::~VectorAnimationRenderer() +{ +} + +VectorAnimationRenderer::VectorAnimationRenderer( Internal::Adaptor::VectorAnimationRenderer* internal ) +: BaseHandle( internal ) +{ +} + +VectorAnimationRenderer::VectorAnimationRenderer( const VectorAnimationRenderer& handle ) +: BaseHandle( handle ) +{ +} + +VectorAnimationRenderer& VectorAnimationRenderer::operator=( const VectorAnimationRenderer& rhs ) +{ + BaseHandle::operator=( rhs ); + return *this; +} + +bool VectorAnimationRenderer::StartRender() +{ + return GetImplementation( *this ).StartRender(); +} + +void VectorAnimationRenderer::StopRender() +{ + GetImplementation( *this ).StopRender(); +} + +void VectorAnimationRenderer::Render( uint32_t frameNumber ) +{ + GetImplementation( *this ).Render( frameNumber ); +} + +uint32_t VectorAnimationRenderer::GetTotalFrameNumber() +{ + return GetImplementation( *this ).GetTotalFrameNumber(); +} + +} // namespace Dali diff --git a/dali/devel-api/adaptor-framework/vector-animation-renderer.h b/dali/devel-api/adaptor-framework/vector-animation-renderer.h new file mode 100755 index 0000000..644cf22 --- /dev/null +++ b/dali/devel-api/adaptor-framework/vector-animation-renderer.h @@ -0,0 +1,134 @@ +#ifndef DALI_VECTOR_ANIMATION_RENDERER_H +#define DALI_VECTOR_ANIMATION_RENDERER_H + +/* + * Copyright (c) 2018 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// EXTERNAL INCLUDES +#include +#include + +// INTERNAL INCLUDES +#include + +namespace Dali +{ +/** + * @addtogroup dali_adaptor_framework + * @{ + */ + +namespace Internal DALI_INTERNAL +{ +namespace Adaptor +{ +class VectorAnimationRenderer; +} +} + +/** + * @brief Used for rendering a vector animation file + */ +class DALI_ADAPTOR_API VectorAnimationRenderer : public BaseHandle +{ +public: + + /** + * @brief Creates an initialized handle to a new VectorAnimationRenderer. + * + * @param[in] url The url of the vector animation file + * @param[in] renderer The renderer used to render the image + * @param[in] width The width of the content + * @param[in] height The height of the content + * @return A handle to a newly allocated VectorAnimationRenderer + */ + static VectorAnimationRenderer New( const std::string& url, Renderer renderer, uint32_t width, uint32_t height ); + + /** + * @brief Creates an empty handle. + * Use VectorAnimationRenderer::New() to create an initialized object. + */ + VectorAnimationRenderer(); + + /** + * @brief Destructor. + */ + ~VectorAnimationRenderer(); + + /** + * @brief This copy constructor is required for (smart) pointer semantics. + * + * @param[in] handle A reference to the copied handle + */ + VectorAnimationRenderer( const VectorAnimationRenderer& handle ); + + /** + * @brief This assignment operator is required for (smart) pointer semantics. + * + * @param[in] rhs A reference to the copied handle + * @return A reference to this + */ + VectorAnimationRenderer& operator=( const VectorAnimationRenderer& rhs ); + + /** + * @brief Starts the rendering. + * + * @return True if the renderer is successfully started, false otherwise. + */ + bool StartRender(); + + /** + * @brief Stops the rendering. + */ + void StopRender(); + + /** + * @brief Renders the content to the target buffer synchronously. + * + * @param[in] frameNumber The frame number to be rendered + */ + void Render( uint32_t frameNumber ); + + /** + * @brief Gets the total number of frames of the file + * + * @return The total number of frames + */ + uint32_t GetTotalFrameNumber(); + +public: // Signals + +public: // Not intended for application developers + + /// @cond internal + /** + * @brief The constructor. + * @note Not intended for application developers. + * + * @param[in] pointer A pointer to a newly allocated VectorAnimationRenderer + */ + explicit DALI_INTERNAL VectorAnimationRenderer( Internal::Adaptor::VectorAnimationRenderer* internal ); + /// @endcond + +}; + +/** + * @} + */ +} // namespace Dali + +#endif // DALI_VECTOR_ANIMATION_RENDERER_H diff --git a/dali/devel-api/adaptor-framework/window-devel.cpp b/dali/devel-api/adaptor-framework/window-devel.cpp new file mode 100644 index 0000000..f14bc8d --- /dev/null +++ b/dali/devel-api/adaptor-framework/window-devel.cpp @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2018 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// INTERNAL INCLUDES +#include +#include + +namespace Dali +{ + +namespace DevelWindow +{ + +void SetPositionSize( Window window, PositionSize positionSize ) +{ + GetImplementation( window ).SetPositionSize( positionSize ); +} + +} // namespace DevelWindow + +} // namespace Dali diff --git a/dali/devel-api/adaptor-framework/window-devel.h b/dali/devel-api/adaptor-framework/window-devel.h new file mode 100644 index 0000000..9ed8a18 --- /dev/null +++ b/dali/devel-api/adaptor-framework/window-devel.h @@ -0,0 +1,42 @@ +#ifndef DALI_WINDOW_DEVEL_H +#define DALI_WINDOW_DEVEL_H + +/* + * Copyright (c) 2018 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// INTERNAL INCLUDES +#include + +namespace Dali +{ + +namespace DevelWindow +{ + +/** + * @brief Sets position and size of the window. This API guarantees that both moving and resizing of window will appear on the screen at once. + * + * @param[in] window The window instance + * @param[in] positionSize The new window position and size + */ +DALI_ADAPTOR_API void SetPositionSize( Window window, PositionSize positionSize ); + +} // namespace DevelWindow + +} // namespace Dali + +#endif // DALI_WINDOW_DEVEL_H diff --git a/dali/devel-api/file.list b/dali/devel-api/file.list index 59a216f..5a29f71 100755 --- a/dali/devel-api/file.list +++ b/dali/devel-api/file.list @@ -26,10 +26,12 @@ devel_api_src_files = \ $(adaptor_devel_api_dir)/adaptor-framework/style-monitor.cpp \ $(adaptor_devel_api_dir)/adaptor-framework/tilt-sensor.cpp \ $(adaptor_devel_api_dir)/adaptor-framework/lifecycle-controller.cpp \ + $(adaptor_devel_api_dir)/adaptor-framework/vector-animation-renderer.cpp \ $(adaptor_devel_api_dir)/adaptor-framework/video-player.cpp \ $(adaptor_devel_api_dir)/adaptor-framework/virtual-keyboard.cpp \ $(adaptor_devel_api_dir)/adaptor-framework/thread-settings.cpp \ - $(adaptor_devel_api_dir)/adaptor-framework/web-engine.cpp + $(adaptor_devel_api_dir)/adaptor-framework/web-engine.cpp \ + $(adaptor_devel_api_dir)/adaptor-framework/window-devel.cpp @@ -66,6 +68,8 @@ devel_api_adaptor_framework_header_files = \ $(adaptor_devel_api_dir)/adaptor-framework/sound-player.h \ $(adaptor_devel_api_dir)/adaptor-framework/style-monitor.h \ $(adaptor_devel_api_dir)/adaptor-framework/tilt-sensor.h \ + $(adaptor_devel_api_dir)/adaptor-framework/vector-animation-renderer.h \ + $(adaptor_devel_api_dir)/adaptor-framework/vector-animation-renderer-plugin.h \ $(adaptor_devel_api_dir)/adaptor-framework/video-player.h \ $(adaptor_devel_api_dir)/adaptor-framework/video-player-plugin.h \ $(adaptor_devel_api_dir)/adaptor-framework/web-engine.h \ @@ -74,7 +78,8 @@ devel_api_adaptor_framework_header_files = \ $(adaptor_devel_api_dir)/adaptor-framework/virtual-keyboard.h \ $(adaptor_devel_api_dir)/adaptor-framework/physical-keyboard.h \ $(adaptor_devel_api_dir)/adaptor-framework/key-devel.h \ - $(adaptor_devel_api_dir)/adaptor-framework/thread-settings.h + $(adaptor_devel_api_dir)/adaptor-framework/thread-settings.h \ + $(adaptor_devel_api_dir)/adaptor-framework/window-devel.h devel_api_text_abstraction_src_files = \ $(adaptor_devel_api_dir)/text-abstraction/bidirectional-support.cpp \ diff --git a/dali/integration-api/adaptor.h b/dali/integration-api/adaptor.h index f7a47ea..3b996b8 100755 --- a/dali/integration-api/adaptor.h +++ b/dali/integration-api/adaptor.h @@ -359,16 +359,6 @@ public: void SceneCreated(); /** - * @copydoc Dali::Application::SetViewMode(); - */ - void SetViewMode( ViewMode viewMode ); - - /** - * @copydoc Dali::Application::SetStereoBase(); - */ - void SetStereoBase( float stereoBase ); - - /** * @brief Renders once more even if we're paused * @note Will not work if the window is hidden. */ diff --git a/dali/integration-api/render-surface.h b/dali/integration-api/render-surface.h index e9e8921..edb9022 100644 --- a/dali/integration-api/render-surface.h +++ b/dali/integration-api/render-surface.h @@ -136,12 +136,6 @@ public: virtual void MoveResize( Dali::PositionSize positionSize ) = 0; /** - * @brief Set the stereoscopic 3D view mode - * @param[in] viewMode The new view mode - */ - virtual void SetViewMode( ViewMode viewMode ) = 0; - - /** * @brief Called when Render thread has started */ virtual void StartRender() = 0; diff --git a/dali/internal/adaptor/common/adaptor-impl.cpp b/dali/internal/adaptor/common/adaptor-impl.cpp index ee1b447..d046790 100755 --- a/dali/internal/adaptor/common/adaptor-impl.cpp +++ b/dali/internal/adaptor/common/adaptor-impl.cpp @@ -160,6 +160,9 @@ void Adaptor::Initialize( GraphicsFactory& graphicsFactory, Dali::Configuration: mCallbackManager = CallbackManager::New(); WindowPane defaultWindow = mWindowFrame.front(); + + DALI_ASSERT_DEBUG( defaultWindow.surface && "Surface not initialized" ); + PositionSize size = defaultWindow.surface->GetPositionSize(); mGestureManager = new GestureManager(*this, Vector2(size.width, size.height), mCallbackManager, *mEnvironmentOptions); @@ -192,14 +195,7 @@ void Adaptor::Initialize( GraphicsFactory& graphicsFactory, Dali::Configuration: mVSyncMonitor = new VSyncMonitor; - if( defaultWindow.surface ) - { - mDisplayConnection = Dali::DisplayConnection::New( *mGraphics, defaultWindow.surface->GetSurfaceType() ); - } - else - { - mDisplayConnection = Dali::DisplayConnection::New( *mGraphics ); - } + mDisplayConnection = Dali::DisplayConnection::New( *mGraphics, defaultWindow.surface->GetSurfaceType() ); mThreadController = new ThreadController( *this, *mEnvironmentOptions ); @@ -504,9 +500,7 @@ void Adaptor::ReplaceSurface( Any nativeWindow, RenderSurface& newSurface ) newDefaultWindow.nativeWindow = nativeWindow; newDefaultWindow.surface = &newSurface; - // Must delete the old Window first before replacing it with the new one WindowPane oldDefaultWindow = mWindowFrame.front(); - oldDefaultWindow.surface->DestroySurface(); // Update WindowFrame std::vector::iterator iter = mWindowFrame.begin(); @@ -518,6 +512,10 @@ void Adaptor::ReplaceSurface( Any nativeWindow, RenderSurface& newSurface ) // This method blocks until the render thread has completed the replace. mThreadController->ReplaceSurface( newDefaultWindow.surface ); + + // Must delete the old Window only after the render thread has completed the replace + oldDefaultWindow.surface->DestroySurface(); + oldDefaultWindow.surface = nullptr; } RenderSurface& Adaptor::GetSurface() const @@ -972,7 +970,9 @@ Adaptor::Adaptor(Any nativeWindow, Dali::Adaptor& adaptor, RenderSurface* surfac mCore( nullptr ), mThreadController( nullptr ), mVSyncMonitor( nullptr ), + mGraphics( nullptr ), mDisplayConnection( nullptr ), + mWindowFrame(), mPlatformAbstraction( nullptr ), mEventHandler( nullptr ), mCallbackManager( nullptr ), @@ -1007,31 +1007,6 @@ Adaptor::Adaptor(Any nativeWindow, Dali::Adaptor& adaptor, RenderSurface* surfac gThreadLocalAdaptor = this; } -// Stereoscopy - -void Adaptor::SetViewMode( ViewMode viewMode ) -{ - WindowPane defaultWindow = mWindowFrame.front(); - defaultWindow.surface->SetViewMode( viewMode ); - - mCore->SetViewMode( viewMode ); -} - -ViewMode Adaptor::GetViewMode() const -{ - return mCore->GetViewMode(); -} - -void Adaptor::SetStereoBase( float stereoBase ) -{ - mCore->SetStereoBase( stereoBase ); -} - -float Adaptor::GetStereoBase() const -{ - return mCore->GetStereoBase(); -} - void Adaptor::SetRootLayoutDirection( std::string locale ) { Dali::Stage stage = Dali::Stage::GetCurrent(); diff --git a/dali/internal/adaptor/common/adaptor-impl.h b/dali/internal/adaptor/common/adaptor-impl.h index 26c3bb7..d014622 100755 --- a/dali/internal/adaptor/common/adaptor-impl.h +++ b/dali/internal/adaptor/common/adaptor-impl.h @@ -481,28 +481,6 @@ public: //AdaptorInternalServices */ virtual TraceInterface& GetSystemTraceInterface(); -public: // Stereoscopy - - /** - * @copydoc Dali::Integration::Core::SetViewMode() - */ - void SetViewMode( ViewMode viewMode ); - - /** - * @copydoc Dali::Integration::Core::GetViewMode() - */ - ViewMode GetViewMode() const; - - /** - * @copydoc Dali::Integration::Core::SetStereoBase() - */ - void SetStereoBase( float stereoBase ); - - /** - * @copydoc Dali::Integration::Core::GetStereoBase() - */ - float GetStereoBase() const; - public: // Signals /** diff --git a/dali/internal/adaptor/common/adaptor.cpp b/dali/internal/adaptor/common/adaptor.cpp index be113a7..a0747df 100755 --- a/dali/internal/adaptor/common/adaptor.cpp +++ b/dali/internal/adaptor/common/adaptor.cpp @@ -183,16 +183,6 @@ void Adaptor::SceneCreated() mImpl->SceneCreated(); } -void Adaptor::SetViewMode( ViewMode mode ) -{ - mImpl->SetViewMode( mode ); -} - -void Adaptor::SetStereoBase( float stereoBase ) -{ - mImpl->SetStereoBase( stereoBase ); -} - void Adaptor::RenderOnce() { mImpl->RenderOnce(); diff --git a/dali/internal/adaptor/common/application-impl.cpp b/dali/internal/adaptor/common/application-impl.cpp index 47c42d5..fe29875 100644 --- a/dali/internal/adaptor/common/application-impl.cpp +++ b/dali/internal/adaptor/common/application-impl.cpp @@ -226,17 +226,6 @@ void Application::DoInit() mAdaptor->SetUseHardwareVSync(false); } - Internal::Adaptor::Adaptor::GetImplementation( *mAdaptor ).SetStereoBase( mCommandLineOptions->stereoBase ); - if( mCommandLineOptions->viewMode != 0 ) - { - ViewMode viewMode = MONO; - if( mCommandLineOptions->viewMode <= STEREO_INTERLACED ) - { - viewMode = static_cast( mCommandLineOptions->viewMode ); - } - Internal::Adaptor::Adaptor::GetImplementation( *mAdaptor ).SetViewMode( viewMode ); - } - if( ! mStylesheet.empty() ) { Dali::StyleMonitor::Get().SetTheme( mStylesheet ); @@ -407,28 +396,6 @@ Dali::Window Application::GetWindow() return mMainWindow; } -// Stereoscopy - -void Application::SetViewMode( ViewMode viewMode ) -{ - Internal::Adaptor::Adaptor::GetImplementation( *mAdaptor ).SetViewMode( viewMode ); -} - -ViewMode Application::GetViewMode() const -{ - return Internal::Adaptor::Adaptor::GetImplementation( *mAdaptor ).GetViewMode(); -} - -void Application::SetStereoBase( float stereoBase ) -{ - Internal::Adaptor::Adaptor::GetImplementation( *mAdaptor ).SetStereoBase( stereoBase ); -} - -float Application::GetStereoBase() const -{ - return Internal::Adaptor::Adaptor::GetImplementation( *mAdaptor ).GetStereoBase(); -} - void Application::ReplaceWindow( const PositionSize& positionSize, const std::string& name ) { Dali::Window newWindow = Dali::Window::New( positionSize, name, mMainWindowMode == Dali::Application::TRANSPARENT ); diff --git a/dali/internal/adaptor/common/application-impl.h b/dali/internal/adaptor/common/application-impl.h index e906520..d8d1fce 100644 --- a/dali/internal/adaptor/common/application-impl.h +++ b/dali/internal/adaptor/common/application-impl.h @@ -154,28 +154,6 @@ public: */ static ApplicationPtr GetPreInitializedApplication(); -public: // Stereoscopy - - /** - * @copydoc Dali::Application::SetViewMode() - */ - void SetViewMode( ViewMode viewMode ); - - /** - * @copydoc Dali::Application::GetViewMode() - */ - ViewMode GetViewMode() const; - - /** - * @copydoc Dali::Application::SetStereoBase() - */ - void SetStereoBase( float stereoBase ); - - /** - * @copydoc Dali::Application::GetStereoBase() - */ - float GetStereoBase() const; - public: // Lifecycle functionality /** diff --git a/dali/internal/adaptor/common/combined-update-render-controller.cpp b/dali/internal/adaptor/common/combined-update-render-controller.cpp index e9fa33f..4c7b79f 100644 --- a/dali/internal/adaptor/common/combined-update-render-controller.cpp +++ b/dali/internal/adaptor/common/combined-update-render-controller.cpp @@ -469,6 +469,7 @@ void CombinedUpdateRenderController::UpdateRenderThread() // If the new surface has a different display connection, then the context will be lost mAdaptorInterfaces.GetDisplayConnectionInterface().Initialize(); + newSurface->InitializeGraphics( mAdaptorInterfaces.GetGraphicsInterface(), mAdaptorInterfaces.GetDisplayConnectionInterface() ); newSurface->ReplaceGraphicsSurface(); SurfaceReplaced(); } @@ -546,7 +547,7 @@ void CombinedUpdateRenderController::UpdateRenderThread() } } - RenderSurface* currentSurface = mAdaptorInterfaces.GetRenderSurfaceInterface(); + currentSurface = mAdaptorInterfaces.GetRenderSurfaceInterface(); if( currentSurface ) { currentSurface->PreRender( surfaceResized ); @@ -626,6 +627,7 @@ void CombinedUpdateRenderController::UpdateRenderThread() // Inform core of context destruction & shutdown EGL mCore.ContextDestroyed(); + currentSurface = mAdaptorInterfaces.GetRenderSurfaceInterface(); if( currentSurface ) { currentSurface->DestroySurface(); diff --git a/dali/internal/system/common/command-line-options.cpp b/dali/internal/system/common/command-line-options.cpp index 8ea2f8a..806e787 100644 --- a/dali/internal/system/common/command-line-options.cpp +++ b/dali/internal/system/common/command-line-options.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * Copyright (c) 2018 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. @@ -60,8 +60,6 @@ Argument EXPECTED_ARGS[] = { "width", "Stage Width" }, { "height", "Stage Height" }, { "dpi", "Emulated DPI" }, - { "view", "Stereocopic 3D view mode ([0]=MONO, 1=STEREO_HORIZONTAL, 2=STEREO_VERTICAL, 3=STEREO_INTERLACED)" }, - { "stereo-base", "Distance in millimeters between left/right cameras [65.0]" }, { "help", "Help" }, { NULL, NULL } }; @@ -72,12 +70,10 @@ enum Option OPTION_STAGE_WIDTH, OPTION_STAGE_HEIGHT, OPTION_DPI, - OPTION_STEREO_MODE, - OPTION_STEREO_BASE, OPTION_HELP }; -typedef Dali::Vector< int > UnhandledContainer; +typedef Dali::Vector< int32_t > UnhandledContainer; void ShowHelp() { @@ -92,11 +88,9 @@ void ShowHelp() } // unnamed namespace -CommandLineOptions::CommandLineOptions(int *argc, char **argv[]) +CommandLineOptions::CommandLineOptions(int32_t *argc, char **argv[]) : noVSyncOnRender(0), - stageWidth(0), stageHeight(0), - viewMode(0), - stereoBase(65) + stageWidth(0), stageHeight(0) { // Exit gracefully if no arguments provided if ( !argc || !argv ) @@ -107,10 +101,10 @@ CommandLineOptions::CommandLineOptions(int *argc, char **argv[]) if ( *argc > 1 ) { // We do not want to print out errors. - int origOptErrValue( opterr ); + int32_t origOptErrValue( opterr ); opterr = 0; - int help( 0 ); + int32_t help( 0 ); const struct option options[]= { @@ -118,16 +112,14 @@ CommandLineOptions::CommandLineOptions(int *argc, char **argv[]) { EXPECTED_ARGS[OPTION_STAGE_WIDTH].opt, required_argument, NULL, 'w' }, // "--width" { EXPECTED_ARGS[OPTION_STAGE_HEIGHT].opt, required_argument, NULL, 'h' }, // "--height" { EXPECTED_ARGS[OPTION_DPI].opt, required_argument, NULL, 'd' }, // "--dpi" - { EXPECTED_ARGS[OPTION_STEREO_MODE].opt, required_argument, NULL, 'v' }, // "--view" - { EXPECTED_ARGS[OPTION_STEREO_BASE].opt, required_argument, NULL, 's' }, // "--stereo-base" { EXPECTED_ARGS[OPTION_HELP].opt, no_argument, &help, '?' }, // "--help" { 0, 0, 0, 0 } // end of options }; - int shortOption( 0 ); - int optionIndex( 0 ); + int32_t shortOption( 0 ); + int32_t optionIndex( 0 ); - const char* optString = "-w:h:d:v:s:"; // The '-' ensures that argv is NOT permuted + const char* optString = "-w:h:d:"; // The '-' ensures that argv is NOT permuted bool optionProcessed( false ); UnhandledContainer unhandledOptions; // We store indices of options we do not handle here @@ -179,26 +171,6 @@ CommandLineOptions::CommandLineOptions(int *argc, char **argv[]) break; } - case 'v': - { - if ( optarg ) - { - viewMode = atoi(optarg); - optionProcessed = true; - } - break; - } - - case 's': - { - if ( optarg ) - { - stereoBase = atoi(optarg); - optionProcessed = true; - } - break; - } - case -1: { // All command-line options have been parsed. @@ -218,7 +190,7 @@ CommandLineOptions::CommandLineOptions(int *argc, char **argv[]) { if ( unhandledOptions.Count() > 0 ) { - int index( 1 ); + int32_t index( 1 ); // Overwrite the argv with the values from the unhandled indices const UnhandledContainer::ConstIterator endIter = unhandledOptions.End(); diff --git a/dali/internal/system/common/command-line-options.h b/dali/internal/system/common/command-line-options.h index d87781e..75fab25 100644 --- a/dali/internal/system/common/command-line-options.h +++ b/dali/internal/system/common/command-line-options.h @@ -2,7 +2,7 @@ #define __DALI_INTERNAL_COMMAND_LINE_OPTIONS_H__ /* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * Copyright (c) 2018 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. @@ -20,6 +20,7 @@ // EXTERNAL INCLUDES #include +#include // int32_t namespace Dali { @@ -41,8 +42,6 @@ namespace Adaptor * -w|--width Stage Width * -h|--height Stage Height * -d|--dpi Emulated DPI - * -v|--view Viewing mode - * -s|--stereo-base Eye separation for stereoscopic rendering (in mm) * --help Help * @endcode * @@ -58,7 +57,7 @@ public: * @param[in,out] argv The argument list * @note Supported options are stripped from argv, and argc is updated appropriately. */ - CommandLineOptions(int *argc, char **argv[]); + CommandLineOptions( int32_t *argc, char **argv[] ); /** * Destructor @@ -67,12 +66,10 @@ public: public: // Command line parsed values - int noVSyncOnRender; ///< If 1, then the user does not want VSync on Render - int stageWidth; ///< The width of the stage required. 0 if not set. - int stageHeight; ///< The height of the stage required. 0 if not set. - int viewMode; ///< Stereocopic 3D view mode (0=MONO, 1=STEREO_HORIZONTAL, 2=STEREO_VERTICAL, 3=STEREO_INTERLACED) - int stereoBase; ///< The distance in millimeters between left/right cameras - std::string stageDPI; ///< DPI stored as hxv, where h is horizontal DPI and v is vertical DPI + int32_t noVSyncOnRender; ///< If 1, then the user does not want VSync on Render + int32_t stageWidth; ///< The width of the stage required. 0 if not set. + int32_t stageHeight; ///< The height of the stage required. 0 if not set. + std::string stageDPI; ///< DPI stored as hxv, where h is horizontal DPI and v is vertical DPI }; } // namespace Adaptor diff --git a/dali/internal/system/common/locale-utils.cpp b/dali/internal/system/common/locale-utils.cpp index 369a5e2..d9f906a 100644 --- a/dali/internal/system/common/locale-utils.cpp +++ b/dali/internal/system/common/locale-utils.cpp @@ -53,6 +53,7 @@ const LocaleDirectionInfo LOCALE_DIRECTION_LOOKUP_TABLE[] = { "bo", "Tibetan", Locale::LeftToRight }, { "bs", "Bosnian", Locale::LeftToRight }, { "ca", "Catalan", Locale::LeftToRight }, + { "ck", "Iraq", Locale::RightToLeft }, { "cs", "Czech", Locale::LeftToRight }, { "cy", "Welsh", Locale::LeftToRight }, { "da", "Danish", Locale::LeftToRight }, @@ -81,7 +82,7 @@ const LocaleDirectionInfo LOCALE_DIRECTION_LOOKUP_TABLE[] = { "it", "Italian", Locale::LeftToRight }, { "ja", "Japanese", Locale::LeftToRight }, { "ka", "Georgian", Locale::LeftToRight }, - { "kk", "Kazakh", Locale::RightToLeft }, + { "kk", "Kazakh", Locale::LeftToRight }, { "km", "Khmer", Locale::LeftToRight }, { "kn", "Kannada", Locale::LeftToRight }, { "ko", "Korean", Locale::LeftToRight }, diff --git a/dali/internal/system/linux/callback-manager-ecore.cpp b/dali/internal/system/linux/callback-manager-ecore.cpp index fb46fb2..8398a75 100644 --- a/dali/internal/system/linux/callback-manager-ecore.cpp +++ b/dali/internal/system/linux/callback-manager-ecore.cpp @@ -178,6 +178,11 @@ void EcoreCallbackManager::RemoveIdleCallback( CallbackBase* callback ) CallbackBase::Execute( *data->mRemoveFromContainerFunction, data ); ecore_idler_del( data->mIdler ); + + // delete our data + delete data; + + return; } } } @@ -219,6 +224,11 @@ void EcoreCallbackManager::RemoveIdleEntererCallback( CallbackBase* callback ) CallbackBase::Execute( *data->mRemoveFromContainerFunction, data ); ecore_idle_enterer_del( data->mIdleEnterer ); + + // delete our data + delete data; + + return; } } } diff --git a/dali/internal/vector-animation/common/vector-animation-renderer-impl.cpp b/dali/internal/vector-animation/common/vector-animation-renderer-impl.cpp new file mode 100644 index 0000000..d037ab6 --- /dev/null +++ b/dali/internal/vector-animation/common/vector-animation-renderer-impl.cpp @@ -0,0 +1,92 @@ +/* + * Copyright (c) 2018 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// CLASS HEADER +#include + +// EXTERNAL INCLUDES +#include + +// INTERNAL INCLUDES + +namespace Dali +{ + +namespace Internal +{ + +namespace Adaptor +{ + +namespace // unnamed namespace +{ + +// Type Registration +Dali::BaseHandle Create() +{ + return Dali::BaseHandle(); +} + +Dali::TypeRegistration type( typeid( Dali::VectorAnimationRenderer ), typeid( Dali::BaseHandle ), Create ); + +} // unnamed namespace + +VectorAnimationRendererPtr VectorAnimationRenderer::New() +{ + VectorAnimationRendererPtr renderer = new VectorAnimationRenderer(); + return renderer; +} + +VectorAnimationRenderer::VectorAnimationRenderer() +: mPlugin( std::string() ) +{ +} + +VectorAnimationRenderer::~VectorAnimationRenderer() +{ +} + +void VectorAnimationRenderer::Initialize( const std::string& url, Dali::Renderer renderer, uint32_t width, uint32_t height ) +{ + mPlugin.CreateRenderer( url, renderer, width, height ); +} + +bool VectorAnimationRenderer::StartRender() +{ + return mPlugin.StartRender(); +} + +void VectorAnimationRenderer::StopRender() +{ + mPlugin.StopRender(); +} + +void VectorAnimationRenderer::Render( uint32_t frameNumber ) +{ + mPlugin.Render( frameNumber ); +} + +uint32_t VectorAnimationRenderer::GetTotalFrameNumber() +{ + return mPlugin.GetTotalFrameNumber(); +} + +} // namespace Adaptor + +} // namespace internal + +} // namespace Dali diff --git a/dali/internal/vector-animation/common/vector-animation-renderer-impl.h b/dali/internal/vector-animation/common/vector-animation-renderer-impl.h new file mode 100755 index 0000000..0c54961 --- /dev/null +++ b/dali/internal/vector-animation/common/vector-animation-renderer-impl.h @@ -0,0 +1,125 @@ +#ifndef DALI_INTERNAL_VECTOR_ANIMATION_RENDERER_IMPL_H +#define DALI_INTERNAL_VECTOR_ANIMATION_RENDERER_IMPL_H + +/* + * Copyright (c) 2018 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// EXTERNAL INCLUDES +#include + +// INTERNAL INCLUDES +#include +#include + +namespace Dali +{ + +namespace Internal +{ + +namespace Adaptor +{ + +class VectorAnimationRenderer; +using VectorAnimationRendererPtr = IntrusivePtr< VectorAnimationRenderer >; + +/** + * Dali internal VectorAnimationRenderer. + */ +class VectorAnimationRenderer : public BaseObject +{ +public: + + /** + * @brief Creates a VectorAnimationRenderer object. + * + * @param[in] url The url of the vector animation file + */ + static VectorAnimationRendererPtr New(); + + /** + * @brief Initializes member data. + */ + void Initialize( const std::string& url, Dali::Renderer renderer, uint32_t width, uint32_t height ); + + /** + * @copydoc Dali::VectorAnimationRenderer::StartRender() + */ + bool StartRender(); + + /** + * @copydoc Dali::VectorAnimationRenderer::StopRender() + */ + void StopRender(); + + /** + * @copydoc Dali::VectorAnimationRenderer::Render() + */ + void Render( uint32_t frameNumber ); + + /** + * @copydoc Dali::VectorAnimationRenderer::GetTotalFrameNumber() + */ + uint32_t GetTotalFrameNumber(); + +private: + + /** + * @brief Constructor + */ + VectorAnimationRenderer(); + + /** + * @brief Destructor. + */ + ~VectorAnimationRenderer(); + +private: + + VectorAnimationRenderer( const VectorAnimationRenderer& ) = delete; + VectorAnimationRenderer& operator=( VectorAnimationRenderer& ) = delete; + +private: + + VectorAnimationRendererPluginProxy mPlugin; +}; + +} // namespace Adaptor + +} // namespace Internal + +inline static Internal::Adaptor::VectorAnimationRenderer& GetImplementation( Dali::VectorAnimationRenderer& renderer ) +{ + DALI_ASSERT_ALWAYS( renderer && "VectorAnimationRenderer handle is empty." ); + + BaseObject& handle = renderer.GetBaseObject(); + + return static_cast< Internal::Adaptor::VectorAnimationRenderer& >( handle ); +} + +inline static const Internal::Adaptor::VectorAnimationRenderer& GetImplementation( const Dali::VectorAnimationRenderer& renderer ) +{ + DALI_ASSERT_ALWAYS( renderer && "VectorAnimationRenderer handle is empty." ); + + const BaseObject& handle = renderer.GetBaseObject(); + + return static_cast< const Internal::Adaptor::VectorAnimationRenderer& >( handle ); +} + +} // namespace Dali + +#endif // DALI_INTERNAL_VECTOR_ANIMATION_RENDERER_IMPL_H diff --git a/dali/internal/vector-animation/common/vector-animation-renderer-plugin-proxy.cpp b/dali/internal/vector-animation/common/vector-animation-renderer-plugin-proxy.cpp new file mode 100644 index 0000000..8e7e1d2 --- /dev/null +++ b/dali/internal/vector-animation/common/vector-animation-renderer-plugin-proxy.cpp @@ -0,0 +1,150 @@ +/* + * Copyright (c) 2018 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// CLASS HEADER +#include + +// EXTERNAL INCLUDES +#include +#include + +namespace Dali +{ + +namespace Internal +{ + +namespace Adaptor +{ + +namespace +{ + +// The default plugin name +const char* DEFAULT_OBJECT_NAME( "libdali-vector-animation-renderer-plugin.so" ); + +} + +VectorAnimationRendererPluginProxy::VectorAnimationRendererPluginProxy( const std::string& sharedObjectName ) +: mSharedObjectName(), + mLibHandle( NULL ), + mPlugin( NULL ), + mCreateVectorAnimationRendererPtr( NULL ) +{ + if( !sharedObjectName.empty() ) + { + mSharedObjectName = sharedObjectName; + } + else + { + mSharedObjectName = DEFAULT_OBJECT_NAME; + } + + Initialize(); +} + +VectorAnimationRendererPluginProxy::~VectorAnimationRendererPluginProxy() +{ + if( mPlugin ) + { + delete mPlugin; + mPlugin = NULL; + + if( mLibHandle && dlclose( mLibHandle ) ) + { + DALI_LOG_ERROR( "Error closing vector animation renderer plugin library: %s\n", dlerror() ); + } + } +} + +void VectorAnimationRendererPluginProxy::Initialize() +{ + mLibHandle = dlopen( mSharedObjectName.c_str(), RTLD_LAZY ); + + char* error = dlerror(); + if( mLibHandle == NULL || error != NULL ) + { + DALI_LOG_ERROR( "VectorAnimationRendererPluginProxy::Initialize: dlopen error [%s]\n", error ); + return; + } + + // load plugin + mCreateVectorAnimationRendererPtr = reinterpret_cast< CreateVectorAnimationRendererFunction >( dlsym( mLibHandle, "CreateVectorAnimationRendererPlugin" ) ); + + error = dlerror(); + if( mCreateVectorAnimationRendererPtr == NULL || error != NULL ) + { + DALI_LOG_ERROR( "VectorAnimationRendererPluginProxy::Initialize: Cannot load symbol: %s\n", error ); + return; + } + + mPlugin = mCreateVectorAnimationRendererPtr(); + if( !mPlugin ) + { + DALI_LOG_ERROR("VectorAnimationRendererPluginProxy::Initialize: Plugin creation failed\n"); + return; + } +} + +bool VectorAnimationRendererPluginProxy::CreateRenderer( const std::string& url, Dali::Renderer renderer, uint32_t width, uint32_t height ) +{ + if( mPlugin ) + { + return mPlugin->CreateRenderer( url, renderer, width, height ); + } + return false; +} + +bool VectorAnimationRendererPluginProxy::StartRender() +{ + if( mPlugin ) + { + return mPlugin->StartRender(); + } + return false; +} + +void VectorAnimationRendererPluginProxy::StopRender() +{ + if( mPlugin ) + { + mPlugin->StopRender(); + } +} + +void VectorAnimationRendererPluginProxy::Render( uint32_t frameNumber ) +{ + if( mPlugin ) + { + mPlugin->Render( frameNumber ); + } +} + +uint32_t VectorAnimationRendererPluginProxy::GetTotalFrameNumber() +{ + if( mPlugin ) + { + return mPlugin->GetTotalFrameNumber(); + } + return 0; +} + +} // namespace Adaptor + +} // namespace Internal + +} // namespace Dali diff --git a/dali/internal/vector-animation/common/vector-animation-renderer-plugin-proxy.h b/dali/internal/vector-animation/common/vector-animation-renderer-plugin-proxy.h new file mode 100644 index 0000000..55409ea --- /dev/null +++ b/dali/internal/vector-animation/common/vector-animation-renderer-plugin-proxy.h @@ -0,0 +1,100 @@ +#ifndef DALI_INTERNAL_VECTOR_ANIMATION_RENDERER_PLUGIN_PROXY_H +#define DALI_INTERNAL_VECTOR_ANIMATION_RENDERER_PLUGIN_PROXY_H + +/* + * Copyright (c) 2018 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// INTERNAL INCLUDES +#include + +namespace Dali +{ + +namespace Internal +{ + +namespace Adaptor +{ + +/** + * Proxy class to dynamically load, use and unload vector animation renderer plugin. + */ +class VectorAnimationRendererPluginProxy +{ +public: + + /** + * @brief Constructor + */ + VectorAnimationRendererPluginProxy( const std::string& sharedObjectName ); + + /** + * @brief Destructor + */ + ~VectorAnimationRendererPluginProxy(); + + /** + * @copydoc Dali::VectorAnimationRendererPlugin::CreateRenderer() + */ + bool CreateRenderer( const std::string& url, Dali::Renderer renderer, uint32_t width, uint32_t height ); + + /** + * @copydoc Dali::VectorAnimationRendererPlugin::StartRender() + */ + bool StartRender(); + + /** + * @copydoc Dali::VectorAnimationRendererPlugin::StopRender() + */ + void StopRender(); + + /** + * @copydoc Dali::VectorAnimationRendererPlugin::Render() + */ + void Render( uint32_t frameNumber ); + + /** + * @copydoc Dali::VectorAnimationRendererPlugin::GetTotalFrameNumber() + */ + uint32_t GetTotalFrameNumber(); + +private: + + /** + * Dynamically loads the plugin. + */ + void Initialize(); + +private: + + using CreateVectorAnimationRendererFunction = Dali::VectorAnimationRendererPlugin* (*)(); + + std::string mSharedObjectName; ///< Shared object name + void* mLibHandle; ///< Handle for the loaded library + Dali::VectorAnimationRendererPlugin* mPlugin; ///< Plugin handle + + CreateVectorAnimationRendererFunction mCreateVectorAnimationRendererPtr; ///< Function pointer called in adaptor to create a plugin instance + +}; + +} // namespace Adaptor + +} // namespace Internal + +} // namespace Dali + +#endif // DALI_INTERNAL_VECTOR_ANIMATION_RENDERER_PLUGIN_PROXY_H diff --git a/dali/internal/vector-animation/file.list b/dali/internal/vector-animation/file.list new file mode 100644 index 0000000..8edeeb0 --- /dev/null +++ b/dali/internal/vector-animation/file.list @@ -0,0 +1,7 @@ + + +# module: vector-animation, backend: common +adaptor_vector_animation_common_src_files=\ + ${adaptor_vector_animation_dir}/common/vector-animation-renderer-impl.cpp \ + ${adaptor_vector_animation_dir}/common/vector-animation-renderer-plugin-proxy.cpp + diff --git a/dali/internal/window-system/common/window-base.h b/dali/internal/window-system/common/window-base.h index 91a958c..b2b1af5 100644 --- a/dali/internal/window-system/common/window-base.h +++ b/dali/internal/window-system/common/window-base.h @@ -327,12 +327,6 @@ public: virtual void GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiVertical ) = 0; /** - * @brief Set the stereoscopic 3D view mode - * @param[in] viewMode The new view mode - */ - virtual void SetViewMode( ViewMode viewMode ) = 0; - - /** * @brief Get the screen rotation angle of the window */ virtual int GetScreenRotationAngle() = 0; diff --git a/dali/internal/window-system/common/window-impl.cpp b/dali/internal/window-system/common/window-impl.cpp index 8412d53..2ea6269 100644 --- a/dali/internal/window-system/common/window-impl.cpp +++ b/dali/internal/window-system/common/window-impl.cpp @@ -488,21 +488,22 @@ void Window::SetSize( Dali::Window::WindowSize size ) mResizeEnabled = true; } - PositionSize positionSize = mSurface->GetPositionSize(); + PositionSize oldRect = mSurface->GetPositionSize(); - if( positionSize.width != size.GetWidth() || positionSize.height != size.GetHeight() ) - { - positionSize.width = size.GetWidth(); - positionSize.height = size.GetHeight(); + mSurface->MoveResize( PositionSize( oldRect.x, oldRect.y, size.GetWidth(), size.GetHeight() ) ); - mSurface->MoveResize( positionSize ); + PositionSize newRect = mSurface->GetPositionSize(); + + // When surface size is updated, inform adaptor of resizing and emit ResizeSignal + if( ( oldRect.width != newRect.width ) || ( oldRect.height != newRect.height ) ) + { + Uint16Pair newSize( newRect.width, newRect.height ); - mAdaptor->SurfaceResizePrepare( Adaptor::SurfaceSize( positionSize.width, positionSize.height ) ); + mAdaptor->SurfaceResizePrepare( newSize ); - // Emit signal - mResizedSignal.Emit( Dali::Window::WindowSize( positionSize.width, positionSize.height ) ); + mResizedSignal.Emit( newSize ); - mAdaptor->SurfaceResizeComplete( Adaptor::SurfaceSize( positionSize.width, positionSize.height ) ); + mAdaptor->SurfaceResizeComplete( newSize ); } } @@ -521,15 +522,9 @@ void Window::SetPosition( Dali::Window::WindowPosition position ) mResizeEnabled = true; } - PositionSize positionSize = mSurface->GetPositionSize(); - - if( positionSize.x != position.GetX() || positionSize.y != position.GetY() ) - { - positionSize.x = position.GetX(); - positionSize.y = position.GetY(); + PositionSize oldRect = mSurface->GetPositionSize(); - mSurface->MoveResize( positionSize ); - } + mSurface->MoveResize( PositionSize( position.GetX(), position.GetY(), oldRect.width, oldRect.height ) ); } Dali::Window::WindowPosition Window::GetPosition() const @@ -539,6 +534,33 @@ Dali::Window::WindowPosition Window::GetPosition() const return Dali::Window::WindowPosition( positionSize.x, positionSize.y ); } +void Window::SetPositionSize( PositionSize positionSize ) +{ + if( !mResizeEnabled ) + { + AddAuxiliaryHint( "wm.policy.win.user.geometry", "1" ); + mResizeEnabled = true; + } + + PositionSize oldRect = mSurface->GetPositionSize(); + + mSurface->MoveResize( positionSize ); + + PositionSize newRect = mSurface->GetPositionSize(); + + // When surface size is updated, inform adaptor of resizing and emit ResizeSignal + if( ( oldRect.width != newRect.width ) || ( oldRect.height != newRect.height ) ) + { + Uint16Pair newSize( newRect.width, newRect.height ); + + mAdaptor->SurfaceResizePrepare( newSize ); + + mResizedSignal.Emit( newSize ); + + mAdaptor->SurfaceResizeComplete( newSize ); + } +} + void Window::SetTransparency( bool transparent ) { mSurface->SetTransparency( transparent ); diff --git a/dali/internal/window-system/common/window-impl.h b/dali/internal/window-system/common/window-impl.h index c2a2b48..fff44b7 100644 --- a/dali/internal/window-system/common/window-impl.h +++ b/dali/internal/window-system/common/window-impl.h @@ -300,6 +300,11 @@ public: Dali::Window::WindowPosition GetPosition() const; /** + * @copydoc Dali::DevelWindow::SetPositionSize() + */ + void SetPositionSize( PositionSize positionSize ); + + /** * @copydoc Dali::Window::SetTransparency() */ void SetTransparency( bool transparent ); diff --git a/dali/internal/window-system/common/window-render-surface.cpp b/dali/internal/window-system/common/window-render-surface.cpp index d97ffd2..cac09c5 100644 --- a/dali/internal/window-system/common/window-render-surface.cpp +++ b/dali/internal/window-system/common/window-render-surface.cpp @@ -57,6 +57,7 @@ WindowRenderSurface::WindowRenderSurface( Dali::PositionSize positionSize, Any s mThreadSynchronization( NULL ), mRenderNotification( NULL ), mRotationTrigger( NULL ), + mGraphics( nullptr ), mColorDepth( isTransparent ? COLOR_DEPTH_32 : COLOR_DEPTH_24 ), mOutputTransformedSignal(), mRotationAngle( 0 ), @@ -319,11 +320,6 @@ void WindowRenderSurface::MoveResize( Dali::PositionSize positionSize ) DALI_LOG_INFO( gWindowRenderSurfaceLogFilter, Debug::Verbose, "WindowRenderSurface::MoveResize: %d, %d, %d, %d\n", mPositionSize.x, mPositionSize.y, mPositionSize.width, mPositionSize.height ); } -void WindowRenderSurface::SetViewMode( ViewMode viewMode ) -{ - mWindowBase->SetViewMode( viewMode ); -} - void WindowRenderSurface::StartRender() { } @@ -365,8 +361,11 @@ bool WindowRenderSurface::PreRender( bool resizingSurface ) } auto eglGraphics = static_cast(mGraphics); - auto mGLES = eglGraphics->GetGlesInterface(); - mGLES.PreRender(); + if ( eglGraphics ) + { + GlImplementation& mGLES = eglGraphics->GetGlesInterface(); + mGLES.PreRender(); + } return true; } @@ -375,39 +374,42 @@ void WindowRenderSurface::PostRender( bool renderToFbo, bool replacingSurface, b { // Inform the gl implementation that rendering has finished before informing the surface auto eglGraphics = static_cast(mGraphics); - auto mGLES = eglGraphics->GetGlesInterface(); - mGLES.PostRender(); - - if( renderToFbo ) + if ( eglGraphics ) { - mGLES.Flush(); - mGLES.Finish(); - } - else - { - if( resizingSurface ) + GlImplementation& mGLES = eglGraphics->GetGlesInterface(); + mGLES.PostRender(); + + if( renderToFbo ) { - if( !mRotationFinished ) + mGLES.Flush(); + mGLES.Finish(); + } + else + { + if( resizingSurface ) { - DALI_LOG_INFO( gWindowRenderSurfaceLogFilter, Debug::Verbose, "WindowRenderSurface::PostRender: Trigger rotation event\n" ); + if( !mRotationFinished ) + { + DALI_LOG_INFO( gWindowRenderSurfaceLogFilter, Debug::Verbose, "WindowRenderSurface::PostRender: Trigger rotation event\n" ); - mRotationTrigger->Trigger(); + mRotationTrigger->Trigger(); - if( mThreadSynchronization ) - { - // Wait until the event-thread complete the rotation event processing - mThreadSynchronization->PostRenderWaitForCompletion(); + if( mThreadSynchronization ) + { + // Wait until the event-thread complete the rotation event processing + mThreadSynchronization->PostRenderWaitForCompletion(); + } } } } - } - Internal::Adaptor::EglImplementation& eglImpl = eglGraphics->GetEglImplementation(); - eglImpl.SwapBuffers(); + Internal::Adaptor::EglImplementation& eglImpl = eglGraphics->GetEglImplementation(); + eglImpl.SwapBuffers(); - if( mRenderNotification ) - { - mRenderNotification->Trigger(); + if( mRenderNotification ) + { + mRenderNotification->Trigger(); + } } } diff --git a/dali/internal/window-system/common/window-render-surface.h b/dali/internal/window-system/common/window-render-surface.h index 6f93259..a1ba715 100644 --- a/dali/internal/window-system/common/window-render-surface.h +++ b/dali/internal/window-system/common/window-render-surface.h @@ -149,11 +149,6 @@ public: // from Dali::RenderSurface virtual void MoveResize( Dali::PositionSize positionSize) override; /** - * @copydoc Dali::RenderSurface::SetViewMode() - */ - virtual void SetViewMode( ViewMode viewMode ) override; - - /** * @copydoc Dali::RenderSurface::StartRender() */ virtual void StartRender() override; diff --git a/dali/internal/window-system/tizen-wayland/ecore-wl/window-base-ecore-wl.cpp b/dali/internal/window-system/tizen-wayland/ecore-wl/window-base-ecore-wl.cpp index 6af5474..c4574fd 100644 --- a/dali/internal/window-system/tizen-wayland/ecore-wl/window-base-ecore-wl.cpp +++ b/dali/internal/window-system/tizen-wayland/ecore-wl/window-base-ecore-wl.cpp @@ -2139,10 +2139,6 @@ void WindowBaseEcoreWl::GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiVe dpiVertical = int( yres + 0.5f ); } -void WindowBaseEcoreWl::SetViewMode( ViewMode viewMode ) -{ -} - int WindowBaseEcoreWl::GetScreenRotationAngle() { int transform = 0; diff --git a/dali/internal/window-system/tizen-wayland/ecore-wl/window-base-ecore-wl.h b/dali/internal/window-system/tizen-wayland/ecore-wl/window-base-ecore-wl.h index da8e8b3..210d1aa 100644 --- a/dali/internal/window-system/tizen-wayland/ecore-wl/window-base-ecore-wl.h +++ b/dali/internal/window-system/tizen-wayland/ecore-wl/window-base-ecore-wl.h @@ -415,11 +415,6 @@ public: virtual void GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiVertical ) override; /** - * @copydoc Dali::Internal::Adaptor::WindowBase::SetViewMode() - */ - virtual void SetViewMode( ViewMode viewMode ) override; - - /** * @copydoc Dali::Internal::Adaptor::WindowBase::GetScreenRotationAngle() */ virtual int GetScreenRotationAngle() override; diff --git a/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp b/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp index c1b4534..5ae9032 100755 --- a/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp +++ b/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp @@ -35,6 +35,7 @@ #include #include #include +#include namespace Dali { @@ -606,7 +607,9 @@ WindowBaseEcoreWl2::WindowBaseEcoreWl2( Dali::PositionSize positionSize, Any sur mBrightness( 0 ), mBrightnessChangeState( 0 ), mBrightnessChangeDone( true ), - mOwnSurface( false ) + mOwnSurface( false ), + mMoveResizeSerial( 0 ), + mLastSubmittedMoveResizeSerial( 0 ) #ifdef DALI_ELDBUS_AVAILABLE , mSystemConnection( NULL ) #endif @@ -1332,6 +1335,13 @@ void WindowBaseEcoreWl2::SetEglWindowTransform( int angle ) void WindowBaseEcoreWl2::ResizeEglWindow( PositionSize positionSize ) { wl_egl_window_resize( mEglWindow, positionSize.width, positionSize.height, positionSize.x, positionSize.y ); + + // Note: Both "Resize" and "MoveResize" cases can reach here, but only "MoveResize" needs to submit serial number + if( mMoveResizeSerial != mLastSubmittedMoveResizeSerial ) + { + wl_egl_window_tizen_set_window_serial( mEglWindow, mMoveResizeSerial ); + mLastSubmittedMoveResizeSerial = mMoveResizeSerial; + } } bool WindowBaseEcoreWl2::IsEglWindowRotationSupported() @@ -1358,8 +1368,7 @@ void WindowBaseEcoreWl2::Resize( PositionSize positionSize ) void WindowBaseEcoreWl2::MoveResize( PositionSize positionSize ) { - ecore_wl2_window_position_set( mEcoreWindow, positionSize.x, positionSize.y ); - ecore_wl2_window_geometry_set( mEcoreWindow, positionSize.x, positionSize.y, positionSize.width, positionSize.height ); + ecore_wl2_window_sync_geometry_set( mEcoreWindow, ++mMoveResizeSerial, positionSize.x, positionSize.y, positionSize.width, positionSize.height ); } void WindowBaseEcoreWl2::ShowIndicator( Dali::Window::IndicatorVisibleMode visibleMode, Dali::Window::IndicatorBgOpacity opacityMode ) @@ -2148,10 +2157,6 @@ void WindowBaseEcoreWl2::GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiV dpiVertical = int( yres + 0.5f ); } -void WindowBaseEcoreWl2::SetViewMode( ViewMode viewMode ) -{ -} - int WindowBaseEcoreWl2::GetScreenRotationAngle() { int transform = 0; diff --git a/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.h b/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.h index 246bd3a..808c4f0 100644 --- a/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.h +++ b/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.h @@ -415,11 +415,6 @@ public: virtual void GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiVertical ) override; /** - * @copydoc Dali::Internal::Adaptor::WindowBase::SetViewMode() - */ - virtual void SetViewMode( ViewMode viewMode ) override; - - /** * @copydoc Dali::Internal::Adaptor::WindowBase::GetScreenRotationAngle() */ virtual int GetScreenRotationAngle() override; @@ -495,6 +490,9 @@ private: bool mOwnSurface; + volatile uint32_t mMoveResizeSerial; + uint32_t mLastSubmittedMoveResizeSerial; + #ifdef DALI_ELDBUS_AVAILABLE Eldbus_Connection* mSystemConnection; #endif // DALI_ELDBUS_AVAILABLE diff --git a/dali/internal/window-system/tizen-wayland/native-render-surface-ecore-wl.cpp b/dali/internal/window-system/tizen-wayland/native-render-surface-ecore-wl.cpp index a39f707..e019b0a 100644 --- a/dali/internal/window-system/tizen-wayland/native-render-surface-ecore-wl.cpp +++ b/dali/internal/window-system/tizen-wayland/native-render-surface-ecore-wl.cpp @@ -54,6 +54,7 @@ Debug::Filter* gNativeSurfaceLogFilter = Debug::Filter::New(Debug::Verbose, fals NativeRenderSurfaceEcoreWl::NativeRenderSurfaceEcoreWl( Dali::PositionSize positionSize, bool isTransparent ) : mPosition( positionSize ), mRenderNotification( NULL ), + mGraphics( NULL ), mColorDepth( isTransparent ? COLOR_DEPTH_32 : COLOR_DEPTH_24 ), mTbmFormat( isTransparent ? TBM_FORMAT_ARGB8888 : TBM_FORMAT_RGB888 ), mOwnSurface( false ), @@ -197,10 +198,6 @@ void NativeRenderSurfaceEcoreWl::MoveResize( Dali::PositionSize positionSize ) { } -void NativeRenderSurfaceEcoreWl::SetViewMode( ViewMode viewMode ) -{ -} - void NativeRenderSurfaceEcoreWl::StartRender() { } @@ -214,9 +211,12 @@ bool NativeRenderSurfaceEcoreWl::PreRender( bool ) void NativeRenderSurfaceEcoreWl::PostRender( bool renderToFbo, bool replacingSurface, bool resizingSurface ) { auto eglGraphics = static_cast(mGraphics); - Internal::Adaptor::EglImplementation& eglImpl = eglGraphics->GetEglImplementation(); + if ( eglGraphics ) + { + Internal::Adaptor::EglImplementation& eglImpl = eglGraphics->GetEglImplementation(); - eglImpl.SwapBuffers(); + eglImpl.SwapBuffers(); + } if( mThreadSynchronization ) { diff --git a/dali/internal/window-system/tizen-wayland/native-render-surface-ecore-wl.h b/dali/internal/window-system/tizen-wayland/native-render-surface-ecore-wl.h index 6978b0f..1199b3e 100644 --- a/dali/internal/window-system/tizen-wayland/native-render-surface-ecore-wl.h +++ b/dali/internal/window-system/tizen-wayland/native-render-surface-ecore-wl.h @@ -107,11 +107,6 @@ public: // from Dali::RenderSurface virtual void MoveResize( Dali::PositionSize positionSize) override; /** - * @copydoc Dali::RenderSurface::SetViewMode() - */ - virtual void SetViewMode( ViewMode viewMode ) override; - - /** * @copydoc Dali::RenderSurface::StartRender() */ virtual void StartRender() override; diff --git a/dali/internal/window-system/ubuntu-x11/pixmap-render-surface-ecore-x.cpp b/dali/internal/window-system/ubuntu-x11/pixmap-render-surface-ecore-x.cpp index bd31ff8..03259eb 100644 --- a/dali/internal/window-system/ubuntu-x11/pixmap-render-surface-ecore-x.cpp +++ b/dali/internal/window-system/ubuntu-x11/pixmap-render-surface-ecore-x.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 Samsung Electronics Co., Ltd. + * Copyright (c) 2018 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. @@ -55,13 +55,18 @@ static const int INITIAL_CONSUME_BUFFER_INDEX = 1; } PixmapRenderSurfaceEcoreX::PixmapRenderSurfaceEcoreX( Dali::PositionSize positionSize, Any surface, bool isTransparent ) -: mPosition( positionSize ), +: mGraphics( nullptr ), + mDisplayConnection( nullptr ), + mPosition( positionSize ), mRenderNotification( NULL ), mColorDepth( isTransparent ? COLOR_DEPTH_32 : COLOR_DEPTH_24 ), mOwnSurface( false ), mProduceBufferIndex( INITIAL_PRODUCE_BUFFER_INDEX ), mConsumeBufferIndex( INITIAL_CONSUME_BUFFER_INDEX ), - mThreadSynchronization(NULL) + mX11Pixmaps(), + mEglSurfaces(), + mThreadSynchronization( nullptr ), + mPixmapCondition() { for( int i = 0; i != BUFFER_COUNT; ++i ) { diff --git a/dali/internal/window-system/ubuntu-x11/pixmap-render-surface-ecore-x.h b/dali/internal/window-system/ubuntu-x11/pixmap-render-surface-ecore-x.h index 48868cc..873e7f4 100644 --- a/dali/internal/window-system/ubuntu-x11/pixmap-render-surface-ecore-x.h +++ b/dali/internal/window-system/ubuntu-x11/pixmap-render-surface-ecore-x.h @@ -108,11 +108,6 @@ public: // from Dali::RenderSurface virtual void MoveResize( Dali::PositionSize positionSize) override {} /** - * @copydoc Dali::RenderSurface::SetViewMode() - */ - void SetViewMode( ViewMode viewMode ) override {} - - /** * @copydoc Dali::RenderSurface::StartRender() */ virtual void StartRender() override; diff --git a/dali/internal/window-system/ubuntu-x11/window-base-ecore-x.cpp b/dali/internal/window-system/ubuntu-x11/window-base-ecore-x.cpp index 639a334..4ff9d56 100755 --- a/dali/internal/window-system/ubuntu-x11/window-base-ecore-x.cpp +++ b/dali/internal/window-system/ubuntu-x11/window-base-ecore-x.cpp @@ -866,17 +866,6 @@ void WindowBaseEcoreX::GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiVer dpiVertical = int( yres + 0.5f ); } -void WindowBaseEcoreX::SetViewMode( ViewMode viewMode ) -{ - Ecore_X_Atom viewModeAtom( ecore_x_atom_get( "_E_COMP_3D_APP_WIN" ) ); - - if( viewModeAtom != None ) - { - unsigned int value( static_cast< unsigned int >( viewMode ) ); - ecore_x_window_prop_card32_set( mEcoreWindow, viewModeAtom, &value, 1 ); - } -} - int WindowBaseEcoreX::GetScreenRotationAngle() { return 0; diff --git a/dali/internal/window-system/ubuntu-x11/window-base-ecore-x.h b/dali/internal/window-system/ubuntu-x11/window-base-ecore-x.h index 2873bbc..6cb0513 100644 --- a/dali/internal/window-system/ubuntu-x11/window-base-ecore-x.h +++ b/dali/internal/window-system/ubuntu-x11/window-base-ecore-x.h @@ -344,11 +344,6 @@ public: virtual void GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiVertical ) override; /** - * @copydoc Dali::Internal::Adaptor::WindowBase::SetViewMode() - */ - virtual void SetViewMode( ViewMode viewMode ) override; - - /** * @copydoc Dali::Internal::Adaptor::WindowBase::GetScreenRotationAngle() */ virtual int GetScreenRotationAngle() override; diff --git a/dali/public-api/adaptor-framework/application.cpp b/dali/public-api/adaptor-framework/application.cpp index 3405faf..188e382 100644 --- a/dali/public-api/adaptor-framework/application.cpp +++ b/dali/public-api/adaptor-framework/application.cpp @@ -192,24 +192,22 @@ std::string Application::GetLanguage() const return Internal::Adaptor::GetImplementation(*this).GetLanguage(); } -void Application::SetViewMode( ViewMode viewMode ) +void Application::SetViewMode( ViewMode /*viewMode*/ ) { - Internal::Adaptor::GetImplementation(*this).SetViewMode( viewMode ); } ViewMode Application::GetViewMode() const { - return Internal::Adaptor::GetImplementation(*this).GetViewMode(); + return ViewMode::MONO; } -void Application::SetStereoBase( float stereoBase ) +void Application::SetStereoBase( float /*stereoBase*/ ) { - Internal::Adaptor::GetImplementation(*this).SetStereoBase( stereoBase ); } float Application::GetStereoBase() const { - return Internal::Adaptor::GetImplementation(*this).GetStereoBase(); + return 0.f; } Application::AppSignalType& Application::InitSignal() diff --git a/dali/public-api/adaptor-framework/application.h b/dali/public-api/adaptor-framework/application.h index e6d8ccd..e9449ad 100644 --- a/dali/public-api/adaptor-framework/application.h +++ b/dali/public-api/adaptor-framework/application.h @@ -324,6 +324,7 @@ public: // Stereoscopy * @brief Sets the viewing mode for the application. * @SINCE_1_0.0 * @param[in] viewMode The new viewing mode + * @DEPRECATED_1_3.39 */ void SetViewMode( ViewMode viewMode ); @@ -331,6 +332,7 @@ public: // Stereoscopy * @brief Gets the current viewing mode. * @SINCE_1_0.0 * @return The current viewing mode + * @DEPRECATED_1_3.39 */ ViewMode GetViewMode() const; @@ -341,6 +343,7 @@ public: // Stereoscopy * between 50mm and 70mm. The default value is 65mm. * @SINCE_1_0.0 * @param[in] stereoBase The stereo base (eye separation) for Stereoscopic 3D + * @DEPRECATED_1_3.39 */ void SetStereoBase( float stereoBase ); @@ -349,6 +352,7 @@ public: // Stereoscopy * * @SINCE_1_0.0 * @return The stereo base (eye separation) for Stereoscopic 3D + * @DEPRECATED_1_3.39 */ float GetStereoBase() const; diff --git a/dali/public-api/dali-adaptor-version.cpp b/dali/public-api/dali-adaptor-version.cpp index 73abba2..0f5ca5a 100644 --- a/dali/public-api/dali-adaptor-version.cpp +++ b/dali/public-api/dali-adaptor-version.cpp @@ -28,7 +28,7 @@ namespace Dali const unsigned int ADAPTOR_MAJOR_VERSION = 1; const unsigned int ADAPTOR_MINOR_VERSION = 3; -const unsigned int ADAPTOR_MICRO_VERSION = 50; +const unsigned int ADAPTOR_MICRO_VERSION = 51; const char * const ADAPTOR_BUILD_DATE = __DATE__ " " __TIME__; #ifdef DEBUG_ENABLED diff --git a/packaging/dali-adaptor.spec b/packaging/dali-adaptor.spec index 2d52617..d0afeeb 100644 --- a/packaging/dali-adaptor.spec +++ b/packaging/dali-adaptor.spec @@ -19,7 +19,7 @@ Name: dali-adaptor Summary: The DALi Tizen Adaptor -Version: 1.3.50 +Version: 1.3.51 Release: 1 Group: System/Libraries License: Apache-2.0 and BSD-3-Clause and MIT @@ -98,6 +98,7 @@ BuildRequires: wayland-extension-client-devel # dali-adaptor uses ecore mainloop %if 0%{?tizen_version_major} >= 5 BuildRequires: pkgconfig(ecore-wl2) +BuildRequires: pkgconfig(wayland-egl-tizen) %else BuildRequires: pkgconfig(ecore-wayland) %endif