/*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 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.
{"uViewMatrix", GL_FLOAT_MAT4, 1},
{"uLightCameraProjectionMatrix", GL_FLOAT_MAT4, 1},
{"uLightCameraViewMatrix", GL_FLOAT_MAT4, 1}};
+
+ // WARNING: IF YOU CHANGE THIS LIST, ALSO CHANGE UNIFORMS IN test-graphics-reflection.cpp
}
void TestGlAbstraction::PreRender()
/*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 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.
mUsage(usage)
{
memory.resize(size);
- mGl.GetBufferTrace().EnableLogging(true);
+ mGl.GetBufferTrace().EnableLogging(false);
}
void TestGraphicsBuffer::Bind()
};
TestGraphicsController::TestGraphicsController()
-: mCallStack(true, "TestGraphicsController."),
- mCommandBufferCallStack(true, "TestCommandBuffer."),
- mFrameBufferCallStack(true, "TestFrameBuffer.")
+: mCallStack(false, "TestGraphicsController."),
+ mCommandBufferCallStack(false, "TestCommandBuffer."),
+ mFrameBufferCallStack(false, "TestFrameBuffer.")
{
mCallStack.Enable(true);
mCommandBufferCallStack.Enable(true);
auto& trace = mGl.GetTextureTrace();
trace.Enable(true);
- trace.EnableLogging(true);
+ trace.EnableLogging(false);
}
void TestGraphicsController::SubmitCommandBuffers(const Graphics::SubmitInfo& submitInfo)
/*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 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.
UniformData("uViewMatrix", Property::Type::MATRIX),
UniformData("uLightCameraProjectionMatrix", Property::Type::MATRIX),
UniformData("uLightCameraViewMatrix", Property::Type::MATRIX),
+
+ // WARNING: IF YOU CHANGE THIS LIST, ALSO CHANGE mActiveUniforms IN test-gl-abstraction, Initialize
};
}
/*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 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(!found)
{
- fprintf(stderr, "Search for %s(%s) failed\n", method.c_str(), params.c_str());
+ fprintf(stderr, "Search for %s() failed\n", method.c_str());
+ }
+ return found;
+}
+
+bool TraceCallStack::FindMethodAndGetParameters(std::string method, NamedParams& params) const
+{
+ bool found = false;
+ for(size_t i = 0; i < mCallStack.size(); i++)
+ {
+ if(0 == mCallStack[i].method.compare(method))
+ {
+ found = true;
+ params = mCallStack[i].namedParams;
+ break;
+ }
+ }
+ if(!found)
+ {
+ fprintf(stderr, "Search for %s() failed\n", method.c_str());
}
return found;
}
bool FindMethodAndGetParameters(std::string method, std::string& params) const;
/**
+ * Search for a method in the stack and return its parameters if found
+ * @param[in] method The name of the method
+ * @param[out] params of the method
+ * @return true if the method was in the stack
+ */
+ bool FindMethodAndGetParameters(std::string method, NamedParams& params) const;
+
+ /**
* Count how many times a method was called
* @param[in] method The name of the method
* @return The number of times it was called
// EXTERNAL INCLUDES
#include <string>
+#include <dali/public-api/math/rect.h>
// INTERNAL INCLUDES
#include <dali/devel-api/adaptor-framework/accessibility.h>
virtual bool SetRangeOfSelection(std::size_t selectionIndex, std::size_t startOffset, std::size_t endOffset) = 0;
/**
+ * @brief Gets the bounding box for text within a range in text.
+ *
+ * @param[in] startOffset The index of first character
+ * @param[in] endOffset The index of first character after the last one expected
+ * @param[in] type The enumeration with type of coordinate system
+ *
+ * @return Rect<> giving the position and size of the specified range of text
+ * @remarks This method is `GetRangeExtents` in DBus method.
+ */
+ virtual Rect<> GetRangeExtents(std::size_t startOffset, std::size_t endOffset, CoordinateType type) = 0;
+
+ /**
* @brief Downcasts an Accessible to a Text.
*
* @param obj The Accessible
mDirectReadingClient.method<DBus::ValueOrError<void>(bool)>("PauseResume").asyncCall([](DBus::ValueOrError<void> msg) {
if(!msg)
{
- LOG() << "Direct reading command failed (" << msg.getError().message << ")";
+ LOG() << "Direct reading command failed (" << msg.getError().message << ")\n";
}
},
true);
mDirectReadingClient.method<DBus::ValueOrError<void>(bool)>("PauseResume").asyncCall([](DBus::ValueOrError<void> msg) {
if(!msg)
{
- LOG() << "Direct reading command failed (" << msg.getError().message << ")";
+ LOG() << "Direct reading command failed (" << msg.getError().message << ")\n";
}
},
false);
mDirectReadingClient.method<DBus::ValueOrError<void>(bool)>("StopReading").asyncCall([](DBus::ValueOrError<void> msg) {
if(!msg)
{
- LOG() << "Direct reading command failed (" << msg.getError().message << ")";
+ LOG() << "Direct reading command failed (" << msg.getError().message << ")\n";
}
},
alsoNonDiscardable);
mDirectReadingClient.method<DBus::ValueOrError<std::string, bool, int32_t>(std::string, bool)>("ReadCommand").asyncCall([=](DBus::ValueOrError<std::string, bool, int32_t> msg) {
if(!msg)
{
- LOG() << "Direct reading command failed (" << msg.getError().message << ")";
+ LOG() << "Direct reading command failed (" << msg.getError().message << ")\n";
}
else if(callback)
{
AddFunctionToInterface(desc, "GetSelection", &BridgeText::GetRangeOfSelection);
AddFunctionToInterface(desc, "SetSelection", &BridgeText::SetRangeOfSelection);
AddFunctionToInterface(desc, "RemoveSelection", &BridgeText::RemoveSelection);
+ AddFunctionToInterface(desc, "GetRangeExtents", &BridgeText::GetRangeExtents);
mDbusServer.addInterface("/", desc, true);
}
{
return FindSelf()->SetRangeOfSelection(selectionIndex, startOffset, endOffset);
}
+
+DBus::ValueOrError<int32_t, int32_t, int32_t, int32_t> BridgeText::GetRangeExtents(int32_t startOffset, int32_t endOffset, uint32_t coordType)
+{
+ auto rect = FindSelf()->GetRangeExtents(startOffset, endOffset, static_cast<CoordinateType>(coordType));
+ return {static_cast<int32_t>(rect.x), static_cast<int32_t>(rect.y), static_cast<int32_t>(rect.width), static_cast<int32_t>(rect.height)};
+}
* @copydoc Dali::Accessibility::Text::SetRangeOfSelection()
*/
DBus::ValueOrError<bool> SetRangeOfSelection(int32_t selectionIndex, int32_t startOffset, int32_t endOffset);
+
+ /**
+ * @copydoc Dali::Accessibility::Text::GetRangeExtents()
+ */
+ DBus::ValueOrError<int32_t, int32_t, int32_t, int32_t> GetRangeExtents(int32_t startOffset, int32_t endOffset, uint32_t coordType);
};
#endif // DALI_INTERNAL_ACCESSIBILITY_BRIDGE_TEXT_H
std::unique_ptr<Property::Map> exifMap;
exifMap.reset(new Property::Map());
- for(auto k = 0u; k < EXIF_IFD_COUNT; ++k)
+ if(DALI_LIKELY(exifData))
{
- auto content = exifData->ifd[k];
- for(auto i = 0u; i < content->count; ++i)
+ for(auto k = 0u; k < EXIF_IFD_COUNT; ++k)
{
- auto&& tag = content->entries[i];
- const char* shortName = exif_tag_get_name_in_ifd(tag->tag, static_cast<ExifIfd>(k));
- if(shortName)
+ auto content = exifData->ifd[k];
+ for(auto i = 0u; i < content->count; ++i)
{
- AddExifFieldPropertyMap(*exifMap, *tag, static_cast<ExifIfd>(k));
+ auto&& tag = content->entries[i];
+ const char* shortName = exif_tag_get_name_in_ifd(tag->tag, static_cast<ExifIfd>(k));
+ if(shortName)
+ {
+ AddExifFieldPropertyMap(*exifMap, *tag, static_cast<ExifIfd>(k));
+ }
}
}
}