/*
- * Copyright (c) 2019 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.
{
}
-void TestGlAbstraction::ConvertTexture( uint8_t* buffer, GLenum& imageGlFormat, const uint32_t dataSize, const GLenum textureGlFormat, const bool isSubImage )
-{
-}
-
} // Namespace dali
bool BlendEnabled(const Dali::TraceCallStack& callStack)
#define TEST_GL_ABSTRACTION_H
/*
- * Copyright (c) 2019 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.
void PreRender();
void PostRender();
- void ConvertTexture( uint8_t* buffer, GLenum& imageGlFormat, const uint32_t dataSize, const GLenum textureGlFormat, const bool isSubImage );
-
/* OpenGL ES 2.0 */
inline void ActiveTexture( GLenum textureUnit )
* A native surface is created.
*
* @param [in] positionSize the position and size of the surface to create
- * @param [in] name Name of surface passed in
* @param [in] isTransparent Whether the surface has an alpha channel
*/
NativeRenderSurface* CreateNativeSurface( PositionSize positionSize,
- const std::string& name,
bool isTransparent );
} // namespace Dali
mMainWindow(),
mMainWindowMode( windowMode ),
mMainWindowName(),
+ mMainWindowReplaced( false ),
mStylesheet( stylesheet ),
mEnvironmentOptions(),
mWindowPositionSize( positionSize ),
mLowMemorySignal.Emit( status );
}
+
void Application::OnResize(Dali::Adaptor& adaptor)
{
Dali::Application application(this);
Dali::Window Application::GetWindow()
{
- return mMainWindow;
+ // Changed to return a different window handle after ReplaceWindow is called
+ // just for backward compatibility to make the test case pass
+ return mMainWindowReplaced ? Dali::Window() : mMainWindow;
}
// Stereoscopy
void Application::ReplaceWindow( const PositionSize& positionSize, const std::string& name )
{
- Any surface;
- auto renderSurfaceFactory = Dali::Internal::Adaptor::GetRenderSurfaceFactory();
- std::unique_ptr<Internal::Adaptor::WindowRenderSurface> renderSurface =
- renderSurfaceFactory->CreateWindowRenderSurface( positionSize, surface, false );
+ // This API is kept just for backward compatibility to make the test case pass.
- Internal::Adaptor::Adaptor::GetImplementation( *mAdaptor ).ReplaceSurface( mMainWindow, *renderSurface.release() );
- mWindowPositionSize = positionSize;
+ mMainWindowReplaced = true;
+ OnResize( *mAdaptor );
}
std::string Application::GetResourcePath()
Dali::Application::WINDOW_MODE mMainWindowMode; ///< Window mode of the main window
std::string mMainWindowName; ///< Name of the main window as obtained from environment options
+ bool mMainWindowReplaced; ///< Whether the main window has been replaced
+
std::string mStylesheet;
EnvironmentOptions mEnvironmentOptions;
PositionSize mWindowPositionSize;
#define __DALI_INTERNAL_GL_IMPLEMENTATION_H__
/*
- * Copyright (c) 2019 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.
/* Do nothing in main implementation */
}
- void ConvertTexture( uint8_t* buffer, GLenum& imageGlFormat, const uint32_t dataSize, const GLenum textureGlFormat, const bool isSubImage )
- {
- bool convert = ( ( imageGlFormat == GL_RGB ) && ( textureGlFormat == GL_RGBA ) );
-#if DALI_GLES_VERSION >= 30
- // Don't convert manually from RGB to RGBA if GLES >= 3.0 and a sub-image is uploaded.
- convert = convert && !isSubImage;
-#endif // DALI_GLES_VERSION >= 30
-
- if( convert )
- {
- //This buffer is only used if manually converting from RGB to RGBA
- uint8_t* tempBuffer(0);
-
- tempBuffer = new uint8_t[dataSize*4u];
- for( uint32_t i = 0u; i < dataSize; ++i )
- {
- tempBuffer[i*4u] = buffer[i*3u];
- tempBuffer[i*4u+1] = buffer[i*3u+1];
- tempBuffer[i*4u+2] = buffer[i*3u+2];
- tempBuffer[i*4u+3] = 0xFF;
- }
- buffer = tempBuffer;
- imageGlFormat = textureGlFormat; // Set the glFormat to GL_RGBA
-
- //Destroy temp buffer used for conversion RGB->RGBA
- delete[] tempBuffer;
- }
- }
-
/* OpenGL ES 2.0 */
void ActiveTexture (GLenum texture)
void Application::ReplaceWindow(PositionSize windowPosition, const std::string& name)
{
+ DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: ReplaceWindow is deprecated and will be removed from next release.\n" );
+
Internal::Adaptor::GetImplementation(*this).ReplaceWindow(windowPosition, name);
}
bool AddIdle( CallbackBase* callback );
/**
- * @brief Retrieves the window used by the Application class.
+ * @brief Retrieves the main window used by the Application class.
*
* The application writer can use the window to change indicator and orientation
* properties.
Window GetWindow();
/**
+ * @DEPRECATED_1_4.12
* @brief Replaces the current window.
*
* This will force context loss.
* @param[in] windowPosition The position and size parameters of the new window
* @param[in] name The name of the new window
*/
- void ReplaceWindow(PositionSize windowPosition, const std::string& name);
+ void ReplaceWindow(PositionSize windowPosition, const std::string& name) DALI_DEPRECATED_API;
/**
* @brief Get path application resources are stored at
const unsigned int ADAPTOR_MAJOR_VERSION = 1;
const unsigned int ADAPTOR_MINOR_VERSION = 4;
-const unsigned int ADAPTOR_MICRO_VERSION = 11;
+const unsigned int ADAPTOR_MICRO_VERSION = 12;
const char * const ADAPTOR_BUILD_DATE = __DATE__ " " __TIME__;
#ifdef DEBUG_ENABLED
Name: dali-adaptor
Summary: The DALi Tizen Adaptor
-Version: 1.4.11
+Version: 1.4.12
Release: 1
Group: System/Libraries
License: Apache-2.0 and BSD-3-Clause and MIT