/*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 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.
#include <dali/internal/window-system/common/event-handler.h>
#include <dali/internal/window-system/common/window-impl.h>
#include <dali/internal/window-system/common/window-render-surface.h>
+#include <dali/internal/window-system/common/window-system.h>
#include <dali/devel-api/adaptor-framework/accessibility-bridge.h>
#include <dali/internal/system/common/logging.h>
#include <dali/internal/imaging/common/image-loader.h>
#include <dali/internal/system/common/locale-utils.h>
+#include <dali/devel-api/adaptor-framework/environment-variable.h>
#include <dali/internal/system/common/configuration-manager.h>
#include <dali/internal/system/common/environment-variables.h>
thread_local Adaptor* gThreadLocalAdaptor = NULL; // raw thread specific pointer to allow Adaptor::Get
DALI_INIT_TRACE_FILTER(gTraceFilter, DALI_TRACE_PERFORMANCE_MARKER, false);
+
+const char* ENABLE_IMAGE_LOADER_PLUGIN_ENV = "DALI_ENABLE_IMAGE_LOADER_PLUGIN";
} // unnamed namespace
Dali::Adaptor* Adaptor::New(Dali::Integration::SceneHolder window, Dali::RenderSurfaceInterface* surface, EnvironmentOptions* environmentOptions, ThreadMode threadMode)
dpiHor = dpiVer = 0;
defaultWindow->GetSurface()->GetDpi(dpiHor, dpiVer);
-
- // set the DPI value for font rendering
- FontClient fontClient = FontClient::Get();
- fontClient.SetDpi(dpiHor, dpiVer);
+ Dali::Internal::Adaptor::WindowSystem::SetDpi(dpiHor, dpiVer);
// Initialize the thread controller
mThreadController->Initialize();
ProcessCoreEvents(); // Ensure any startup messages are processed.
// Initialize the image loader plugin
- Internal::Adaptor::ImageLoaderPluginProxy::Initialize();
+ auto enablePluginString = Dali::EnvironmentVariable::GetEnvironmentVariable(ENABLE_IMAGE_LOADER_PLUGIN_ENV);
+ bool enablePlugin = enablePluginString ? std::atoi(enablePluginString) : false;
+ if(enablePlugin)
+ {
+ Internal::Adaptor::ImageLoaderPluginProxy::Initialize();
+ }
for(ObserverContainer::iterator iter = mObservers.begin(), endIter = mObservers.end(); iter != endIter; ++iter)
{
}
// Destroy the image loader plugin
- Internal::Adaptor::ImageLoaderPluginProxy::Destroy();
+ auto enablePluginString = Dali::EnvironmentVariable::GetEnvironmentVariable(ENABLE_IMAGE_LOADER_PLUGIN_ENV);
+ bool enablePlugin = enablePluginString ? std::atoi(enablePluginString) : false;
+ if(enablePlugin)
+ {
+ Internal::Adaptor::ImageLoaderPluginProxy::Destroy();
+ }
delete mNotificationTrigger;
mNotificationTrigger = NULL;
{
if(mCore)
{
+ DALI_TRACE_SCOPE(gTraceFilter, "DALI_PROCESS_CORE_EVENTS");
+
if(mPerformanceInterface)
{
mPerformanceInterface->AddMarker(PerformanceInterface::PROCESS_EVENTS_START);
}
- DALI_TRACE_BEGIN(gTraceFilter, "DALI_PROCESS_CORE_EVENTS");
-
mCore->ProcessEvents();
- DALI_TRACE_END(gTraceFilter, "DALI_PROCESS_CORE_EVENTS");
-
if(mPerformanceInterface)
{
mPerformanceInterface->AddMarker(PerformanceInterface::PROCESS_EVENTS_END);
return mConfigurationManager->IsMultipleWindowSupported();
}
+int32_t Adaptor::GetRenderThreadId() const
+{
+ if(mThreadController)
+ {
+ return mThreadController->GetThreadId();
+ }
+ return 0;
+}
+
void Adaptor::RequestUpdateOnce()
{
if(mThreadController)