X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-toolkit%2Fdali-toolkit-test-utils%2Ftoolkit-adaptor.cpp;h=5d6cf4e8142f64ef74f069813fffe48bebd9f3a5;hb=a9ef88e778c6217a9f005e679d22d5f64f92408a;hp=4b25c5da0f4e9ea71e35a349ab532c92b7009921;hpb=6ae9cd5f03bd0a8393eebf3cfb4508cab7fd3ede;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-adaptor.cpp b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-adaptor.cpp index 4b25c5d..5d6cf4e 100644 --- a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-adaptor.cpp +++ b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-adaptor.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 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. @@ -21,6 +21,9 @@ #include #include +#include +#include +#include namespace Dali { @@ -40,9 +43,9 @@ Dali::Adaptor& Adaptor::Get() return *adaptor; } -Dali::RenderSurface& Adaptor::GetSurface() +Dali::RenderSurfaceInterface& Adaptor::GetSurface() { - Dali::RenderSurface *renderSurface = new Dali::TestRenderSurface; + Dali::RenderSurfaceInterface* renderSurface = reinterpret_cast ( new Dali::TestRenderSurface( Dali::PositionSize( 0, 0, 480, 800 ) ) ); return *renderSurface; } @@ -65,12 +68,12 @@ Adaptor& Adaptor::New( Window window, Configuration::ContextLoss configuration ) return Internal::Adaptor::Adaptor::Get(); } -Adaptor& Adaptor::New( Any nativeWindow, const Dali::RenderSurface& surface ) +Adaptor& Adaptor::New( Any nativeWindow, const Dali::RenderSurfaceInterface& surface ) { return Internal::Adaptor::Adaptor::Get(); } -Adaptor& Adaptor::New( Any nativeWindow, const Dali::RenderSurface& surface, Configuration::ContextLoss configuration ) +Adaptor& Adaptor::New( Any nativeWindow, const Dali::RenderSurfaceInterface& surface, Configuration::ContextLoss configuration ) { return Internal::Adaptor::Adaptor::Get(); } @@ -95,7 +98,7 @@ void Adaptor::Stop() { } -bool Adaptor::AddIdle( CallbackBase* callback ) +bool Adaptor::AddIdle( CallbackBase* callback, bool hasReturnValue ) { const bool isAvailable = IsAvailable(); @@ -127,7 +130,7 @@ void Adaptor::RemoveIdle( CallbackBase* callback ) } } -void Adaptor::ReplaceSurface( Any nativeWindow, Dali::RenderSurface& surface ) +void Adaptor::ReplaceSurface( Any nativeWindow, Dali::RenderSurfaceInterface& surface ) { } @@ -141,7 +144,7 @@ Adaptor::AdaptorSignalType& Adaptor::LanguageChangedSignal() return Internal::Adaptor::Adaptor::AdaptorSignal(); } -RenderSurface& Adaptor::GetSurface() +Dali::RenderSurfaceInterface& Adaptor::GetSurface() { return Internal::Adaptor::Adaptor::GetSurface(); } @@ -202,12 +205,31 @@ void Adaptor::SceneCreated() { } -void Adaptor::SetViewMode( ViewMode mode ) +class LogFactory : public LogFactoryInterface { -} +public: + virtual void InstallLogFunction() const + { + Dali::Integration::Log::LogFunction logFunction(&TestApplication::LogMessage); + Dali::Integration::Log::InstallLogFunction(logFunction); + } + + LogFactory() + { + } + virtual ~LogFactory() + { + } +}; -void Adaptor::SetStereoBase( float stereoBase ) +LogFactory* gLogFactory = NULL; +const LogFactoryInterface& Adaptor::GetLogFactory() { + if( gLogFactory == NULL ) + { + gLogFactory = new LogFactory; + } + return *gLogFactory; } Adaptor::Adaptor()