Print some more system error logs where using fread / fseek / ftell.
+
DALI_LOG_WARNINGS print some logs only for debug modes.
Let we print some critical logs as error level, and verbose logs as debug level.
Change-Id: I3e7c87882ee1bd72a123b71435e8861c6ad3949b
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
/*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 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.
{
if(filename.length() < 5)
{
- DALI_LOG_WARNING("Invalid (short) filename.\n");
+ DALI_LOG_ERROR("Invalid (short) filename.\n");
}
FileFormat format(INVALID_FORMAT);
/*
- * Copyright (c) 2024 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 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/imaging/common/file-download.h>
#include <dali/internal/imaging/common/image-loader.h>
#include <dali/internal/system/common/file-reader.h>
+#include <dali/internal/system/common/system-error-print.h>
#include <dali/public-api/object/property-map.h>
namespace Dali
}
else
{
- DALI_LOG_WARNING("Unable to decode bitmap supplied as in-memory blob.\n");
+ DALI_LOG_ERROR("Unable to decode bitmap supplied as in-memory blob.\n");
auto prefixSize = std::min(static_cast<decltype(blobSize)>(0x200), blobSize); // maximum 512 bytes.
auto errorString = ConvertDataReadable(reinterpret_cast<uint8_t*>(dataBuffer.Begin()), prefixSize, 0x40);
- DALI_LOG_WARNING("URL: %s\n", url.c_str());
- DALI_LOG_WARNING("Downloaded data (prefix %zu bytes of %zu bytes):\n", prefixSize, blobSize);
- DALI_LOG_WARNING("%s\n", errorString.c_str());
+ DALI_LOG_DEBUG_INFO("URL: %s\n", url.c_str());
+ DALI_LOG_DEBUG_INFO("Downloaded data (prefix %zu bytes of %zu bytes):\n", prefixSize, blobSize);
+ DALI_LOG_DEBUG_INFO("%s\n", errorString.c_str());
}
}
else
/*
- * Copyright (c) 2024 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 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.
if(reason != TTS_ERROR_NONE)
{
- DALI_LOG_WARNING("[%s:%d] tts error : %s\n", __FUNCTION__, __LINE__, error_string.c_str());
+ DALI_LOG_ERROR("[%s:%d] tts error : %s\n", __FUNCTION__, __LINE__, error_string.c_str());
}
}
/*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 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.
// INTERNAL INCLUDES
#include <dali/integration-api/adaptor-framework/android/android-framework.h>
#include <dali/internal/adaptor/common/framework.h>
+#include <dali/internal/system/common/system-error-print.h>
namespace Dali
{
else
{
DALI_LOG_ERROR("File not found %s\n", filename.c_str());
+ DALI_PRINT_SYSTEM_ERROR_LOG();
}
}
else
{
DALI_LOG_ERROR("File not found %s\n", filename.c_str());
+ DALI_PRINT_SYSTEM_ERROR_LOG();
}
}
/*
- * Copyright (c) 2024 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 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.
// EXTERNAL INCLUDES
#include <dali/integration-api/debug.h>
#include <fstream>
-#include <string>
-#include <streambuf>
#include <iostream>
+#include <streambuf>
+#include <string>
// INTERNAL INCLUDES
#include <dali/integration-api/adaptor-framework/android/android-framework.h>
#include <dali/internal/adaptor-framework/common/file-loader-impl.h>
+#include <dali/internal/system/common/system-error-print.h>
namespace Dali
{
-
/// Extends streambuf so that we can use the buffer in Dali::Vector
class VectorStreamBuffer : public std::streambuf
{
VectorStreamBuffer(char* buffer, size_t length)
{
char* begin = buffer;
- char* end = begin + length;
+ char* end = begin + length;
setg(begin, begin, end);
setp(begin, end);
}
}
std::unique_ptr<std::iostream> mVectorStream;
- std::streambuf* mStreamBuffer{nullptr};
+ std::streambuf* mStreamBuffer{nullptr};
};
FileStream::Impl::Impl(const std::string& filename, uint8_t mode)
const int closeFailed = fclose(mFile);
if(closeFailed)
{
- DALI_LOG_WARNING("File close failed for FILE: \"%p\".\n", static_cast<void*>(mFile));
+ DALI_LOG_ERROR("File close failed for FILE: \"%p\".\n", static_cast<void*>(mFile));
+ DALI_PRINT_SYSTEM_ERROR_LOG();
}
mFile = nullptr;
if(!(mMode & Dali::FileStream::WRITE) && !(mMode & Dali::FileStream::APPEND))
{
std::streampos fileSize;
- if (ReadFile(mFileName, fileSize, mFileBuffer, (mMode & Dali::FileStream::BINARY) ? Dali::FileLoader::BINARY : Dali::FileLoader::TEXT))
+ if(ReadFile(mFileName, fileSize, mFileBuffer, (mMode & Dali::FileStream::BINARY) ? Dali::FileLoader::BINARY : Dali::FileLoader::TEXT))
{
- mBuffer = reinterpret_cast<uint8_t *>(&mFileBuffer[0]);
+ mBuffer = reinterpret_cast<uint8_t*>(&mFileBuffer[0]);
mDataSize = fileSize;
// For some reason on Android, calling mBufferStream.rdbuf()->pubsetbuf(...) has no effect.
mPlatformSpecificImpl->mStreamBuffer = new VectorStreamBuffer(mFileBuffer);
mPlatformSpecificImpl->mVectorStream.reset(new std::iostream(mPlatformSpecificImpl->mStreamBuffer));
- if (!mPlatformSpecificImpl->mVectorStream->rdbuf()->in_avail())
+ if(!mPlatformSpecificImpl->mVectorStream->rdbuf()->in_avail())
{
DALI_LOG_ERROR(
"File open failed for memory buffer at location: \"%p\", of size: \"%u\", in mode: \"%d\".\n",
- static_cast<void *>(mBuffer),
+ static_cast<void*>(mBuffer),
static_cast<unsigned>(mDataSize),
static_cast<int>(openMode));
+ DALI_PRINT_SYSTEM_ERROR_LOG();
}
return *mPlatformSpecificImpl->mVectorStream.get();
}
else
{
DALI_LOG_ERROR("stream open failed for: \"%s\", in mode: \"%d\".\n", mFileName.c_str(), static_cast<int>(openMode));
+ DALI_PRINT_SYSTEM_ERROR_LOG();
}
}
else
if(!mFileStream.is_open())
{
DALI_LOG_ERROR("stream open failed for: \"%s\", in mode: \"%d\".\n", mFileName.c_str(), static_cast<int>(openMode));
+ DALI_PRINT_SYSTEM_ERROR_LOG();
}
}
return mFileStream;
static_cast<void*>(mBuffer),
static_cast<unsigned>(mDataSize),
static_cast<int>(openMode));
+ DALI_PRINT_SYSTEM_ERROR_LOG();
}
return *mPlatformSpecificImpl->mVectorStream.get();
}
static_cast<void*>(mBuffer),
static_cast<unsigned>(mDataSize),
openMode);
+ DALI_PRINT_SYSTEM_ERROR_LOG();
}
}
else
{
DALI_LOG_ERROR("read file failed for: \"%s\", in mode: \"%s\".\n", mFileName.c_str(), openMode);
+ DALI_PRINT_SYSTEM_ERROR_LOG();
}
}
else
if(!mFile)
{
DALI_LOG_ERROR("file open failed for: \"%s\", in mode: \"%s\".\n", mFileName.c_str(), openMode);
+ DALI_PRINT_SYSTEM_ERROR_LOG();
}
}
}
static_cast<void*>(mBuffer),
static_cast<unsigned>(mDataSize),
openMode);
+ DALI_PRINT_SYSTEM_ERROR_LOG();
}
}
const int closeFailed = fclose(mFile);
if(closeFailed)
{
- DALI_LOG_WARNING("File close failed for FILE: \"%p\".\n", static_cast<void*>(mFile));
+ DALI_LOG_ERROR("File close failed for FILE: \"%p\".\n", static_cast<void*>(mFile));
DALI_PRINT_SYSTEM_ERROR_LOG();
}
mFileStream.open(mFileName, static_cast<std::ios_base::openmode>(openMode));
if(!mFileStream.is_open())
{
- DALI_LOG_WARNING("stream open failed for: \"%s\", in mode: \"%d\".\n", mFileName.c_str(), openMode);
+ DALI_LOG_ERROR("stream open failed for: \"%s\", in mode: \"%d\".\n", mFileName.c_str(), openMode);
DALI_PRINT_SYSTEM_ERROR_LOG();
}
return mFileStream;
mBufferStream.rdbuf()->pubsetbuf(reinterpret_cast<char*>(mBuffer), static_cast<std::streamsize>(static_cast<size_t>(mDataSize)));
if(!mBufferStream.rdbuf()->in_avail())
{
- DALI_LOG_WARNING("File open failed for memory buffer at location: \"%p\", of size: \"%u\", in mode: \"%d\".\n",
- static_cast<void*>(mBuffer),
- static_cast<unsigned>(mDataSize),
- openMode);
+ DALI_LOG_ERROR("File open failed for memory buffer at location: \"%p\", of size: \"%u\", in mode: \"%d\".\n",
+ static_cast<void*>(mBuffer),
+ static_cast<unsigned>(mDataSize),
+ openMode);
DALI_PRINT_SYSTEM_ERROR_LOG();
}
}
/*
- * Copyright (c) 2024 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 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/system/common/logging.h>
#include <dali/internal/system/common/object-profiler.h>
#include <dali/internal/system/common/performance-interface-factory.h>
+#include <dali/internal/system/common/system-error-print.h>
#include <dali/internal/system/common/system-factory.h>
#include <dali/internal/system/common/thread-controller.h>
#include <dali/internal/window-system/common/display-connection.h>
mEnvironmentOptions->SetLogFunction(logFunction);
mEnvironmentOptions->InstallLogFunction(); // install logging for main thread
+ DALI_LOG_RELEASE_INFO("Adaptor::Initialize\n");
+
mPlatformAbstraction = new TizenPlatform::TizenPlatformAbstraction;
std::string path;
std::string systemCachePath = GetSystemCachePath();
if(!systemCachePath.empty())
{
+ DALI_LOG_RELEASE_INFO("Check and create dali system cache directory: %s\n", systemCachePath.c_str());
int dir_err = mkdir(systemCachePath.c_str(), S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH);
if(0 != dir_err && errno != EEXIST)
{
DALI_LOG_ERROR("Error creating system cache directory: %s!\n", systemCachePath.c_str());
+ DALI_PRINT_SYSTEM_ERROR_LOG();
}
std::string shaderCachePath = GetProgramBinaryPath();
+ DALI_LOG_RELEASE_INFO("Check and create dali shader cache directory: %s\n", shaderCachePath.c_str());
dir_err = mkdir(shaderCachePath.c_str(), S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH);
if(0 != dir_err && errno != EEXIST)
{
DALI_LOG_ERROR("Error creating shader cache directory: %s!\n", shaderCachePath.c_str());
+ DALI_PRINT_SYSTEM_ERROR_LOG();
}
}
mConfigurationManager = Utils::MakeUnique<ConfigurationManager>(systemCachePath, mGraphics.get(), mThreadController);
+
+ DALI_LOG_RELEASE_INFO("Adaptor::Initialize: Initialized\n");
}
Adaptor::~Adaptor()
/*
- * Copyright (c) 2024 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 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.
}
else if(DALI_UNLIKELY(dataSize == 0u))
{
- DALI_LOG_WARNING("Warning : Download data size is 0! url : %s\n", url.c_str());
+ DALI_LOG_ERROR("Warning : Download data size is 0! url : %s\n", url.c_str());
}
return true;
}
if(url.empty())
{
- DALI_LOG_WARNING("empty url requested \n");
+ DALI_LOG_ERROR("empty url requested \n");
return false;
}
#include <dali/integration-api/debug.h>
#include <dali/internal/imaging/common/file-download.h>
#include <dali/internal/system/common/file-reader.h>
+#include <dali/internal/system/common/system-error-print.h>
#include <dali/public-api/images/pixel-data.h>
#define IMG_TOO_BIG(w, h) \
if(DALI_UNLIKELY(fseek(fp, 0, SEEK_END) <= -1))
{
DALI_LOG_ERROR("Error seeking within file\n");
+ DALI_PRINT_SYSTEM_ERROR_LOG();
return false;
}
if(DALI_UNLIKELY(length <= -1))
{
DALI_LOG_ERROR("Could not determine GIF file size.\n");
+ DALI_PRINT_SYSTEM_ERROR_LOG();
return false;
}
DALI_LOG_ERROR("malloc is failed. request malloc size : %llu\n", sizeof(GifByteType) * static_cast<unsigned long long>(length));
return false;
}
- length = fread(globalMap, sizeof(GifByteType), length, fp);
+ const long long bytesRead = fread(globalMap, sizeof(GifByteType), length, fp);
+
+ // Check the size of loaded data is what we expected.
+ if(DALI_UNLIKELY(bytesRead != length))
+ {
+ DALI_LOG_ERROR("Error read bytes (required : %lld, actual read : %lld)\n", length, bytesRead);
+ DALI_PRINT_SYSTEM_ERROR_LOG();
+ return false;
+ }
}
else
{
DALI_LOG_ERROR("Error seeking within file\n");
+ DALI_PRINT_SYSTEM_ERROR_LOG();
return false;
}
return true;
}
else
{
- length = fread(globalMap, sizeof(GifByteType), blobSize, fp);
- succeeded = true;
+ length = fread(globalMap, sizeof(GifByteType), blobSize, fp);
+ if(DALI_UNLIKELY(static_cast<long long>(static_cast<unsigned long long>(blobSize)) != length))
+ {
+ DALI_LOG_ERROR("Error read bytes (required : %zu, actual read : %lld)\n", blobSize, length);
+ DALI_PRINT_SYSTEM_ERROR_LOG();
+ length = 0;
+ }
+ else
+ {
+ succeeded = true;
+ }
}
}
else
{
DALI_LOG_ERROR("Error seeking within file\n");
+ DALI_PRINT_SYSTEM_ERROR_LOG();
}
}
else
{
DALI_LOG_ERROR("Error reading file\n");
+ DALI_PRINT_SYSTEM_ERROR_LOG();
}
}
else
/*
- * Copyright (c) 2024 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 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/imaging/common/loader-wbmp.h>
#include <dali/internal/imaging/common/loader-webp.h>
#include <dali/internal/system/common/file-reader.h>
+#include <dali/internal/system/common/system-error-print.h>
using namespace Dali::Integration;
if(DALI_UNLIKELY(fseek(fp, 0, SEEK_SET)))
{
DALI_LOG_ERROR("Error seeking to start of file\n");
+ DALI_PRINT_SYSTEM_ERROR_LOG();
}
if(read != MAGIC_LENGTH)
if(DALI_UNLIKELY(fseek(fp, 0, SEEK_SET)))
{
DALI_LOG_ERROR("Error seeking to start of file\n");
+ DALI_PRINT_SYSTEM_ERROR_LOG();
}
return loaderFound;
if(desiredDimensions.GetWidth() < 1u || desiredDimensions.GetHeight() < 1u)
{
- DALI_LOG_WARNING("Image scaling aborted as desired dimensions too small (%u, %u).\n", desiredDimensions.GetWidth(), desiredDimensions.GetHeight());
+ DALI_LOG_ERROR("Image scaling aborted as desired dimensions too small (%u, %u).\n", desiredDimensions.GetWidth(), desiredDimensions.GetHeight());
}
else if(inputWidth != desiredDimensions.GetWidth() || inputHeight != desiredDimensions.GetHeight())
{
if((desiredWidth > MAXIMUM_TARGET_BITMAP_SIZE) || (desiredHeight > MAXIMUM_TARGET_BITMAP_SIZE) ||
(columnsToPad > MAXIMUM_TARGET_BITMAP_SIZE) || (scanlinesToPad > MAXIMUM_TARGET_BITMAP_SIZE))
{
- DALI_LOG_WARNING("Image scaling aborted as final dimensions too large (%u, %u).\n", desiredWidth, desiredHeight);
+ DALI_LOG_ERROR("Image scaling aborted as final dimensions too large (%u, %u).\n", desiredWidth, desiredHeight);
return bitmap;
}
/*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 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/devel-api/adaptor-framework/pixel-buffer.h>
#include <dali/integration-api/debug.h>
#include <dali/internal/imaging/common/pixel-buffer-impl.h>
+#include <dali/internal/system/common/system-error-print.h>
#include <dali/public-api/images/pixel.h>
#include <cstring>
const unsigned int readLength = sizeof(AstcFileHeader);
if(DALI_UNLIKELY(fread(&fileHeader, 1, readLength, filePointer) != readLength))
{
+ DALI_PRINT_SYSTEM_ERROR_LOG();
return false;
}
if(DALI_UNLIKELY(fseek(filePointer, 0L, SEEK_END)))
{
DALI_LOG_ERROR("Could not seek through file.\n");
+ DALI_PRINT_SYSTEM_ERROR_LOG();
return false;
}
if(DALI_UNLIKELY(fileSize == -1L))
{
DALI_LOG_ERROR("Could not determine ASTC file size.\n");
+ DALI_PRINT_SYSTEM_ERROR_LOG();
return false;
}
if(DALI_UNLIKELY(fseek(filePointer, sizeof(AstcFileHeader), SEEK_SET)))
{
DALI_LOG_ERROR("Could not seek through file.\n");
+ DALI_PRINT_SYSTEM_ERROR_LOG();
return false;
}
if(DALI_UNLIKELY(bytesRead != imageByteCount))
{
DALI_LOG_ERROR("Read of image pixel data failed. (required image bytes : %zu, actual read from file : %zu\n", imageByteCount, bytesRead);
+ DALI_PRINT_SYSTEM_ERROR_LOG();
return false;
}
/*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 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/devel-api/adaptor-framework/pixel-buffer.h>
#include <dali/integration-api/debug.h>
+#include <dali/internal/system/common/system-error-print.h>
#include <dali/public-api/common/vector-wrapper.h>
namespace Dali
// Load the information directly into our structure
if(DALI_UNLIKELY(fread(&header, 1, readLength, fp) != readLength))
{
+ DALI_PRINT_SYSTEM_ERROR_LOG();
return false;
}
if(DALI_UNLIKELY(fseek(fp, static_cast<long>(static_cast<size_t>(offset)), SEEK_SET)))
{
DALI_LOG_ERROR("Error seeking BMP_RGB24V5 data\n");
+ DALI_PRINT_SYSTEM_ERROR_LOG();
return false;
}
if(DALI_UNLIKELY(fread(pixelsPtr, 1, rowStride, fp) != rowStride))
{
DALI_LOG_ERROR("Error reading the BMP image\n");
+ DALI_PRINT_SYSTEM_ERROR_LOG();
return false;
}
for(std::uint32_t i = 0; i < rowStride; i += 3)
if(DALI_UNLIKELY(fseek(fp, static_cast<long>(static_cast<size_t>(padding)), SEEK_CUR)))
{
DALI_LOG_ERROR("Error moving past BMP_RGB24V5 padding\n");
+ DALI_PRINT_SYSTEM_ERROR_LOG();
}
}
}
if(DALI_UNLIKELY(fseek(fp, static_cast<long>(static_cast<size_t>(offset)), SEEK_SET)))
{
DALI_LOG_ERROR("Error seeking BMP_BITFIELDS32V4 data\n");
+ DALI_PRINT_SYSTEM_ERROR_LOG();
return false;
}
if(DALI_UNLIKELY(fread(pixelsPtr, 1, rowStride, fp) != rowStride))
{
DALI_LOG_ERROR("Error reading the BMP image\n");
+ DALI_PRINT_SYSTEM_ERROR_LOG();
return false;
}
for(std::uint32_t i = 0; i < rowStride; i += 4)
if(DALI_UNLIKELY(fseek(fp, static_cast<long>(static_cast<size_t>(padding)), SEEK_CUR)))
{
DALI_LOG_ERROR("Error moving past BMP_BITFIELDS32V4 padding\n");
+ DALI_PRINT_SYSTEM_ERROR_LOG();
}
}
}
if(DALI_UNLIKELY(fseek(fp, static_cast<long>(static_cast<size_t>(offset)), SEEK_SET)))
{
DALI_LOG_ERROR("Error seeking BMP_BITFIELDS32 data\n");
+ DALI_PRINT_SYSTEM_ERROR_LOG();
return false;
}
if(DALI_UNLIKELY(fread(pixelsPtr, 1, rowStride, fp) != rowStride))
{
DALI_LOG_ERROR("Error reading the BMP image\n");
+ DALI_PRINT_SYSTEM_ERROR_LOG();
return false;
}
for(std::uint32_t i = 0; i < rowStride; i += 4)
if(DALI_UNLIKELY(fseek(fp, static_cast<long>(static_cast<size_t>(padding)), SEEK_CUR)))
{
DALI_LOG_ERROR("Error moving past BMP_BITFIELDS32 padding\n");
+ DALI_PRINT_SYSTEM_ERROR_LOG();
}
}
}
if(DALI_UNLIKELY(fseek(fp, static_cast<long>(static_cast<size_t>(offset)), SEEK_SET)))
{
DALI_LOG_ERROR("Error seeking RGB565 data\n");
+ DALI_PRINT_SYSTEM_ERROR_LOG();
return false;
}
}
if(DALI_UNLIKELY(fread(pixelsPtr, 1, rowStride, fp) != rowStride))
{
+ DALI_PRINT_SYSTEM_ERROR_LOG();
return false;
}
}
if(DALI_UNLIKELY(fseek(fp, static_cast<long>(static_cast<size_t>(offset)), SEEK_SET)))
{
DALI_LOG_ERROR("Error seeking BMP_BITFIELDS555 data\n");
+ DALI_PRINT_SYSTEM_ERROR_LOG();
return false;
}
rawPtr = &raw[0] + (j * rawStride);
if(DALI_UNLIKELY(fread(rawPtr, 1, rawStride, fp) != rawStride))
{
+ DALI_PRINT_SYSTEM_ERROR_LOG();
return false;
}
}
if(DALI_UNLIKELY(fseek(fp, static_cast<long>(static_cast<size_t>(offset)), SEEK_SET)))
{
DALI_LOG_ERROR("Error seeking BMP_RGB555 data\n");
+ DALI_PRINT_SYSTEM_ERROR_LOG();
return false;
}
rawPtr = &raw[0] + (j * rawStride);
if(DALI_UNLIKELY(fread(rawPtr, 1, rawStride, fp) != rawStride))
{
+ DALI_PRINT_SYSTEM_ERROR_LOG();
return false;
}
}
if(DALI_UNLIKELY(fseek(fp, static_cast<long>(static_cast<size_t>(offset)), SEEK_SET)))
{
DALI_LOG_ERROR("Error seeking BMP_RGB1 data\n");
+ DALI_PRINT_SYSTEM_ERROR_LOG();
return false;
}
if(DALI_UNLIKELY(fread(colorTable, 1, 8, fp) != 8))
{
+ DALI_PRINT_SYSTEM_ERROR_LOG();
return false;
}
{
if(DALI_UNLIKELY(fread(&cmd, 1, 1, fp) != 1))
{
+ DALI_PRINT_SYSTEM_ERROR_LOG();
return false;
}
if(DALI_UNLIKELY(fseek(fp, static_cast<long>(static_cast<size_t>(offset)), SEEK_SET)))
{
DALI_LOG_ERROR("Error seeking BMP_RGB4 data\n");
+ DALI_PRINT_SYSTEM_ERROR_LOG();
return false;
}
if(DALI_UNLIKELY(fread(colorTable, 1, 64, fp) != 64))
{
+ DALI_PRINT_SYSTEM_ERROR_LOG();
return false;
}
{
if(DALI_UNLIKELY(fread(&cmd, 1, 1, fp) != 1))
{
+ DALI_PRINT_SYSTEM_ERROR_LOG();
return false;
}
if(DALI_UNLIKELY(fseek(fp, static_cast<long>(static_cast<size_t>(offset)), SEEK_SET)))
{
DALI_LOG_ERROR("Error seeking BMP_RGB8 data\n");
+ DALI_PRINT_SYSTEM_ERROR_LOG();
return false;
}
if(DALI_UNLIKELY(fread(&colorTable[0], 1, 1024, fp) != 1024))
{
+ DALI_PRINT_SYSTEM_ERROR_LOG();
return false;
}
if(DALI_UNLIKELY(fread(&colorIndex[0], 1, width * height, fp) != width * height))
{
+ DALI_PRINT_SYSTEM_ERROR_LOG();
return false;
}
std::uint8_t ctIndex = 0;
if(DALI_UNLIKELY(fseek(fp, static_cast<long>(static_cast<size_t>(offset)), SEEK_SET)))
{
DALI_LOG_ERROR("Error seeking BMP_RLE4 data\n");
+ DALI_PRINT_SYSTEM_ERROR_LOG();
return false;
}
if(DALI_UNLIKELY(fread(colorTable, 1, 64, fp) != 64))
{
+ DALI_PRINT_SYSTEM_ERROR_LOG();
return false;
}
}
if(DALI_UNLIKELY(fread(cmd, 1, cmdStride, fp) != cmdStride))
{
+ DALI_PRINT_SYSTEM_ERROR_LOG();
return false;
}
if(cmd[0] == 0) // ESCAPE
if(DALI_UNLIKELY(fread(cmd, 1, cmdStride, fp) != cmdStride))
{
DALI_LOG_ERROR("Error reading the BMP image\n");
+ DALI_PRINT_SYSTEM_ERROR_LOG();
return false;
}
dx = cmd[0] & (0xFF);
if(DALI_UNLIKELY(fread(&run[0], 1, bytesize, fp) != bytesize))
{
DALI_LOG_ERROR("Error reading the BMP image\n");
+ DALI_PRINT_SYSTEM_ERROR_LOG();
return false;
}
if((x & 1) == 0)
if(DALI_UNLIKELY(fseek(fp, static_cast<long>(static_cast<size_t>(offset)), SEEK_SET)))
{
DALI_LOG_ERROR("Error seeking BMP_RLE8 data\n");
+ DALI_PRINT_SYSTEM_ERROR_LOG();
return false;
}
if(DALI_UNLIKELY(fread(&colorTable[0], 1, 1024, fp) != 1024))
{
+ DALI_PRINT_SYSTEM_ERROR_LOG();
return false;
}
}
if(DALI_UNLIKELY(fread(cmd, 1, cmdStride, fp) != cmdStride))
{
+ DALI_PRINT_SYSTEM_ERROR_LOG();
return false;
}
if(DALI_UNLIKELY(fread(cmd, 1, cmdStride, fp) != cmdStride))
{
DALI_LOG_ERROR("Error reading the BMP image\n");
+ DALI_PRINT_SYSTEM_ERROR_LOG();
return false;
}
dx = cmd[0] & (0xFF);
if(DALI_UNLIKELY(fread(&run[0], 1, length, fp) != length))
{
DALI_LOG_ERROR("Error reading the BMP image\n");
+ DALI_PRINT_SYSTEM_ERROR_LOG();
return false;
}
{
if(DALI_UNLIKELY(fseek(fp, static_cast<long>(static_cast<size_t>(14 + infoHeader.infoHeaderSize + 1)), SEEK_SET)))
{
+ DALI_PRINT_SYSTEM_ERROR_LOG();
return false;
}
char mask;
if(DALI_UNLIKELY(fread(&mask, 1, 1, fp) != 1))
{
+ DALI_PRINT_SYSTEM_ERROR_LOG();
return false;
}
if(DALI_UNLIKELY(fread(pixelsIterator, 1, rowStride, fp) != rowStride))
{
DALI_LOG_ERROR("Error reading the BMP image\n");
+ DALI_PRINT_SYSTEM_ERROR_LOG();
break;
}
if(DALI_UNLIKELY(fseek(fp, static_cast<long>(static_cast<size_t>(padding)), SEEK_CUR))) // move past the padding.
{
DALI_LOG_ERROR("Error moving past BMP padding\n");
+ DALI_PRINT_SYSTEM_ERROR_LOG();
}
}
}
/*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 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/devel-api/adaptor-framework/pixel-buffer.h>
#include <dali/integration-api/debug.h>
+#include <dali/internal/system/common/system-error-print.h>
#include <memory>
// We need to check if giflib has the new open and close API (including error parameter).
/// Function used by Gif_Lib to read from the image file.
int ReadDataFromGif(GifFileType* gifInfo, GifByteType* data, int length)
{
- FILE* fp = reinterpret_cast<FILE*>(gifInfo->UserData);
- return fread(data, sizeof(GifByteType), length, fp);
+ FILE* fp = reinterpret_cast<FILE*>(gifInfo->UserData);
+ const int actualLength = fread(data, sizeof(GifByteType), length, fp);
+ if(DALI_UNLIKELY(actualLength != length))
+ {
+ DALI_LOG_ERROR("Error read bytes (required : %d, actual read : %d)\n", length, actualLength);
+ DALI_PRINT_SYSTEM_ERROR_LOG();
+ }
+
+ return actualLength;
}
/// Loads the GIF Header.
/*
- * Copyright (c) 2024 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 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.
// INTERNAL INCLUDES
#include <dali/devel-api/adaptor-framework/pixel-buffer.h>
#include <dali/integration-api/debug.h>
+#include <dali/internal/system/common/system-error-print.h>
namespace Dali
{
if(DALI_UNLIKELY(fseek(fp, 0, SEEK_END)))
{
DALI_LOG_ERROR("Error seeking ICO data\n");
+ DALI_PRINT_SYSTEM_ERROR_LOG();
return false;
}
if(DALI_UNLIKELY(0u == fsize))
{
DALI_LOG_ERROR("Error ICO data size is zero!\n");
+ DALI_PRINT_SYSTEM_ERROR_LOG();
return false;
}
if(DALI_UNLIKELY(fseek(fp, 0, SEEK_SET)))
{
DALI_LOG_ERROR("Error seeking ICO data\n");
+ DALI_PRINT_SYSTEM_ERROR_LOG();
return false;
}
map.ResizeUninitialized(fsize);
if(DALI_UNLIKELY(fread(&map[0], 1, fsize, fp) != fsize))
{
- DALI_LOG_WARNING("image file read opeation error!\n");
+ DALI_LOG_ERROR("image file read opeation error!\n");
+ DALI_PRINT_SYSTEM_ERROR_LOG();
return false;
}
default:
{
- DALI_LOG_WARNING("Image file contains unsupported bits-per-pixel %d\n", bitcount);
+ DALI_LOG_ERROR("Image file contains unsupported bits-per-pixel %d\n", bitcount);
return false;
}
}
}
if(diff_size)
{
- DALI_LOG_WARNING("Broken ICO file!\n");
+ DALI_LOG_ERROR("Broken ICO file!\n");
}
if(DALI_UNLIKELY(!read_ushort(inputBufferPtr, fsize, &position, &word)))
#include <dali/internal/imaging/common/image-operations.h>
#include <dali/internal/imaging/common/pixel-buffer-impl.h>
#include <dali/internal/legacy/tizen/platform-capabilities.h>
+#include <dali/internal/system/common/system-error-print.h>
namespace
{
if(DALI_UNLIKELY(chrominanceSubsampling >= TJ_NUMSAMP))
{
- DALI_LOG_WARNING("WARNING! Input subsampling value [%d] is bigger than turbojpeg library support [%d]\n", chrominanceSubsampling, TJ_NUMSAMP);
+ DALI_LOG_ERROR("WARNING! Input subsampling value [%d] is bigger than turbojpeg library support [%d]\n", chrominanceSubsampling, TJ_NUMSAMP);
}
return chrominanceSubsampling < TJ_NUMSAMP ? gSubsamplingFormatTable[chrominanceSubsampling] : false;
}
else
{
- DALI_LOG_WARNING("%s\n", errorString.c_str());
+ DALI_LOG_DEBUG_INFO("%s\n", errorString.c_str());
return false;
}
}
if(DALI_UNLIKELY(fseek(fp, 0, SEEK_END)))
{
DALI_LOG_ERROR("Error seeking to end of file\n");
+ DALI_PRINT_SYSTEM_ERROR_LOG();
return false;
}
if(DALI_UNLIKELY(0u == jpegBufferSize))
{
DALI_LOG_ERROR("Jpeg buffer size error\n");
+ DALI_PRINT_SYSTEM_ERROR_LOG();
return false;
}
if(DALI_UNLIKELY(fseek(fp, 0, SEEK_SET)))
{
DALI_LOG_ERROR("Error seeking to start of file\n");
+ DALI_PRINT_SYSTEM_ERROR_LOG();
return false;
}
if(DALI_UNLIKELY(fread(jpegBufferPtr, 1, jpegBufferSize, fp) != jpegBufferSize))
{
DALI_LOG_ERROR("Error on image file read.\n");
+ DALI_PRINT_SYSTEM_ERROR_LOG();
return false;
}
if(DALI_UNLIKELY(fseek(fp, 0, SEEK_SET)))
{
DALI_LOG_ERROR("Error seeking to start of file\n");
+ DALI_PRINT_SYSTEM_ERROR_LOG();
return false;
}
default:
{
// Try to keep loading the file, but let app developer know there was something fishy:
- DALI_LOG_WARNING("Incorrect/Unknown Orientation setting found in EXIF header of JPEG image (%x). Orientation setting will be ignored.\n", entry);
+ DALI_LOG_DEBUG_INFO("Incorrect/Unknown Orientation setting found in EXIF header of JPEG image (%x). Orientation setting will be ignored.\n", entry);
break;
}
}
tjscalingfactor* factors = tjGetScalingFactors(&numFactors);
if(DALI_UNLIKELY(factors == NULL))
{
- DALI_LOG_WARNING("TurboJpeg tjGetScalingFactors error!\n");
+ DALI_LOG_DEBUG_INFO("TurboJpeg tjGetScalingFactors error!\n");
success = false;
}
else
if(DALI_UNLIKELY(fseek(fp, 0, SEEK_SET)))
{
DALI_LOG_ERROR("Error seeking to start of file\n");
+ DALI_PRINT_SYSTEM_ERROR_LOG();
}
else
{
int size = fread(dataBuffer, 1, sizeof(dataBuffer), fp);
if(size <= 0)
{
+ DALI_PRINT_SYSTEM_ERROR_LOG();
break;
}
if(!exif_loader_write(exifLoader.get(), dataBuffer, size))
/*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 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/imaging/common/loader-ktx.h>
// EXTERNAL INCLUDES
-#include <dali/devel-api/adaptor-framework/pixel-buffer.h>
#include <dali/integration-api/debug.h>
-#include <dali/internal/imaging/common/pixel-buffer-impl.h>
#include <cstring>
+// INTERNAL INCLUDES
+#include <dali/devel-api/adaptor-framework/pixel-buffer.h>
+#include <dali/internal/imaging/common/pixel-buffer-impl.h>
+#include <dali/internal/system/common/system-error-print.h>
+
namespace Dali
{
namespace TizenPlatform
// Load the information directly into our structure
if(DALI_UNLIKELY(fread(&header, 1, readLength, filePointer) != readLength))
{
+ DALI_PRINT_SYSTEM_ERROR_LOG();
return false;
}
// Warn if there is space wasted in the file:
if(fileHeader.bytesOfKeyValueData > 0U)
{
- DALI_LOG_WARNING("Loading of KTX file with key/value header data requested. This should be stripped in application asset/resource build.\n");
+ DALI_LOG_DEBUG_INFO("Loading of KTX file with key/value header data requested. This should be stripped in application asset/resource build.\n");
}
return headerIsValid;
if(DALI_UNLIKELY(fseek(fp, (long int)(imageSizeOffset), SEEK_SET)))
{
DALI_LOG_ERROR("Seek past key/vals in KTX compressed bitmap file failed.\n");
+ DALI_PRINT_SYSTEM_ERROR_LOG();
return false;
}
if(DALI_UNLIKELY(fread(&imageByteCount, 1, 4, fp) != 4))
{
DALI_LOG_ERROR("Read of image size failed.\n");
+ DALI_PRINT_SYSTEM_ERROR_LOG();
return false;
}
// Sanity-check the image size:
if(DALI_UNLIKELY(bytesRead != imageByteCount))
{
DALI_LOG_ERROR("Read of image pixel data failed.\n");
+ DALI_PRINT_SYSTEM_ERROR_LOG();
return false;
}
/*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 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.
// INTERNAL INCLUDES
#include <dali/internal/imaging/common/pixel-buffer-impl.h> ///< for Internal::Adaptor::PixelBuffer::New()
+#include <dali/internal/system/common/system-error-print.h>
namespace Dali
{
const unsigned int readLength = sizeof(PkmFileHeader);
if(DALI_UNLIKELY(fread(&fileHeader, 1, readLength, filePointer) != readLength))
{
+ DALI_PRINT_SYSTEM_ERROR_LOG();
return false;
}
if(DALI_UNLIKELY(fseek(filePointer, 0L, SEEK_END)))
{
DALI_LOG_ERROR("Could not seek through file.\n");
+ DALI_PRINT_SYSTEM_ERROR_LOG();
return false;
}
if(DALI_UNLIKELY(fileSize == -1L))
{
DALI_LOG_ERROR("Could not determine PKM file size.\n");
+ DALI_PRINT_SYSTEM_ERROR_LOG();
return false;
}
if(DALI_UNLIKELY(fseek(filePointer, sizeof(PkmFileHeader), SEEK_SET)))
{
DALI_LOG_ERROR("Could not seek through file.\n");
+ DALI_PRINT_SYSTEM_ERROR_LOG();
return false;
}
if(DALI_UNLIKELY(bytesRead != imageByteCount))
{
DALI_LOG_ERROR("Read of image pixel data failed. (required image bytes : %zu, actual read from file : %zu\n", imageByteCount, bytesRead);
+ DALI_PRINT_SYSTEM_ERROR_LOG();
return false;
}
/*
- * Copyright (c) 2024 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 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/devel-api/adaptor-framework/pixel-buffer.h>
#include <dali/integration-api/debug.h>
#include <dali/internal/legacy/tizen/platform-capabilities.h>
+#include <dali/internal/system/common/system-error-print.h>
namespace Dali
{
if(DALI_UNLIKELY(size != 8))
{
DALI_LOG_ERROR("fread failed\n");
+ DALI_PRINT_SYSTEM_ERROR_LOG();
return false;
}
/*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 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.
// INTERNAL INCLUDES
#include <dali/devel-api/adaptor-framework/pixel-buffer.h>
#include <dali/integration-api/debug.h>
+#include <dali/internal/system/common/system-error-print.h>
namespace Dali
{
if(DALI_UNLIKELY(fseek(fp, 0, SEEK_END)))
{
DALI_LOG_ERROR("Error seeking WBMP data\n");
+ DALI_PRINT_SYSTEM_ERROR_LOG();
return false;
}
long positionIndicator = ftell(fp);
if(DALI_UNLIKELY(0u == fsize))
{
DALI_LOG_ERROR("Error: filesize is 0!\n");
+ DALI_PRINT_SYSTEM_ERROR_LOG();
return false;
}
if(DALI_UNLIKELY(fseek(fp, 0, SEEK_SET)))
{
DALI_LOG_ERROR("Error seeking WBMP data\n");
+ DALI_PRINT_SYSTEM_ERROR_LOG();
return false;
}
if(DALI_UNLIKELY(fsize <= 4))
map.ResizeUninitialized(fsize);
if(DALI_UNLIKELY(fread(&map[0], 1, readDataSize, fp) != readDataSize))
{
- DALI_LOG_WARNING("image file read opeation error! fileSize : %u, readDataSize : %u\n", fsize, readDataSize);
+ DALI_LOG_ERROR("image file read opeation error! fileSize : %u, readDataSize : %u\n", fsize, readDataSize);
+ DALI_PRINT_SYSTEM_ERROR_LOG();
return false;
}
// INTERNAL INCLUDES
#include <dali/devel-api/adaptor-framework/image-loading.h>
#include <dali/internal/imaging/common/pixel-buffer-impl.h>
+#include <dali/internal/system/common/system-error-print.h>
typedef uint8_t WebPByteType;
if(DALI_UNLIKELY(fseek(fp, 0, SEEK_END) <= -1))
{
DALI_LOG_ERROR("Error seeking within file\n");
+ DALI_PRINT_SYSTEM_ERROR_LOG();
+ return false;
+ }
+ long positionIndicator = ftell(fp);
+
+ if(positionIndicator > -1L)
+ {
+ mBufferSize = static_cast<uint32_t>(positionIndicator);
+ }
+
+ if(DALI_UNLIKELY(mBufferSize == 0u))
+ {
+ DALI_LOG_ERROR("Error: filesize is 0!\n");
+ DALI_PRINT_SYSTEM_ERROR_LOG();
return false;
}
- mBufferSize = ftell(fp);
}
if(DALI_LIKELY(!fseek(fp, 0, SEEK_SET)))
if(DALI_UNLIKELY(fread(mBuffer, sizeof(WebPByteType), mBufferSize, fp) != mBufferSize))
{
DALI_LOG_ERROR("Error read file\n");
+ DALI_PRINT_SYSTEM_ERROR_LOG();
return false;
}
return true;
else
{
DALI_LOG_ERROR("Error seeking within file\n");
+ DALI_PRINT_SYSTEM_ERROR_LOG();
}
}
else
/*
- * Copyright (c) 2024 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 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.
}
default:
{
- DALI_LOG_WARNING("Wrong color depth.\n");
+ DALI_LOG_ERROR("Wrong color depth.\n");
return;
}
}
return true;
}
- DALI_LOG_WARNING("TBM surface does not exist.\n");
+ DALI_LOG_ERROR("TBM surface does not exist.\n");
width = 0;
height = 0;
{
size_t sOffset = c * inputBufferLinePixelSize;
size_t dOffset = c * 3;
- size_t offset = dOffset + r * stride;
+ size_t offset = dOffset + r * stride;
ptr[offset + 2] = *(bufptr + sOffset);
ptr[offset + 1] = *(bufptr + sOffset + 1);
ptr[offset] = *(bufptr + sOffset + 2);
{
size_t sOffset = c * inputBufferLinePixelSize;
size_t dOffset = c * 4;
- size_t offset = dOffset + r * stride;
+ size_t offset = dOffset + r * stride;
ptr[offset + 3] = *(bufptr + sOffset);
ptr[offset + 2] = *(bufptr + sOffset + 1);
ptr[offset + 1] = *(bufptr + sOffset + 2);
{
size_t sOffset = c * inputBufferLinePixelSize;
size_t dOffset = c * 4;
- size_t offset = dOffset + r * stride;
+ size_t offset = dOffset + r * stride;
ptr[offset + 2] = *(bufptr + sOffset);
ptr[offset + 1] = *(bufptr + sOffset + 1);
ptr[offset] = *(bufptr + sOffset + 2);
return true;
}
- DALI_LOG_WARNING("TBM surface does not exist.\n");
+ DALI_LOG_ERROR("TBM surface does not exist.\n");
return false;
}
/*
- * Copyright (c) 2024 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 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.
}
default:
{
- DALI_LOG_WARNING("Wrong color format.\n");
+ DALI_LOG_ERROR("Wrong color format.\n");
return;
}
}
/*
- * Copyright (c) 2024 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 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.
}
default:
{
- DALI_LOG_WARNING("Pixmap has unsupported bit-depth for getting pixels: %u\n", pXImage->depth);
+ DALI_LOG_ERROR("Pixmap has unsupported bit-depth for getting pixels: %u\n", pXImage->depth);
}
}
}
/*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 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.
{
if(url.empty())
{
- DALI_LOG_WARNING("empty url requested \n");
+ DALI_LOG_ERROR("empty url requested \n");
return false;
}
/*
- * Copyright (c) 2024 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 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.
}
default:
{
- DALI_LOG_WARNING("Pixmap has unsupported bit-depth for getting pixels: %u\n", pXImage->depth);
+ DALI_LOG_ERROR("Pixmap has unsupported bit-depth for getting pixels: %u\n", pXImage->depth);
}
}
}
}
else
{
- DALI_LOG_WARNING("InputMethodContext Unable to get IMFContext\n");
+ DALI_LOG_ERROR("InputMethodContext Unable to get IMFContext (contextId:%p)\n", contextId);
}
}
else
{
- DALI_LOG_WARNING("InputMethodContext Unable to get IMFContext\n");
+ DALI_LOG_ERROR("InputMethodContext Unable to get IMFContext (contextId:(null))\n");
}
}
}
else
{
- DALI_LOG_WARNING("VKB Unable to get IMFContext so GetSize unavailable\n");
+ DALI_LOG_ERROR("VKB Unable to get IMFContext so GetSize unavailable\n");
// return 0 as real size unknown.
}
if(mIMFContext == NULL)
{
- DALI_LOG_WARNING("VKB Unable to excute ApplyOptions with Null ImfContext\n");
+ DALI_LOG_ERROR("VKB Unable to excute ApplyOptions with Null ImfContext\n");
return;
}
/*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 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.
}
else
{
- DALI_LOG_WARNING("VKB Unable to get InputMethodContext Context so GetSize unavailable\n");
+ DALI_LOG_ERROR("VKB Unable to get InputMethodContext Context so GetSize unavailable\n");
}
return Rect<int>(xPos, yPos, width, height);
if(mIMFContext == NULL)
{
- DALI_LOG_WARNING("VKB Unable to excute ApplyOptions with Null ImfContext\n");
+ DALI_LOG_ERROR("VKB Unable to excute ApplyOptions with Null ImfContext\n");
return;
}
if(!result || !bitmap)
{
bitmap.Reset();
- DALI_LOG_WARNING("Unable to decode bitmap supplied as in-memory blob.\n");
+ DALI_LOG_ERROR("Unable to decode bitmap supplied as in-memory blob.\n");
}
else
{
#ifndef DALI_INTERNAL_PLATFORM_FILECLOSER_H
#define DALI_INTERNAL_PLATFORM_FILECLOSER_H
/*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 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.
if(mFile == 0)
{
- DALI_LOG_WARNING("File open failed for memory buffer at location: \"%p\", of size: \"%u\", in mode: \"%s\".\n", static_cast<void*>(buffer), static_cast<unsigned>(dataSize), mode);
+ DALI_LOG_ERROR("File open failed for memory buffer at location: \"%p\", of size: \"%u\", in mode: \"%s\".\n", static_cast<void*>(buffer), static_cast<unsigned>(dataSize), mode);
}
}
if(closeFailed)
{
- DALI_LOG_WARNING("File close failed for FILE: \"%p\".\n", static_cast<void*>(mFile));
+ DALI_LOG_ERROR("File close failed for FILE: \"%p\".\n", static_cast<void*>(mFile));
}
mFile = 0;
}
}
else
{
- DALI_LOG_WARNING("Attempting to write to an invalid file descriptor\n");
+ DALI_LOG_ERROR("Attempting to write to an invalid file descriptor\n");
}
}
size = read(mFileDescriptor, &receivedData, sizeof(uint64_t));
if(size != sizeof(uint64_t))
{
- DALI_LOG_WARNING("Unable to read to UpdateEvent File descriptor\n");
+ DALI_LOG_ERROR("Unable to read to UpdateEvent File descriptor\n");
DALI_PRINT_SYSTEM_ERROR_LOG();
}
/*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 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.
FileDescriptorMonitorMac::FileDescriptorMonitorMac(int fileDescriptor, CallbackBase* callback, int eventBitmask)
: FileDescriptorMonitor(fileDescriptor, callback, eventBitmask)
{
- DALI_LOG_WARNING("Implementation missing for macOS");
+ DALI_LOG_WARNING_NOFN("Implementation missing for macOS");
}
FileDescriptorMonitorMac::~FileDescriptorMonitorMac()
/*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 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.
FileDescriptorMonitorWin::FileDescriptorMonitorWin(int fileDescriptor, CallbackBase* callback, int eventBitmask)
: FileDescriptorMonitor(fileDescriptor, callback, eventBitmask)
{
- DALI_LOG_WARNING("Implementation missing for MS Windows");
+ DALI_LOG_WARNING_NOFN("Implementation missing for MS Windows");
}
FileDescriptorMonitorWin::~FileDescriptorMonitorWin()
/*\r
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.\r
+ * Copyright (c) 2025 Samsung Electronics Co., Ltd.\r
*\r
* Licensed under the Apache License, Version 2.0 (the "License");\r
* you may not use this file except in compliance with the License.\r
}\r
else\r
{\r
- DALI_LOG_WARNING("Attempting to write to an invalid file descriptor\n");\r
+ DALI_LOG_ERROR("Attempting to write to an invalid file descriptor\n");\r
}\r
}\r
\r
}
default:
{
- DALI_LOG_WARNING("Type of path not handled.\n");
+ DALI_LOG_ERROR("Type of path not handled.\n");
// Nothing else to do.
break;
}
/**
* Conversion from Fractional26.6 to float
*/
-const float FROM_266 = 1.0f / 64.0f;
-const float POINTS_PER_INCH = 72.f;
+const float FROM_266 = 1.0f / 64.0f;
+const float POINTS_PER_INCH = 72.f;
const uint32_t FONT_AXIS_NAME_LEN = 4;
-const uint32_t FROM_16DOT16 = (1 << 16);
+const uint32_t FROM_16DOT16 = (1 << 16);
const uint32_t ELLIPSIS_CHARACTER = 0x2026;
const uint32_t CUSTOM_FONTS_MAX_COUNT = 10u;
*/
void ConvertTagToString(FT_ULong tag, char buffer[5])
{
- // the tag is same format as used in Harfbuzz.
- buffer[0] = (tag >> 24) & 0xFF;
- buffer[1] = (tag >> 16) & 0xFF;
- buffer[2] = (tag >> 8) & 0xFF;
- buffer[3] = tag & 0xFF;
- buffer[4] = 0;
+ // the tag is same format as used in Harfbuzz.
+ buffer[0] = (tag >> 24) & 0xFF;
+ buffer[1] = (tag >> 16) & 0xFF;
+ buffer[2] = (tag >> 8) & 0xFF;
+ buffer[3] = tag & 0xFF;
+ buffer[4] = 0;
}
/**
case FontDescription::FACE_FONT:
{
for(auto it = mCacheHandler->mFontDescriptionSizeCache.Begin();
- it != mCacheHandler->mFontDescriptionSizeCache.End();
- it++)
+ it != mCacheHandler->mFontDescriptionSizeCache.End();
+ it++)
{
const auto& item = mCacheHandler->mFontDescriptionSizeCache.GetElement(it);
if(item == fontIdCacheItem.index)
}
case FontDescription::BITMAP_FONT:
{
- fontDescription.type = FontDescription::BITMAP_FONT;
- auto it = mCacheHandler->mBitmapFontCache.find(fontIdCacheItem.index);
+ fontDescription.type = FontDescription::BITMAP_FONT;
+ auto it = mCacheHandler->mBitmapFontCache.find(fontIdCacheItem.index);
if(it != mCacheHandler->mBitmapFontCache.end())
{
fontDescription.family = it->second.font.name;
{
if(mCacheHandler->IsFontIdCacheItemExist(fontId - 1u))
{
- auto index = mCacheHandler->FindFontIdCacheItem(fontId - 1u).index;
- const FontFaceCacheItem& item = mCacheHandler->FindFontFaceCacheItem(index);
- foundColor = item.mHasColorTables;
+ auto index = mCacheHandler->FindFontIdCacheItem(fontId - 1u).index;
+ const FontFaceCacheItem& item = mCacheHandler->FindFontFaceCacheItem(index);
+ foundColor = item.mHasColorTables;
}
DALI_LOG_INFO(gFontClientLogFilter, Debug::Verbose, " foundColor : %s\n", (foundColor ? "true" : "false"));
FontCacheIndex fontCacheIndex = 0u;
// Check if exists a pair 'fontDescriptionId, requestedPointSize' in the cache.
- if(!mCacheHandler->FindFont(fontDescriptionId, requestedPointSize, fontCacheIndex, variationsMapPtr)
- || !mCacheHandler->IsFontFaceCacheItemExist(fontCacheIndex))
+ if(!mCacheHandler->FindFont(fontDescriptionId, requestedPointSize, fontCacheIndex, variationsMapPtr) || !mCacheHandler->IsFontFaceCacheItemExist(fontCacheIndex))
{
if(fontDescriptionId > 0u && fontDescriptionId <= mCacheHandler->mCharacterSetCache.Count())
{
if(fontId > 0u && mCacheHandler->IsFontIdCacheItemExist(fontId - 1u))
{
- fontCacheIndex = mCacheHandler->FindFontIdCacheItem(fontId - 1u).index;
+ fontCacheIndex = mCacheHandler->FindFontIdCacheItem(fontId - 1u).index;
mCacheHandler->FindFontFaceCacheItem(fontCacheIndex).mCharacterSet = FcCharSetCopy(mCacheHandler->mCharacterSetCache[fontDescriptionId - 1u]);
}
FontId fontId = array[i].fontId;
if(mCacheHandler->IsFontIdCacheItemExist(fontId - 1u))
{
- auto index = mCacheHandler->FindFontIdCacheItem(fontId - 1u).index;
- FontFaceCacheItem& font = mCacheHandler->FindFontFaceCacheItem(index);
+ auto index = mCacheHandler->FindFontIdCacheItem(fontId - 1u).index;
+ FontFaceCacheItem& font = mCacheHandler->FindFontFaceCacheItem(index);
if(!font.mVectorFontId)
{
error = FT_Get_MM_Var(ftFace, &mm_var);
if(FT_Err_Ok == error)
{
- FT_Fixed *coordinates = new FT_Fixed[mm_var->num_axis];
+ FT_Fixed* coordinates = new FT_Fixed[mm_var->num_axis];
for(uint32_t axisIndex = 0; axisIndex < mm_var->num_axis; axisIndex++)
{
char stringTag[FONT_AXIS_NAME_LEN + 1];
ConvertTagToString(mm_var->axis[axisIndex].tag, stringTag);
- auto valuePtr = variationsMap.Find(stringTag);
- float value = 0.0f;
+ auto valuePtr = variationsMap.Find(stringTag);
+ float value = 0.0f;
if(valuePtr != nullptr && valuePtr->Get(value))
{
if(requestedPointSize != requestedPointSizeBackup)
{
- DALI_LOG_WARNING(" The requested-point-size : %d, is reduced to point-size : %d\n", requestedPointSizeBackup, requestedPointSize);
+ DALI_LOG_DEBUG_INFO(" The requested-point-size : %d, is reduced to point-size : %d\n", requestedPointSizeBackup, requestedPointSize);
}
}
else
/*
- * Copyright (c) 2024 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 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.
ANativeWindow* window = Dali::Integration::AndroidFramework::Get().GetApplicationWindow();
width = ANativeWindow_getWidth(window);
height = ANativeWindow_getHeight(window);
- DALI_LOG_WARNING("Native window width %d, height %d", width, height);
+ DALI_LOG_DEBUG_INFO("Native window width %d, height %d", width, height);
}
void UpdateScreenSize()