/*
- * 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.
return oss.str();
}
+std::string GetWChan(int pid)
+{
+ std::ostringstream procwchan;
+ procwchan << "/proc/" << pid << "/wchan";
+ std::ifstream ifs;
+ ifs.open(procwchan.str(), std::ifstream::in);
+ std::string line;
+ std::getline(ifs, line);
+ ifs.close();
+ return line;
+}
+
std::string ReadAndEscape(std::string filename)
{
std::ostringstream os;
for(auto& tc : children)
{
std::chrono::steady_clock::duration timeSpan = endTime - tc.second.startTime;
- std::chrono::duration<double> seconds = std::chrono::duration_cast<std::chrono::duration<double>>(timeSpan);
- if(seconds.count() > MAXIMUM_CHILD_LIFETIME)
+ double seconds = double(timeSpan.count()) * std::chrono::steady_clock::period::num / std::chrono::steady_clock::period::den;
+
+ if(seconds > MAXIMUM_CHILD_LIFETIME)
{
// Kill the child process. A subsequent call to waitpid will process signal result below.
- kill(tc.first, SIGKILL);
+ if(!tc.second.finished)
+ {
+ printf("Child process %s WCHAN:%s\n", tc.second.name, GetWChan(tc.first).c_str());
+ kill(tc.first, SIGKILL);
+ tc.second.finished = true; // Only send kill signal once.
+ }
}
}
}
{
if(WIFEXITED(status))
{
- auto& testCase = children[childPid];
- testCase.result = WEXITSTATUS(status);
+ auto& testCase = children[childPid];
+ testCase.result = WEXITSTATUS(status);
+ testCase.finished = true;
if(testCase.result)
{
printf("Test case %s failed: %d\n", testCase.name, testCase.result);
RunningTestCases::iterator iter = children.find(childPid);
if(iter != children.end())
{
+ iter->second.finished = true;
printf("Test case %s exited with signal %s\n", iter->second.name, strsignal(status));
iter->second.result = 1;
failedTestCases.push_back(iter->second.testCase);
#define TEST_HARNESS_H
/*
- * Copyright (c) 2020 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.
const char* name;
std::chrono::steady_clock::time_point startTime;
std::chrono::system_clock::time_point startSystemTime;
- int32_t result;
+ int32_t result{0};
pid_t childPid{0};
testcase* tctPtr;
+ bool finished{false};
TestCase(int32_t index, testcase* testCase)
: testCase(index),
/*
- * 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.
{
if(s)
{
- return ((s->mMinFilter < gt::Filter::NEAREST_MIPMAP_NEAREST) ? (s->mMinFilter - gt::Filter::NEAREST) : ((s->mMinFilter - gt::Filter::NEAREST_MIPMAP_NEAREST) + 2)) |
- ((s->mMagFilter - gt::Filter::NEAREST) << SamplerFlags::FILTER_MAG_SHIFT) |
- (ConvertWrapMode(s->mWrapS) << SamplerFlags::WRAP_S_SHIFT) |
+ return ((s->mMinFilter < gt::Filter::NEAREST_MIPMAP_NEAREST) ? (s->mMinFilter - gt::Filter::NEAREST) : ((s->mMinFilter - gt::Filter::NEAREST_MIPMAP_NEAREST) + 2)) |
+ ((s->mMagFilter - gt::Filter::NEAREST) << SamplerFlags::FILTER_MAG_SHIFT) |
+ (ConvertWrapMode(s->mWrapS) << SamplerFlags::WRAP_S_SHIFT) |
(ConvertWrapMode(s->mWrapT) << SamplerFlags::WRAP_T_SHIFT);
}
else
if(iFind->first == gt::Attribute::JOINTS_0)
{
meshDefinition.mFlags |= (iFind->second->mComponentType == gt::Component::UNSIGNED_SHORT) * MeshDefinition::U16_JOINT_IDS;
- DALI_ASSERT_DEBUG(MaskMatch(meshDefinition.mFlags, MeshDefinition::U16_JOINT_IDS) || iFind->second->mComponentType == gt::Component::FLOAT);
+ meshDefinition.mFlags |= (iFind->second->mComponentType == gt::Component::UNSIGNED_BYTE) * MeshDefinition::U8_JOINT_IDS;
+ DALI_ASSERT_DEBUG(MaskMatch(meshDefinition.mFlags, MeshDefinition::U16_JOINT_IDS) || MaskMatch(meshDefinition.mFlags, MeshDefinition::U8_JOINT_IDS) || iFind->second->mComponentType == gt::Component::FLOAT);
}
}
else if(needNormalsTangents)
Vector<float> inputDataBuffer;
Vector<T> outputDataBuffer;
- const float duration = LoadDataFromAccessors<T>(path, input, output, inputDataBuffer, outputDataBuffer);
+ const float duration = std::max(LoadDataFromAccessors<T>(path, input, output, inputDataBuffer, outputDataBuffer), AnimationDefinition::MIN_DURATION_SECONDS);
for(uint32_t i = 0; i < input.mCount; ++i)
{
Index propertyIndex = 0u;
for(const auto& channel : animation.mChannels)
{
- Index nodeIndex = context.mNodeIndices.GetRuntimeId(channel.mTarget.mNode.GetIndex());
- float duration = 0.f;
+ Index nodeIndex = context.mNodeIndices.GetRuntimeId(channel.mTarget.mNode.GetIndex());
+ float duration = 0.f;
switch(channel.mTarget.mPath)
{
/*
- * 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.
{
namespace
{
-using Uint16Vector4 = uint16_t[4];
-
class IndexProvider
{
public:
return success;
}
+template<typename T>
+void ReadJointAccessor(MeshDefinition::RawData& raw, const MeshDefinition::Accessor& accessor, std::ifstream& binFile, const std::string& meshPath)
+{
+ constexpr auto sizeofBlobUnit = sizeof(T) * 4;
+
+ DALI_ASSERT_ALWAYS(((accessor.mBlob.mLength % sizeofBlobUnit == 0) ||
+ accessor.mBlob.mStride >= sizeofBlobUnit) &&
+ "Joints buffer length not a multiple of element size");
+ const auto inBufferSize = accessor.mBlob.GetBufferSize();
+ const auto outBufferSize = (sizeof(Vector4) / sizeofBlobUnit) * inBufferSize;
+
+ std::vector<uint8_t> buffer(outBufferSize);
+ auto inBuffer = buffer.data() + outBufferSize - inBufferSize;
+ if(!ReadAccessor(accessor, binFile, inBuffer))
+ {
+ ExceptionFlinger(ASSERT_LOCATION) << "Failed to read joints from '" << meshPath << "'.";
+ }
+
+ if constexpr(sizeofBlobUnit != sizeof(Vector4))
+ {
+ auto floats = reinterpret_cast<float*>(buffer.data());
+ const auto end = inBuffer + inBufferSize;
+ while(inBuffer != end)
+ {
+ const auto value = *reinterpret_cast<T*>(inBuffer);
+ *floats = static_cast<float>(value);
+
+ inBuffer += sizeof(T);
+ ++floats;
+ }
+ }
+ raw.mAttribs.push_back({"aJoints", Property::VECTOR4, static_cast<uint32_t>(outBufferSize / sizeof(Vector4)), std::move(buffer)});
+}
+
void GenerateNormals(MeshDefinition::RawData& raw)
{
auto& attribs = raw.mAttribs;
{
if(MaskMatch(mFlags, U16_JOINT_IDS))
{
- DALI_ASSERT_ALWAYS(((mJoints0.mBlob.mLength % sizeof(Uint16Vector4) == 0) ||
- mJoints0.mBlob.mStride >= sizeof(Uint16Vector4)) &&
- "Joints buffer length not a multiple of element size");
- const auto inBufferSize = mJoints0.mBlob.GetBufferSize();
- std::vector<uint8_t> buffer(inBufferSize * 2);
- auto u16s = buffer.data() + inBufferSize;
- if(!ReadAccessor(mJoints0, binFile, u16s))
- {
- ExceptionFlinger(ASSERT_LOCATION) << "Failed to read joints from '" << meshPath << "'.";
- }
-
- auto floats = reinterpret_cast<float*>(buffer.data());
- auto end = u16s + inBufferSize;
- while(u16s != end)
- {
- auto value = *reinterpret_cast<uint16_t*>(u16s);
- *floats = static_cast<float>(value);
-
- u16s += sizeof(uint16_t);
- ++floats;
- }
- raw.mAttribs.push_back({"aJoints", Property::VECTOR4, static_cast<uint32_t>(buffer.size() / sizeof(Vector4)), std::move(buffer)});
+ ReadJointAccessor<uint16_t>(raw, mJoints0, binFile, meshPath);
+ }
+ else if(MaskMatch(mFlags, U8_JOINT_IDS))
+ {
+ ReadJointAccessor<uint8_t>(raw, mJoints0, binFile, meshPath);
}
else
{
- DALI_ASSERT_ALWAYS(((mJoints0.mBlob.mLength % sizeof(Vector4) == 0) ||
- mJoints0.mBlob.mStride >= sizeof(Vector4)) &&
- "Joints buffer length not a multiple of element size");
- const auto bufferSize = mJoints0.mBlob.GetBufferSize();
- std::vector<uint8_t> buffer(bufferSize);
- if(!ReadAccessor(mJoints0, binFile, buffer.data()))
- {
- ExceptionFlinger(ASSERT_LOCATION) << "Failed to read joints from '" << meshPath << "'.";
- }
-
- raw.mAttribs.push_back({"aJoints", Property::VECTOR4, static_cast<uint32_t>(bufferSize / sizeof(Vector4)), std::move(buffer)});
+ ReadJointAccessor<float>(raw, mJoints0, binFile, meshPath);
}
DALI_ASSERT_ALWAYS(((mWeights0.mBlob.mLength % sizeof(Vector4) == 0) ||
#ifndef DALI_SCENE3D_LOADER_MESH_DEFINITION_H
#define DALI_SCENE3D_LOADER_MESH_DEFINITION_H
/*
- * 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.
FLIP_UVS_VERTICAL = NthBit(0),
U32_INDICES = NthBit(1), // default is unsigned short
U16_JOINT_IDS = NthBit(2), // default is floats
+ U8_JOINT_IDS = NthBit(3),
};
enum Attributes
BackgroundColorSpan::~BackgroundColorSpan() = default;
//Methods
-const Vector4 BackgroundColorSpan::GetBackgroundColor() const
+Vector4 BackgroundColorSpan::GetBackgroundColor() const
{
return GetImplementation(*this).GetBackgroundColor();
}
*
* @return A background-color value.
*/
- const Vector4 GetBackgroundColor() const;
+ Vector4 GetBackgroundColor() const;
/**
* @brief Retrieve whether the background-color is defined.
return BaseSpan(dynamic_cast<Dali::Toolkit::Text::Internal::BaseSpan*>(handle.GetObjectPtr()));
}
-const Dali::Toolkit::Text::SpanType::Value BaseSpan::GetSpanType() const
+Dali::Toolkit::Text::SpanType::Value BaseSpan::GetSpanType() const
{
return GetImplementation(*this).GetSpanType();
}
*
* @return A span type value.
*/
- const Dali::Toolkit::Text::SpanType::Value GetSpanType() const;
+ Dali::Toolkit::Text::SpanType::Value GetSpanType() const;
/**
* @brief Downcasts to a BaseSpan handle.
CharacterSpacingSpan::~CharacterSpacingSpan() = default;
//Methods
-const float CharacterSpacingSpan::GetCharacterSpacing() const
+float CharacterSpacingSpan::GetCharacterSpacing() const
{
return GetImplementation(*this).GetCharacterSpacing();
}
*
* @return A CharacterSpacing value.
*/
- const float GetCharacterSpacing() const;
+ float GetCharacterSpacing() const;
/**
* @brief Retrieve whether the CharacterSpacing is defined.
return GetImplementation(*this).IsFamilyNameDefined();
}
-const Dali::TextAbstraction::FontWeight::Type FontSpan::GetWeight() const
+Dali::TextAbstraction::FontWeight::Type FontSpan::GetWeight() const
{
return GetImplementation(*this).GetWeight();
}
return GetImplementation(*this).IsWeightDefined();
}
-const Dali::TextAbstraction::FontWidth::Type FontSpan::GetWidth() const
+Dali::TextAbstraction::FontWidth::Type FontSpan::GetWidth() const
{
return GetImplementation(*this).GetWidth();
}
return GetImplementation(*this).IsWidthDefined();
}
-const Dali::TextAbstraction::FontSlant::Type FontSpan::GetSlant() const
+Dali::TextAbstraction::FontSlant::Type FontSpan::GetSlant() const
{
return GetImplementation(*this).GetSlant();
}
return GetImplementation(*this).IsSlantDefined();
}
-const float FontSpan::GetSize() const
+float FontSpan::GetSize() const
{
return GetImplementation(*this).GetSize();
}
*
* @return A font weight value.
*/
- const Dali::TextAbstraction::FontWeight::Type GetWeight() const;
+ Dali::TextAbstraction::FontWeight::Type GetWeight() const;
/**
* @brief Retrive the font width.
*
* @return A font width value.
*/
- const Dali::TextAbstraction::FontWidth::Type GetWidth() const;
+ Dali::TextAbstraction::FontWidth::Type GetWidth() const;
/**
* @brief Retrive the font slant.
*
* @return A font slant value.
*/
- const Dali::TextAbstraction::FontSlant::Type GetSlant() const;
+ Dali::TextAbstraction::FontSlant::Type GetSlant() const;
/**
* @brief Retrive the font size.
*
* @return A font size value.
*/
- const float GetSize() const;
+ float GetSize() const;
/**
* @brief Retrieve whether the font family name is defined.
ForegroundColorSpan::~ForegroundColorSpan() = default;
//Methods
-const Vector4 ForegroundColorSpan::GetForegroundColor() const
+Vector4 ForegroundColorSpan::GetForegroundColor() const
{
return GetImplementation(*this).GetForegroundColor();
}
*
* @return A foreground-color value.
*/
- const Vector4 GetForegroundColor() const;
+ Vector4 GetForegroundColor() const;
/**
* @brief Retrieve whether the foreground-color is defined.
/**
* @brief Enumeration for type of the span.
*/
-enum class Value : uint8_t
+enum Value : uint8_t
{
BASE = 0,
FOREGROUND_COLOR,
UNDERLINE,
STRIKETHROUGH,
CHARACTER_SPACING
-
};
} // namespace SpanType
StrikethroughSpan::~StrikethroughSpan() = default;
//Methods
-const Vector4 StrikethroughSpan::GetColor() const
+Vector4 StrikethroughSpan::GetColor() const
{
return GetImplementation(*this).GetColor();
}
return GetImplementation(*this).IsColorDefined();
}
-const float StrikethroughSpan::GetHeight() const
+float StrikethroughSpan::GetHeight() const
{
return GetImplementation(*this).GetHeight();
}
*
* @return A color value.
*/
- const Vector4 GetColor() const;
+ Vector4 GetColor() const;
/**
* @brief Retrieve whether the color is defined.
*
* @return A height value.
*/
- const float GetHeight() const;
+ float GetHeight() const;
/**
* @brief Retrieve whether the height is defined.
//Methods
-const Text::Underline::Type UnderlineSpan::GetType() const
+Text::Underline::Type UnderlineSpan::GetType() const
{
return GetImplementation(*this).GetType();
}
return GetImplementation(*this).IsTypeDefined();
}
-const Vector4 UnderlineSpan::GetColor() const
+Vector4 UnderlineSpan::GetColor() const
{
return GetImplementation(*this).GetColor();
}
return GetImplementation(*this).IsColorDefined();
}
-const float UnderlineSpan::GetHeight() const
+float UnderlineSpan::GetHeight() const
{
return GetImplementation(*this).GetHeight();
}
return GetImplementation(*this).IsHeightDefined();
}
-const float UnderlineSpan::GetDashGap() const
+float UnderlineSpan::GetDashGap() const
{
return GetImplementation(*this).GetDashGap();
}
return GetImplementation(*this).IsDashGapDefined();
}
-const float UnderlineSpan::GetDashWidth() const
+float UnderlineSpan::GetDashWidth() const
{
return GetImplementation(*this).GetDashWidth();
}
*
* @return A type value.
*/
- const Text::Underline::Type GetType() const;
+ Text::Underline::Type GetType() const;
/**
* @brief Retrieve whether the type is defined.
*
* @return A color value.
*/
- const Vector4 GetColor() const;
+ Vector4 GetColor() const;
/**
* @brief Retrieve whether the color is defined.
*
* @return A height value.
*/
- const float GetHeight() const;
+ float GetHeight() const;
/**
* @brief Retrieve whether the height is defined.
*
* @return A dash-gap value.
*/
- const float GetDashGap() const;
+ float GetDashGap() const;
/**
* @brief Retrieve whether the dash-gap is defined.
*
* @return A dash-width value.
*/
- const float GetDashWidth() const;
+ float GetDashWidth() const;
/**
* @brief Retrieve whether the dash-width is defined.
/*
- * Copyright (c) 2021 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 <vector>
// GLES3+ is required for this to work!
-#include <GLES3/gl3.h>
#include <EGL/egl.h>
#include <EGL/eglext.h>
+#include <GLES3/gl3.h>
#include <unistd.h>
#include <any>
/**
* Vertices of quad to display when using offscreen rendering
*/
+// clang-format off
constexpr float QUAD_VERTS[] = {
- // positions // colors // texture coords
1.0f, 1.0f,
1.0f, -1.0f,
-1.0f, -1.0f,
* UV coords of quad for offscreen rendering
*/
constexpr float QUAD_UV[] = {
- // positions // colors // texture coords
1.0f, 1.0f, // top right
1.0f, 0.0f, // bottom right
0.0f, 0.0f, // bottom left
0.0f, 1.0f // top left
};
-}
+// clang-format on
+} // namespace
namespace Dali::Internal
{
};
// Queues management
- bool DequeueTextureDrawBuffer( uint32_t& outIndex )
+ bool DequeueTextureDrawBuffer(uint32_t& outIndex)
{
std::scoped_lock<std::recursive_mutex> lock(mTextureQueueMutex);
if(mTextureDrawQueue.empty())
fb.framebufferId = offscreenFramebuffer;
[[maybe_unused]] auto result = glCheckFramebufferStatus(GL_FRAMEBUFFER);
- DALI_ASSERT_ALWAYS( result == GL_FRAMEBUFFER_COMPLETE && "Framebuffer incomplete!");
+ DALI_ASSERT_ALWAYS(result == GL_FRAMEBUFFER_COMPLETE && "Framebuffer incomplete!");
return offscreenFramebuffer;
}
return 0u;
}
-
/**
* Constructor
*/
*/
void InitializeThread()
{
+ // Make mRunning true first
+ // Terminate() may be called before StartThread()
+ mRunning = true;
+
mThread = std::make_unique<std::thread>(&Impl::StartThread, this);
}
- void PushRenderCallbackInputData( const Dali::RenderCallbackInput& renderCallbackInput )
+ void PushRenderCallbackInputData(const Dali::RenderCallbackInput& renderCallbackInput)
{
-
std::scoped_lock<std::mutex> lock(mRenderCallbackInputDataMutex);
mRenderCallbackInputData = renderCallbackInput;
}
- void PopRenderCallbackInputData( Dali::RenderCallbackInput& renderCallbackInput )
+ void PopRenderCallbackInputData(Dali::RenderCallbackInput& renderCallbackInput)
{
std::scoped_lock<std::mutex> lock(mRenderCallbackInputDataMutex);
renderCallbackInput = mRenderCallbackInputData;
*/
void StartThread()
{
- mRunning = true;
-
// We need to acquire shared context, while this is not done
// it's necessary to wait for context to be bound.
while(mRunning && !mEglContextBound)
GL(glDeleteTextures(1, &fb.textureId))
fb.textureId = 0u;
}
- fb.textureId = CreateOffscreenTexture( mWidth, mHeight );
- fb.framebufferId = CreateFramebuffer( index, mWidth, mHeight );
+ fb.textureId = CreateOffscreenTexture(mWidth, mHeight);
+ fb.framebufferId = CreateFramebuffer(index, mWidth, mHeight);
index++;
}
}
Dali::RenderCallbackInput input;
- PopRenderCallbackInputData( input );
+ PopRenderCallbackInputData(input);
uint32_t index{0u};
- auto result = DequeueTextureDrawBuffer(index);
+ auto result = DequeueTextureDrawBuffer(index);
if(!result)
{
continue;
GL(glBindFramebuffer(GL_FRAMEBUFFER, fb.framebufferId))
GL(glClear(0));
-
// Invoke callback
if(mOnRenderCallback)
{
}
}
- void Resize(uint32_t width, uint32_t height )
+ void Resize(uint32_t width, uint32_t height)
{
- mWidth = width;
- mHeight = height;
+ mWidth = width;
+ mHeight = height;
mResizeRequest = true;
}
- uint32_t mWidth {0u};
- uint32_t mHeight {0u};
- std::atomic_bool mResizeRequest { false };
+ uint32_t mWidth{0u};
+ uint32_t mHeight{0u};
+ std::atomic_bool mResizeRequest{false};
/**
* Clones current EGL context, this function must be called from the render callback
}
// Pre-, Post- functions are being called from the callbacks
- void GlViewPreInit( const Dali::RenderCallbackInput& input )
+ void GlViewPreInit(const Dali::RenderCallbackInput& input)
{
// This runs on DALi RenderThread!!!
if(mThread && !mEglContextBound)
{
// Store the shared context just once
- if(!mEglSharedContext )
+ if(!mEglSharedContext)
{
// Store the shared context returned by the drawable callback
mEglSharedContext = std::any_cast<EGLContext>(input.eglContext);
{
glGetShaderInfoLog(shader, infoLen, NULL, logBuffer);
- DALI_ASSERT_ALWAYS( true && logBuffer);
+ DALI_ASSERT_ALWAYS(true && logBuffer);
free(logBuffer);
logBuffer = NULL;
" gl_FragColor = texture2D(tex, vTexCoords);\n"
"}\n";
- mBlitProgram = CreateProgram(glVertexShader, glFragmentShader);
- mBlitVertexLocation = glGetAttribLocation(mBlitProgram, "vertexPosition");
- mBlitTexCoord = glGetAttribLocation(mBlitProgram, "texCoords");
+ mBlitProgram = CreateProgram(glVertexShader, glFragmentShader);
+ mBlitVertexLocation = glGetAttribLocation(mBlitProgram, "vertexPosition");
+ mBlitTexCoord = glGetAttribLocation(mBlitProgram, "texCoords");
}
GLuint mBlitProgram{0u};
mTextureDrawQueue.push_back(i);
// Create framebuffers
- CreateFramebuffer( i, mWidth, mHeight);
+ CreateFramebuffer(i, mWidth, mHeight);
}
}
// Deqeueue texture, there should be always something waiting to be drawn, if not, ignore
FrameBufferTexture fb;
- auto textureBufferIndex = DequeueTextureReadBuffer(fb);
+ auto textureBufferIndex = DequeueTextureReadBuffer(fb);
// Do nothing if frame not ready
if(textureBufferIndex < 0)
if(mLastTextureBufferIndex >= 0)
{
// return it to the queue
- EnqueueTextureDrawBuffer( mLastTextureBufferIndex );
+ EnqueueTextureDrawBuffer(mLastTextureBufferIndex);
}
}
}
GL(glBindTexture(GL_TEXTURE_2D, mFramebufferTexture[textureBufferIndex].textureId));
- GL(glDrawElements( GL_TRIANGLES, 6, GL_UNSIGNED_SHORT, QUAD_INDICES))
+ GL(glDrawElements(GL_TRIANGLES, 6, GL_UNSIGNED_SHORT, QUAD_INDICES))
mLastTextureBufferIndex = textureBufferIndex;
}
std::deque<uint32_t> mTextureReadQueue;
// Mutex guarding the queues reads/writes
- std::recursive_mutex mTextureQueueMutex;
- std::unique_ptr<std::thread> mThread; ///< Thread for parallel mode
- bool mRunning{false}; ///< Thread running flag
+ std::recursive_mutex mTextureQueueMutex;
+ std::unique_ptr<std::thread> mThread; ///< Thread for parallel mode
+ bool mRunning{false}; ///< Thread running flag
EGLContext mEglContext{nullptr}; ///< EGL context associated with the thread
EGLContext mEglSharedContext{nullptr};
- EGLDisplay mEglDisplay{nullptr}; ///< Current EGL display
- std::atomic_bool mEglContextBound{false}; ///< Flag indicating whether EGL context is bound
+ EGLDisplay mEglDisplay{nullptr}; ///< Current EGL display
+ std::atomic_bool mEglContextBound{false}; ///< Flag indicating whether EGL context is bound
EGLSurface mDrawSurface{EGL_NO_SURFACE}; ///< Current EGL draw surface
EGLSurface mReadSurface{EGL_NO_SURFACE}; ///< Current EGL read surface
std::unique_ptr<CallbackBase> mOnTerminateCallback{nullptr};
int32_t mLastTextureBufferIndex{-1};
- bool mBlitStateDone{false};
+ bool mBlitStateDone{false};
- std::mutex mRenderCallbackInputDataMutex{};
+ std::mutex mRenderCallbackInputDataMutex{};
Dali::RenderCallbackInput mRenderCallbackInputData{};
NativeRendererCreateInfo mCreateInfo{};
mImpl->Resize(width, height);
}
-void DrawableViewNativeRenderer::PushRenderCallbackInputData( const Dali::RenderCallbackInput& renderCallbackInput )
+void DrawableViewNativeRenderer::PushRenderCallbackInputData(const Dali::RenderCallbackInput& renderCallbackInput)
{
mImpl->PushRenderCallbackInputData(renderCallbackInput);
}
mImpl->Terminate();
}
-} // namespace Dali::Internal
\ No newline at end of file
+} // namespace Dali::Internal
struct TextUpdater;
struct SpannableHandler;
- std::unique_ptr<Impl> mImpl;
+ std::unique_ptr<Impl> mImpl{nullptr};
};
} // namespace Dali::Toolkit::Text
}
//Methods
-const Vector4 BackgroundColorSpan::GetBackgroundColor() const
+Vector4 BackgroundColorSpan::GetBackgroundColor() const
{
return mImpl->mBackgroundColor;
}
/**
* @copydoc Dali::Toolkit::Text::BackgroundColorSpan::GetBackgroundColor()
*/
- const Vector4 GetBackgroundColor() const;
+ Vector4 GetBackgroundColor() const;
/**
* @copydoc Dali::Toolkit::Text::BackgroundColorSpan::IsBackgroundColorDefined()
{
}
-const Dali::Toolkit::Text::SpanType::Value BaseSpan::GetSpanType() const
+Dali::Toolkit::Text::SpanType::Value BaseSpan::GetSpanType() const
{
return mImpl->mSpanTypeValue;
}
* @copydoc Dali::Toolkit::Text::SpanType::Value GetSpanType
*/
- const Dali::Toolkit::Text::SpanType::Value GetSpanType() const;
+ Dali::Toolkit::Text::SpanType::Value GetSpanType() const;
public: //Methods for internal only
/**
}
//Methods
-const float CharacterSpacingSpan::GetCharacterSpacing() const
+float CharacterSpacingSpan::GetCharacterSpacing() const
{
return mImpl->mCharacterSpacing;
}
/**
* @copydoc Dali::Toolkit::Text::CharacterSpacingSpan::GetCharacterSpacing()
*/
- const float GetCharacterSpacing() const;
+ float GetCharacterSpacing() const;
/**
* @copydoc Dali::Toolkit::Text::CharacterSpacingSpan::IsCharacterSpacingDefined()
mImpl->mFamilyNameDefined = true;
}
-const Dali::TextAbstraction::FontWeight::Type FontSpan::GetWeight() const
+Dali::TextAbstraction::FontWeight::Type FontSpan::GetWeight() const
{
return mImpl->mWeight;
}
mImpl->mWeightDefined = true;
}
-const Dali::TextAbstraction::FontWidth::Type FontSpan::GetWidth() const
+Dali::TextAbstraction::FontWidth::Type FontSpan::GetWidth() const
{
return mImpl->mWidth;
}
mImpl->mWidthDefined = true;
}
-const Dali::TextAbstraction::FontSlant::Type FontSpan::GetSlant() const
+Dali::TextAbstraction::FontSlant::Type FontSpan::GetSlant() const
{
return mImpl->mSlant;
}
mImpl->mSlantDefined = true;
}
-const float FontSpan::GetSize() const
+float FontSpan::GetSize() const
{
return mImpl->mSize;
}
/**
* @copydoc Dali::Toolkit::Text::FontSpan::GetWeight()
*/
- const Dali::TextAbstraction::FontWeight::Type GetWeight() const;
+ Dali::TextAbstraction::FontWeight::Type GetWeight() const;
/**
* @copydoc Dali::Toolkit::Text::FontSpan::IsWeightDefined()
/**
* @copydoc Dali::Toolkit::Text::FontSpan::GetWidth()
*/
- const Dali::TextAbstraction::FontWidth::Type GetWidth() const;
+ Dali::TextAbstraction::FontWidth::Type GetWidth() const;
/**
* @copydoc Dali::Toolkit::Text::FontSpan::IsWidthDefined()
/**
* @copydoc Dali::Toolkit::Text::FontSpan::GetSlant()
*/
- const Dali::TextAbstraction::FontSlant::Type GetSlant() const;
+ Dali::TextAbstraction::FontSlant::Type GetSlant() const;
/**
* @copydoc Dali::Toolkit::Text::FontSpan::IsSlantDefined()
/**
* @copydoc Dali::Toolkit::Text::FontSpan::GetSize()
*/
- const float GetSize() const;
+ float GetSize() const;
/**
* @copydoc Dali::Toolkit::Text::FontSpan::IsSizeDefined()
}
//Methods
-const Vector4 ForegroundColorSpan::GetForegroundColor() const
+Vector4 ForegroundColorSpan::GetForegroundColor() const
{
return mImpl->mForegroundColor;
}
/**
* @copydoc Dali::Toolkit::Text::ForegroundColorSpan::GetForegroundColor()
*/
- const Vector4 GetForegroundColor() const;
+ Vector4 GetForegroundColor() const;
/**
* @copydoc Dali::Toolkit::Text::ForegroundColorSpan::IsForegroundColorDefined()
}
//Methods
-const Vector4 StrikethroughSpan::GetColor() const
+Vector4 StrikethroughSpan::GetColor() const
{
return mImpl->mStrikethroughProperties.color;
}
mImpl->mStrikethroughProperties.colorDefined = true;
}
-const float StrikethroughSpan::GetHeight() const
+float StrikethroughSpan::GetHeight() const
{
return mImpl->mStrikethroughProperties.height;
}
/**
* @copydoc Dali::Toolkit::Text::StrikethroughSpan::GetColor()
*/
- const Vector4 GetColor() const;
+ Vector4 GetColor() const;
/**
* @copydoc Dali::Toolkit::Text::StrikethroughSpan::IsColorDefined()
/**
* @copydoc Dali::Toolkit::Text::StrikethroughSpan::GetHeight()
*/
- const float GetHeight() const;
+ float GetHeight() const;
/**
* @copydoc Dali::Toolkit::Text::StrikethroughSpan::IsHeightDefined()
//Methods
-const Text::Underline::Type UnderlineSpan::GetType() const
+Text::Underline::Type UnderlineSpan::GetType() const
{
return mImpl->mUnderlineProperties.type;
}
mImpl->mUnderlineProperties.typeDefined = true;
}
-const Vector4 UnderlineSpan::GetColor() const
+Vector4 UnderlineSpan::GetColor() const
{
return mImpl->mUnderlineProperties.color;
}
mImpl->mUnderlineProperties.colorDefined = true;
}
-const float UnderlineSpan::GetHeight() const
+float UnderlineSpan::GetHeight() const
{
return mImpl->mUnderlineProperties.height;
}
mImpl->mUnderlineProperties.heightDefined = true;
}
-const float UnderlineSpan::GetDashGap() const
+float UnderlineSpan::GetDashGap() const
{
return mImpl->mUnderlineProperties.dashGap;
}
mImpl->mUnderlineProperties.dashGapDefined = true;
}
-const float UnderlineSpan::GetDashWidth() const
+float UnderlineSpan::GetDashWidth() const
{
return mImpl->mUnderlineProperties.dashWidth;
}
/**
* @copydoc Dali::Toolkit::Text::UnderlineSpan::GetType()
*/
- const Text::Underline::Type GetType() const;
+ Text::Underline::Type GetType() const;
/**
* @copydoc Dali::Toolkit::Text::UnderlineSpan::IsTypeDefined()
/**
* @copydoc Dali::Toolkit::Text::UnderlineSpan::GetColor()
*/
- const Vector4 GetColor() const;
+ Vector4 GetColor() const;
/**
* @copydoc Dali::Toolkit::Text::UnderlineSpan::IsColorDefined()
/**
* @copydoc Dali::Toolkit::Text::UnderlineSpan::GetHeight()
*/
- const float GetHeight() const;
+ float GetHeight() const;
/**
* @copydoc Dali::Toolkit::Text::UnderlineSpan::IsHeightDefined()
/**
* @copydoc Dali::Toolkit::Text::UnderlineSpan::GetDashGap()
*/
- const float GetDashGap() const;
+ float GetDashGap() const;
/**
* @copydoc Dali::Toolkit::Text::UnderlineSpan::IsDashGapDefined()
/**
* @copydoc Dali::Toolkit::Text::UnderlineSpan::GetDashWidth()
*/
- const float GetDashWidth() const;
+ float GetDashWidth() const;
/**
* @copydoc Dali::Toolkit::Text::UnderlineSpan::IsDashWidthDefined()
{
const unsigned int TOOLKIT_MAJOR_VERSION = 2;
const unsigned int TOOLKIT_MINOR_VERSION = 2;
-const unsigned int TOOLKIT_MICRO_VERSION = 9;
+const unsigned int TOOLKIT_MICRO_VERSION = 10;
const char* const TOOLKIT_BUILD_DATE = __DATE__ " " __TIME__;
#ifdef DEBUG_ENABLED
Name: dali2-toolkit
Summary: Dali 3D engine Toolkit
-Version: 2.2.9
+Version: 2.2.10
Release: 1
Group: System/Libraries
License: Apache-2.0 and BSD-3-Clause and MIT