$(devel_api_src_files) \
$(adaptor_devel_api_text_abstraction_src_files) \
$(adaptor_graphics_common_src_files) \
- $(adaptor_graphics_gles20_src_files) \
+ $(adaptor_graphics_gles_src_files) \
$(adaptor_graphics_ubuntu_src_files) \
$(adaptor_haptics_common_src_files) \
$(adaptor_imaging_common_src_files) \
$(devel_api_src_files) \
$(adaptor_devel_api_text_abstraction_src_files) \
$(adaptor_graphics_common_src_files) \
- $(adaptor_graphics_gles20_src_files) \
+ $(adaptor_graphics_gles_src_files) \
$(adaptor_graphics_tizen_src_files) \
$(adaptor_haptics_common_src_files) \
$(adaptor_imaging_common_src_files) \
$(devel_api_src_files) \
$(adaptor_devel_api_text_abstraction_src_files) \
$(adaptor_graphics_common_src_files) \
- $(adaptor_graphics_gles20_src_files) \
+ $(adaptor_graphics_gles_src_files) \
$(adaptor_graphics_tizen_src_files) \
$(adaptor_haptics_common_src_files) \
$(adaptor_haptics_tizen_src_files) \
$(devel_api_src_files) \
$(adaptor_devel_api_text_abstraction_src_files) \
$(adaptor_graphics_common_src_files) \
- $(adaptor_graphics_gles20_src_files) \
+ $(adaptor_graphics_gles_src_files) \
$(adaptor_graphics_tizen_src_files) \
$(adaptor_haptics_common_src_files) \
$(adaptor_imaging_common_src_files) \
$(devel_api_src_files) \
$(adaptor_devel_api_text_abstraction_src_files) \
$(adaptor_graphics_common_src_files) \
- $(adaptor_graphics_gles20_src_files) \
+ $(adaptor_graphics_gles_src_files) \
$(adaptor_graphics_tizen_src_files) \
$(adaptor_haptics_common_src_files) \
$(adaptor_imaging_common_src_files) \
$(devel_api_src_files) \
$(adaptor_devel_api_text_abstraction_src_files) \
$(adaptor_graphics_common_src_files) \
- $(adaptor_graphics_gles20_src_files) \
+ $(adaptor_graphics_gles_src_files) \
$(adaptor_graphics_tizen_src_files) \
$(adaptor_haptics_common_src_files) \
$(adaptor_imaging_common_src_files) \
return std::getenv( variable );
}
+bool SetEnvironmentVariable( const char * variable, const char * value )
+{
+ return setenv( variable, value, 1 ) == 0;
+}
+
} // namespace EnvironmentVariable
} // namespace Dali
*/
DALI_ADAPTOR_API const char * GetEnvironmentVariable( const char * variable );
+/**
+ * @brief Create or overwrite (when it does not exist) an environment variable.
+ *
+ * @param[in] variable Null-terminated character string identifying the name of the environmental variable.
+ * @param[in] value Null-terminated character string to set as a value.
+ * @return True on success, false on error.
+ */
+DALI_ADAPTOR_API bool SetEnvironmentVariable( const char * variable, const char * value );
+
} // namespace EnvironmentVariable
} // namespace Dali
// INTERNAL INCLUDES
#include <dali/public-api/dali-adaptor-common.h>
-#include <dali/internal/graphics/gles20/egl-graphics-factory.h>
+#include <dali/internal/graphics/gles/egl-graphics-factory.h>
#include <dali/internal/window-system/common/display-utils.h>
// INTERNAL INCLUDES
#include <dali/internal/system/common/environment-options.h>
-#include <dali/internal/graphics/gles20/egl-graphics-factory.h>
+#include <dali/internal/graphics/gles/egl-graphics-factory.h>
namespace Dali
#include <dali/internal/system/common/performance-interface-factory.h>
#include <dali/internal/adaptor/common/lifecycle-observer.h>
-#include <dali/internal/graphics/gles20/egl-graphics-factory.h>
-#include <dali/internal/graphics/gles20/egl-graphics.h> // Temporary until Core is abstracted
+#include <dali/internal/graphics/gles/egl-graphics-factory.h>
+#include <dali/internal/graphics/gles/egl-graphics.h> // Temporary until Core is abstracted
#include <dali/devel-api/text-abstraction/font-client.h>
#include <dali/internal/accessibility/common/accessibility-adaptor-impl.h>
#include <dali/internal/input/common/gesture-manager.h>
#include <dali/internal/window-system/common/event-handler.h>
-#include <dali/internal/graphics/gles20/gl-proxy-implementation.h>
-#include <dali/internal/graphics/gles20/gl-implementation.h>
-#include <dali/internal/graphics/gles20/egl-sync-implementation.h>
+#include <dali/internal/graphics/gles/gl-proxy-implementation.h>
+#include <dali/internal/graphics/gles/gl-implementation.h>
+#include <dali/internal/graphics/gles/egl-sync-implementation.h>
#include <dali/internal/graphics/common/egl-image-extensions.h>
#include <dali/internal/clipboard/common/clipboard-impl.h>
#include <dali/internal/graphics/common/vsync-monitor.h>
#include <dali/integration-api/trigger-event-factory-interface.h>
#include <dali/internal/window-system/common/display-connection.h>
#include <dali/internal/graphics/common/graphics-interface.h>
-#include <dali/internal/graphics/gles20/egl-factory-interface.h>
+#include <dali/internal/graphics/gles/egl-factory-interface.h>
#include <dali/internal/network/common/socket-factory-interface.h>
#include <dali/internal/system/common/performance-interface.h>
#include <dali/internal/graphics/common/vsync-monitor-interface.h>
}
// Check resize
- bool surfaceResized = ShouldSurfaceBeResized();
- if( DALI_UNLIKELY( surfaceResized ) )
+ bool surfaceResized = false;
+ bool shouldSurfaceBeResized = ShouldSurfaceBeResized();
+ if( DALI_UNLIKELY( shouldSurfaceBeResized ) )
{
if( updateStatus.SurfaceRectChanged() )
{
LOG_UPDATE_RENDER_TRACE_FMT( "Resizing Surface" );
SurfaceResized();
+ surfaceResized = true;
}
}
RenderSurface* currentSurface = mAdaptorInterfaces.GetRenderSurfaceInterface();
if( currentSurface )
{
- currentSurface->PreRender( mSurfaceResized );
+ currentSurface->PreRender( surfaceResized );
}
Integration::RenderStatus renderStatus;
{
if( currentSurface )
{
- currentSurface->PostRender( isRenderingToFbo, ( mNewSurface != NULL ), mSurfaceResized );
+ currentSurface->PostRender( isRenderingToFbo, ( mNewSurface != NULL ), surfaceResized );
}
}
-# module: graphics, backend: gles20
-adaptor_graphics_gles20_src_files=\
- ${adaptor_graphics_dir}/gles20/egl-debug.cpp \
- ${adaptor_graphics_dir}/gles20/egl-implementation.cpp \
- ${adaptor_graphics_dir}/gles20/egl-sync-implementation.cpp \
- ${adaptor_graphics_dir}/gles20/gl-extensions.cpp \
- ${adaptor_graphics_dir}/gles20/gl-proxy-implementation.cpp \
- ${adaptor_graphics_dir}/gles20/egl-graphics-factory.cpp \
- ${adaptor_graphics_dir}/gles20/egl-graphics.cpp
+# module: graphics, backend: gles
+adaptor_graphics_gles_src_files=\
+ ${adaptor_graphics_dir}/gles/egl-debug.cpp \
+ ${adaptor_graphics_dir}/gles/egl-implementation.cpp \
+ ${adaptor_graphics_dir}/gles/egl-sync-implementation.cpp \
+ ${adaptor_graphics_dir}/gles/gl-extensions.cpp \
+ ${adaptor_graphics_dir}/gles/gl-proxy-implementation.cpp \
+ ${adaptor_graphics_dir}/gles/egl-graphics-factory.cpp \
+ ${adaptor_graphics_dir}/gles/egl-graphics.cpp
# module: graphics, backend: tizen
adaptor_graphics_tizen_src_files=\
*/
// CLASS HEADER
-#include <dali/internal/graphics/gles20/egl-debug.h>
+#include <dali/internal/graphics/gles/egl-debug.h>
// EXTERNAL INCLUDES
#include <dali/integration-api/debug.h>
// CLASS HEADER
-#include <dali/internal/graphics/gles20/egl-graphics-factory.h>
-#include <dali/internal/graphics/gles20/egl-graphics.h>
+#include <dali/internal/graphics/gles/egl-graphics-factory.h>
+#include <dali/internal/graphics/gles/egl-graphics.h>
// INTERNAL INCLUDES
// CLASS HEADER
-#include <dali/internal/graphics/gles20/egl-graphics.h>
+#include <dali/internal/graphics/gles/egl-graphics.h>
// INTERNAL INCLUDES
#include <dali/internal/window-system/common/display-utils.h> // For Utils::MakeUnique
// INTERNAL INCLUDES
#include <dali/internal/graphics/common/graphics-interface.h>
-#include <dali/internal/graphics/gles20/gl-proxy-implementation.h>
-#include <dali/internal/graphics/gles20/gl-implementation.h>
+#include <dali/internal/graphics/gles/gl-proxy-implementation.h>
+#include <dali/internal/graphics/gles/gl-implementation.h>
#include <dali/integration-api/egl-interface.h>
-#include <dali/internal/graphics/gles20/egl-implementation.h>
+#include <dali/internal/graphics/gles/egl-implementation.h>
#include <dali/internal/graphics/common/egl-image-extensions.h>
-#include <dali/internal/graphics/gles20/egl-sync-implementation.h>
+#include <dali/internal/graphics/gles/egl-sync-implementation.h>
namespace Dali
// CLASS HEADER
-#include <dali/internal/graphics/gles20/egl-implementation.h>
+#include <dali/internal/graphics/gles/egl-implementation.h>
// EXTERNAL INCLUDES
#include <dali/integration-api/debug.h>
// INTERNAL INCLUDES
#include <dali/public-api/dali-adaptor-common.h>
-#include <dali/internal/graphics/gles20/gl-implementation.h>
-#include <dali/internal/graphics/gles20/egl-debug.h>
+#include <dali/internal/graphics/gles/gl-implementation.h>
+#include <dali/internal/graphics/gles/egl-debug.h>
// EGL constants use C style casts
#pragma GCC diagnostic push
*/
// CLASS HEADER
-#include <dali/internal/graphics/gles20/egl-sync-implementation.h>
+#include <dali/internal/graphics/gles/egl-sync-implementation.h>
// EXTERNAL INCLUDES
#include <dali/integration-api/debug.h>
// INTERNAL INCLUDES
-#include <dali/internal/graphics/gles20/egl-implementation.h>
+#include <dali/internal/graphics/gles/egl-implementation.h>
#ifdef _ARCH_ARM_
*/
// CLASS HEADER
-#include <dali/internal/graphics/gles20/gl-extensions.h>
+#include <dali/internal/graphics/gles/gl-extensions.h>
// EXTERNAL INCLUDES
#include <EGL/egl.h>
#if DALI_GLES_VERSION >= 30
#include <GLES3/gl3.h>
-#include <GLES3/gl3ext.h>
#else
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
#include <dali/integration-api/gl-abstraction.h>
// INTERNAL INCLUDES
-#include <dali/internal/graphics/gles20/gl-extensions.h>
+#include <dali/internal/graphics/gles/gl-extensions.h>
namespace Dali
{
*/
// CLASS HEADER
-#include <dali/internal/graphics/gles20/gl-proxy-implementation.h>
+#include <dali/internal/graphics/gles/gl-proxy-implementation.h>
// EXTERNAL INCLUDES
#include <math.h>
*/
// INTERNAL INCLUDES
-#include <dali/internal/graphics/gles20/gl-implementation.h>
+#include <dali/internal/graphics/gles/gl-implementation.h>
namespace Dali
{
// EXTERNAL INCLUDES
#if DALI_GLES_VERSION >= 30
#include <GLES3/gl3.h>
-#include <GLES3/gl3ext.h>
#else
#include <GLES2/gl2.h>
#include <dali/integration-api/debug.h>
// INTERNAL INCLUDES
-#include <dali/internal/graphics/gles20/egl-implementation.h>
+#include <dali/internal/graphics/gles/egl-implementation.h>
// TBM surface support
#ifndef EGL_NATIVE_SURFACE_TIZEN
// EXTERNAL INCLUDES
#if DALI_GLES_VERSION >= 30
#include <GLES3/gl3.h>
-#include <GLES3/gl3ext.h>
#else
#include <GLES2/gl2.h>
#include <dali/integration-api/debug.h>
// INTERNAL INCLUDES
-#include <dali/internal/graphics/gles20/egl-implementation.h>
+#include <dali/internal/graphics/gles/egl-implementation.h>
namespace
#include <dali/integration-api/bitmap.h>
// INTERNAL HEADERS
-#include <dali/internal/graphics/gles20/gl-implementation.h>
-#include <dali/internal/graphics/gles20/egl-graphics.h>
+#include <dali/internal/graphics/gles/gl-implementation.h>
+#include <dali/internal/graphics/gles/egl-graphics.h>
namespace Dali
{
# module: imaging, backend: ubuntu-x11
adaptor_imaging_ubuntu_x11_src_files=\
${adaptor_imaging_dir}/ubuntu-x11/native-image-source-factory-x.cpp \
- ${adaptor_imaging_dir}/ubuntu-x11/native-image-source-impl-x.cpp
+ ${adaptor_imaging_dir}/ubuntu-x11/native-image-source-impl-x.cpp \
+ ${adaptor_imaging_dir}/ubuntu-x11/native-image-source-queue-impl-x.cpp
+
// INTERNAL INCLUDES
#include <dali/internal/graphics/common/egl-image-extensions.h>
-#include <dali/internal/graphics/gles20/egl-graphics.h>
+#include <dali/internal/graphics/gles/egl-graphics.h>
#include <dali/internal/adaptor/common/adaptor-impl.h>
#include <dali/integration-api/render-surface.h>
// INTERNAL INCLUDES
#include <dali/internal/graphics/common/egl-image-extensions.h>
-#include <dali/internal/graphics/gles20/egl-graphics.h>
+#include <dali/internal/graphics/gles/egl-graphics.h>
#include <dali/internal/adaptor/common/adaptor-impl.h>
namespace Dali
// INTERNAL HEADERS
#include <dali/internal/imaging/ubuntu-x11/native-image-source-impl-x.h>
-#include <dali/internal/imaging/common/native-image-source-queue-impl.h>
+#include <dali/internal/imaging/ubuntu-x11/native-image-source-queue-impl-x.h>
namespace Dali
{
std::unique_ptr< NativeImageSourceQueue > NativeImageSourceFactoryX::CreateNativeImageSourceQueue( unsigned int width, unsigned int height,
Dali::NativeImageSourceQueue::ColorDepth depth, Any nativeImageSourceQueue )
{
- return std::unique_ptr< NativeImageSourceQueue >( nullptr );
+ return std::unique_ptr< NativeImageSourceQueue >( NativeImageSourceQueueX::New( width, height, depth, nativeImageSourceQueue ) );
}
// this should be created from somewhere
// INTERNAL INCLUDES
#include <dali/internal/graphics/common/egl-image-extensions.h>
-#include <dali/internal/graphics/gles20/egl-graphics.h>
+#include <dali/internal/graphics/gles/egl-graphics.h>
#include <dali/internal/adaptor/common/adaptor-impl.h>
#include <dali/devel-api/adaptor-framework/bitmap-saver.h>
#include <dali/integration-api/render-surface.h>
--- /dev/null
+/*
+ * 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 <dali/internal/imaging/ubuntu-x11/native-image-source-queue-impl-x.h>
+
+// EXTERNAL INCLUDES
+#include <dali/integration-api/debug.h>
+#include <dali/integration-api/gl-defines.h>
+
+// INTERNAL INCLUDES
+#include <dali/internal/graphics/common/egl-image-extensions.h>
+#include <dali/internal/graphics/gles/egl-graphics.h>
+#include <dali/internal/adaptor/common/adaptor-impl.h>
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+namespace
+{
+#define TBM_SURFACE_QUEUE_SIZE 3
+
+const char* FRAGMENT_PREFIX = "\n";
+const char* SAMPLER_TYPE = "sampler2D";
+
+}
+
+NativeImageSourceQueueX* NativeImageSourceQueueX::New( unsigned int width, unsigned int height, Dali::NativeImageSourceQueue::ColorDepth depth, Any nativeImageSourceQueue )
+{
+ NativeImageSourceQueueX* image = new NativeImageSourceQueueX( width, height, depth, nativeImageSourceQueue );
+ return image;
+}
+
+NativeImageSourceQueueX::NativeImageSourceQueueX( unsigned int width, unsigned int height, Dali::NativeImageSourceQueue::ColorDepth depth, Any nativeImageSourceQueue )
+: mWidth( width ),
+ mHeight( height )
+{
+ DALI_LOG_ERROR( "NativeImageSourceQueueX::NativeImageSourceQueueX: Not supported\n" );
+}
+
+NativeImageSourceQueueX::~NativeImageSourceQueueX()
+{
+}
+
+Any NativeImageSourceQueueX::GetNativeImageSourceQueue() const
+{
+ return Any();
+}
+
+void NativeImageSourceQueueX::SetSource( Any source )
+{
+}
+
+bool NativeImageSourceQueueX::GlExtensionCreate()
+{
+ return true;
+}
+
+void NativeImageSourceQueueX::GlExtensionDestroy()
+{
+}
+
+unsigned int NativeImageSourceQueueX::TargetTexture()
+{
+ return 0;
+}
+
+void NativeImageSourceQueueX::PrepareTexture()
+{
+}
+
+const char* NativeImageSourceQueueX::GetCustomFragmentPreFix()
+{
+ return FRAGMENT_PREFIX;
+}
+
+const char* NativeImageSourceQueueX::GetCustomSamplerTypename()
+{
+ return SAMPLER_TYPE;
+}
+
+int NativeImageSourceQueueX::GetEglImageTextureTarget()
+{
+ return 0;
+}
+
+} // namespace Adaptor
+
+} // namespace internal
+
+} // namespace Dali
--- /dev/null
+#ifndef DALI_INTERNAL_NATIVE_IMAGE_SOURCE_QUEUE_IMPL_X_H
+#define DALI_INTERNAL_NATIVE_IMAGE_SOURCE_QUEUE_IMPL_X_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 <dali/devel-api/images/native-image-interface-extension.h>
+
+// INTERNAL INCLUDES
+#include <dali/internal/imaging/common/native-image-source-queue-impl.h>
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+class EglGraphics;
+class EglImageExtensions;
+
+/**
+ * Dali internal NativeImageSourceQueue.
+ */
+class NativeImageSourceQueueX: public Internal::Adaptor::NativeImageSourceQueue, public NativeImageInterface::Extension
+{
+public:
+
+ /**
+ * Create a new NativeImageSourceQueueX internally.
+ * Depending on hardware the width and height may have to be a power of two.
+ * @param[in] width The width of the image.
+ * @param[in] height The height of the image.
+ * @param[in] depth color depth of the image.
+ * @param[in] nativeImageSourceQueue contains tbm_surface_queue_h or is empty
+ * @return A smart-pointer to a newly allocated image.
+ */
+ static NativeImageSourceQueueX* New(unsigned int width, unsigned int height, Dali::NativeImageSourceQueue::ColorDepth depth, Any nativeImageSourceQueue );
+
+ /**
+ * @copydoc Dali::NativeImageSourceQueue::GetNativeImageSourceQueue()
+ */
+ Any GetNativeImageSourceQueue() const override;
+
+ /**
+ * @copydoc Dali::NativeImageSourceQueue::SetSource( Any source )
+ */
+ void SetSource( Any source ) override;
+
+ /**
+ * destructor
+ */
+ ~NativeImageSourceQueueX() override;
+
+ /**
+ * @copydoc Dali::NativeImageInterface::GlExtensionCreate()
+ */
+ bool GlExtensionCreate() override;
+
+ /**
+ * @copydoc Dali::NativeImageInterface::GlExtensionDestroy()
+ */
+ void GlExtensionDestroy() override;
+
+ /**
+ * @copydoc Dali::NativeImageInterface::TargetTexture()
+ */
+ unsigned int TargetTexture() override;
+
+ /**
+ * @copydoc Dali::NativeImageInterface::PrepareTexture()
+ */
+ void PrepareTexture() override;
+
+ /**
+ * @copydoc Dali::NativeImageInterface::GetWidth()
+ */
+ unsigned int GetWidth() const override
+ {
+ return mWidth;
+ }
+
+ /**
+ * @copydoc Dali::NativeImageInterface::GetHeight()
+ */
+ unsigned int GetHeight() const override
+ {
+ return mHeight;
+ }
+
+ /**
+ * @copydoc Dali::NativeImageInterface::RequiresBlending()
+ */
+ bool RequiresBlending() const override
+ {
+ return true;
+ }
+
+ /**
+ * @copydoc Dali::NativeImageInterface::GetExtension()
+ */
+ NativeImageInterface::Extension* GetNativeImageInterfaceExtension() override
+ {
+ return this;
+ }
+
+ /**
+ * @copydoc Dali::NativeImageInterface::Extension::GetCustomFragmentPreFix()
+ */
+ const char* GetCustomFragmentPreFix() override;
+
+ /**
+ * @copydoc Dali::NativeImageInterface::Extension::GetCustomSamplerTypename()
+ */
+ const char* GetCustomSamplerTypename() override;
+
+ /**
+ * @copydoc Dali::NativeImageInterface::Extension::GetEglImageTextureTarget()
+ */
+ int GetEglImageTextureTarget() override;
+
+private:
+
+ /**
+ * Private constructor; @see NativeImageSourceQueue::New()
+ * @param[in] width The width of the image.
+ * @param[in] height The height of the image.
+ * @param[in] colour depth of the image.
+ * @param[in] nativeImageSourceQueue contains tbm_surface_queue_h or is empty
+ */
+ NativeImageSourceQueueX( unsigned int width, unsigned int height, Dali::NativeImageSourceQueue::ColorDepth depth, Any nativeImageSourceQueue );
+
+private:
+
+ unsigned int mWidth; ///< image width
+ unsigned int mHeight; ///< image height
+
+};
+
+} // namespace Adaptor
+
+} // namespace Internal
+
+} // namespace Dali
+
+#endif // DALI_INTERNAL_NATIVE_IMAGE_SOURCE_QUEUE_IMPL_X_H
#define DALI_ENV_DISABLE_STENCIL_BUFFER "DALI_DISABLE_STENCIL_BUFFER"
+#define DALI_ENV_WEB_ENGINE_NAME "DALI_WEB_ENGINE_NAME"
+
} // namespace Adaptor
} // namespace Internal
// EXTERNAL INCLUDES
#include <dlfcn.h>
#include <dali/integration-api/debug.h>
-#include <dali/public-api/adaptor-framework/native-image-source.h>
#include <dali/public-api/object/type-registry.h>
+#include <sstream>
+
+// INTERNAL INCLUDES
+#include <dali/devel-api/adaptor-framework/environment-variable.h>
+#include <dali/internal/system/common/environment-variables.h>
+#include <dali/public-api/adaptor-framework/native-image-source.h>
namespace Dali
{
namespace // unnamed namespace
{
-const char* WEB_ENGINE_PLUGIN_SO( "libdali-web-engine-plugin.so" );
+constexpr char const * const kPluginFullNamePrefix = "libdali-web-engine-";
+constexpr char const * const kPluginFullNamePostfix = "-plugin.so";
+constexpr char const * const kPluginFullNameDefault = "libdali-web-engine-plugin.so";
+
+// Note: Dali WebView policy does not allow to use multiple web engines in an application.
+// So once pluginName is set to non-empty string, it will not change.
+std::string pluginName;
+
+std::string MakePluginName( const char* environmentName )
+{
+ std::stringstream fullName;
+ fullName << kPluginFullNamePrefix << environmentName << kPluginFullNamePostfix;
+ return std::move( fullName.str() );
+}
Dali::BaseHandle Create()
{
}
}
+bool WebEngine::InitializePluginHandle()
+{
+ if ( pluginName.length() == 0 )
+ {
+ // pluginName is not initialized yet.
+ const char* name = EnvironmentVariable::GetEnvironmentVariable( DALI_ENV_WEB_ENGINE_NAME );
+ if ( name )
+ {
+ pluginName = MakePluginName( name );
+ mHandle = dlopen( pluginName.c_str(), RTLD_LAZY );
+ if ( mHandle )
+ {
+ return true;
+ }
+ }
+ pluginName = std::string( kPluginFullNameDefault );
+ }
+
+ mHandle = dlopen( pluginName.c_str(), RTLD_LAZY );
+ if ( !mHandle )
+ {
+ DALI_LOG_ERROR( "Can't load %s : %s\n", pluginName.c_str(), dlerror() );
+ return false;
+ }
+
+ return true;
+}
+
bool WebEngine::Initialize()
{
char* error = NULL;
- mHandle = dlopen( WEB_ENGINE_PLUGIN_SO, RTLD_LAZY );
-
- error = dlerror();
- if( mHandle == NULL || error != NULL )
+ if ( !InitializePluginHandle() )
{
- DALI_LOG_ERROR( "WebEngine::Initialize(), dlopen error: %s\n", error );
return false;
}
*/
bool Initialize();
+ /**
+ * @brief Initializes library handle by loading web engine plugin.
+ *
+ * @return Whether the initialization succeed or not.
+ */
+ bool InitializePluginHandle();
+
private:
- Dali::WebEnginePlugin* mPlugin; ///< WebEngine plugin handle
+ Dali::WebEnginePlugin* mPlugin; ///< WebEnginePlugin instance
void* mHandle; ///< Handle for the loaded library
typedef Dali::WebEnginePlugin* (*CreateWebEngineFunction)();
// INTERNAL INCLUDES
#include <dali/internal/window-system/common/display-connection.h>
#include <dali/public-api/object/base-object.h>
-#include <dali/internal/graphics/gles20/egl-implementation.h>
+#include <dali/internal/graphics/gles/egl-implementation.h>
namespace Dali
#include <dali/internal/window-system/common/indicator-interface.h>
#include <dali/internal/window-system/common/damage-observer.h>
#include <dali/internal/window-system/common/rotation-observer.h>
-#include <dali/internal/graphics/gles20/egl-implementation.h>
+#include <dali/internal/graphics/gles/egl-implementation.h>
// EXTERNAL INCLUDES
#include <dali/integration-api/events/key-event-integ.h>
// INTERNAL INCLUDES
#include <dali/integration-api/trigger-event-factory-interface.h>
#include <dali/integration-api/thread-synchronization-interface.h>
-#include <dali/internal/graphics/gles20/egl-implementation.h>
+#include <dali/internal/graphics/gles/egl-implementation.h>
#include <dali/internal/adaptor/common/adaptor-impl.h>
#include <dali/internal/window-system/common/window-base.h>
#include <dali/internal/window-system/common/window-factory.h>
#include <dali/internal/window-system/common/window-system.h>
-#include <dali/internal/graphics/gles20/egl-graphics.h>
+#include <dali/internal/graphics/gles/egl-graphics.h>
namespace Dali
// CLASS HEADER
#include <dali/internal/window-system/tizen-wayland/display-connection-impl-ecore-wl.h>
-#include <dali/internal/graphics/gles20/egl-graphics.h>
+#include <dali/internal/graphics/gles/egl-graphics.h>
// EXTERNAL_HEADERS
#include <dali/integration-api/debug.h>
// INTERNAL INCLUDES
#include <dali/internal/system/common/trigger-event.h>
-#include <dali/internal/graphics/gles20/egl-implementation.h>
-#include <dali/internal/graphics/gles20/egl-graphics.h>
+#include <dali/internal/graphics/gles/egl-implementation.h>
+#include <dali/internal/graphics/gles/egl-graphics.h>
#include <dali/internal/window-system/common/display-connection.h>
#include <dali/internal/window-system/common/window-system.h>
#include <dali/integration-api/thread-synchronization-interface.h>
// INTERNAL HEADERS
#include <dali/internal/window-system/ubuntu-x11/pixmap-render-surface-ecore-x.h>
-#include <dali/internal/graphics/gles20/egl-graphics.h>
+#include <dali/internal/graphics/gles/egl-graphics.h>
namespace Dali
{
#include <dali/integration-api/thread-synchronization-interface.h>
#include <dali/internal/system/common/trigger-event.h>
#include <dali/internal/window-system/common/display-connection.h>
-#include <dali/internal/graphics/gles20/egl-graphics.h>
+#include <dali/internal/graphics/gles/egl-graphics.h>
namespace Dali
// INTERNAL INCLUDES
#include <dali/integration-api/egl-interface.h>
-#include <dali/internal/graphics/gles20/egl-implementation.h>
+#include <dali/internal/graphics/gles/egl-implementation.h>
#include <dali/internal/window-system/common/pixmap-render-surface.h>
#include <dali/internal/window-system/ubuntu-x11/ecore-x-types.h>
#include <dali/public-api/dali-adaptor-common.h>
const unsigned int ADAPTOR_MAJOR_VERSION = 1;
const unsigned int ADAPTOR_MINOR_VERSION = 3;
-const unsigned int ADAPTOR_MICRO_VERSION = 48;
+const unsigned int ADAPTOR_MICRO_VERSION = 49;
const char * const ADAPTOR_BUILD_DATE = __DATE__ " " __TIME__;
#ifdef DEBUG_ENABLED
Name: dali-adaptor
Summary: The DALi Tizen Adaptor
-Version: 1.3.48
+Version: 1.3.49
Release: 1
Group: System/Libraries
License: Apache-2.0 and BSD-3-Clause and MIT