BuildRequires: pkgconfig
BuildRequires: pkgconfig(glesv2)
-BuildRequires: pkgconfig(dlog)
-
BuildRequires: meson
BuildRequires: ninja
Requires(post): /sbin/ldconfig
Result Canvas::clear(bool free) noexcept
{
-dlog_print(DLOG_ERROR, LOG_TAG, "Canvas(%p) Clear", this);
-
return pImpl->clear(free);
}
Result Canvas::draw() noexcept
{
-dlog_print(DLOG_ERROR, LOG_TAG, "Canvas(%p) Draw", this);
-
return pImpl->draw();
}
Result Canvas::update(Paint* paint) noexcept
{
-dlog_print(DLOG_ERROR, LOG_TAG, "Canvas(%p) Update", this);
-
return pImpl->update(paint, false);
}
Result Canvas::sync() noexcept
{
-dlog_print(DLOG_ERROR, LOG_TAG, "Canvas(%p) Sync", this);
-
if (pImpl->renderer->sync()) return Result::Success;
return Result::InsufficientCondition;
//Update single paint node
if (paint) {
- dlog_print(DLOG_ERROR, LOG_TAG, "Canvas(%p) update a paint(%p)", this, paint);
paint->pImpl->update(*renderer, nullptr, 255, clips, flag);
//Update all retained paint nodes
} else {
- dlog_print(DLOG_ERROR, LOG_TAG, "Canvas(%p) update paints count(%d)", this, paints.count);
for (auto paint = paints.data; paint < (paints.data + paints.count); ++paint) {
(*paint)->pImpl->update(*renderer, nullptr, 255, clips, flag);
}
refresh = false;
- dlog_print(DLOG_ERROR, LOG_TAG, "Canvas(%p) update finished", this);
-
return Result::Success;
}
{
if (!renderer || !renderer->preRender()) return Result::InsufficientCondition;
- dlog_print(DLOG_ERROR, LOG_TAG, "Canvas(%p) draw paints count(%d)", this, paints.count);
-
for (auto paint = paints.data; paint < (paints.data + paints.count); ++paint) {
if (!(*paint)->pImpl->render(*renderer)) return Result::InsufficientCondition;
}
if (!renderer->postRender()) return Result::InsufficientCondition;
- dlog_print(DLOG_ERROR, LOG_TAG, "Canvas(%p) draw finished", this);
-
return Result::Success;
}
};
#ifndef _TVG_COMMON_H_
#define _TVG_COMMON_H_
-#include <dlog.h>
#include "config.h"
#include "thorvg.h"
#define FILL_ID_LINEAR 0
#define FILL_ID_RADIAL 1
-#define LOG_TAG "thorvg"
-
#define TVG_UNUSED __attribute__ ((__unused__))
#endif //_TVG_COMMON_H_
{
auto nonSupport = true;
-dlog_print(DLOG_ERROR, LOG_TAG, "Inititlized!");
-
if (static_cast<uint32_t>(engine) & static_cast<uint32_t>(CanvasEngine::Sw)) {
#ifdef THORVG_SW_RASTER_SUPPORT
if (!SwRenderer::init(threads)) return Result::InsufficientCondition;
TaskScheduler::init(threads);
-dlog_print(DLOG_ERROR, LOG_TAG, "Inititlized! - Success");
-
return Result::Success;
}
Result Initializer::term(CanvasEngine engine) noexcept
{
- dlog_print(DLOG_ERROR, LOG_TAG, "Terminiated!");
-
if (_initCnt == 0) return Result::InsufficientCondition;
auto nonSupport = true;
if (!LoaderMgr::term()) return Result::Unknown;
-dlog_print(DLOG_ERROR, LOG_TAG, "Terminiated! - Success");
-
return Result::Success;
}
{
Compositor* cmp = nullptr;
-dlog_print(DLOG_ERROR, LOG_TAG, "render paint (%p) type(%d)", this, (int) this->type);
-
/* Note: only ClipPath is processed in update() step.
Create a composition image. */
if (cmpTarget && cmpMethod != CompositeMethod::ClipPath) {
}
}
-dlog_print(DLOG_ERROR, LOG_TAG, "update paint (%p) type(%d)", this, (int) this->type);
-
/* 1. Composition Pre Processing */
void *cmpData = nullptr;
RenderRegion viewport;
uint8_t Paint::opacity() const noexcept
{
return pImpl->opacity;
-}
+}
\ No newline at end of file
void* update(RenderMethod &renderer, const RenderTransform* transform, uint32_t opacity, Array<RenderData>& clips, RenderUpdateFlag flag)
{
-dlog_print(DLOG_ERROR, LOG_TAG, "====> Update Scene(%p), paints count(%d)", this, paints.count);
-
/* Overriding opacity value. If this scene is half-translucent,
It must do intermeidate composition with that opacity value. */
this->opacity = static_cast<uint8_t>(opacity);
if (needComposition(opacity)) opacity = 255;
-
for (auto paint = paints.data; paint < (paints.data + paints.count); ++paint) {
(*paint)->pImpl->update(renderer, transform, opacity, clips, static_cast<uint32_t>(flag));
}
/* FXIME: it requires to return list of children engine data
This is necessary for scene composition */
-
-dlog_print(DLOG_ERROR, LOG_TAG, "<==== Update Scene(%p), paints count(%d)", this, paints.count);
-
return nullptr;
}
bool render(RenderMethod& renderer)
{
-
-dlog_print(DLOG_ERROR, LOG_TAG, "====> Render Scene(%p), paints count(%d)", this, paints.count);
-
Compositor* cmp = nullptr;
if (needComposition(opacity)) {
if (cmp) renderer.endComposite(cmp);
-dlog_print(DLOG_ERROR, LOG_TAG, "<==== Render Scene(%p), paints count(%d)", this, paints.count);
-
return true;
}
void TaskScheduler::init(unsigned threads)
{
if (inst) return;
-
-dlog_print(DLOG_ERROR, LOG_TAG, "Init TaskScheduler threads = %d", threads);
-
inst = new TaskSchedulerImpl(threads);
}
{
if (inst) return inst->threadCnt;
return 0;
-}
+}
\ No newline at end of file
char* str = (char*)value;
char* end = str + strlen(str);
- dlog_print(DLOG_ERROR, LOG_TAG, "_parseTransformationMatrix() - begin");
-
while (str < end) {
auto state = MatrixState::Unknown;
_matrixCompose(matrix, &tmp, matrix);
}
}
-
-dlog_print(DLOG_ERROR, LOG_TAG, "_parseTransformationMatrix() - end");
-
return matrix;
error:
if (matrix) free(matrix);
-
-dlog_print(DLOG_ERROR, LOG_TAG, "_parseTransformationMatrix() - error");
-
return nullptr;
}
this->size = filePath.size();
}
- dlog_print(DLOG_ERROR, LOG_TAG, "SvgLoader open(%p) - %s", this, path.c_str());
-
return header();
}
{
if (!content || size == 0) return false;
- dlog_print(DLOG_ERROR, LOG_TAG, "SvgLoader read(%p) - before", this);
-
TaskScheduler::request(this);
- dlog_print(DLOG_ERROR, LOG_TAG, "SvgLoader read(%p) - after", this);
-
return true;
}
{
if (!node || (node->type != SvgNodeType::Doc)) return nullptr;
- dlog_print(DLOG_ERROR, LOG_TAG, "svgSceneBuild() node(%p) - begin", node);
-
unique_ptr<Scene> root;
auto docNode = _sceneBuildHelper(node, vx, vy, vw, vh);
float x, y, w, h;
} else {
root = move(docNode);
}
-
-dlog_print(DLOG_ERROR, LOG_TAG, "svgSceneBuild() - end");
-
return root;
}
subdir('bindings')
thread_dep = meson.get_compiler('cpp').find_library('pthread')
-dlog_dep = dependency('dlog', required: false)
-thorvg_lib_dep = [common_dep, loader_dep, binding_dep, thread_dep, dlog_dep]
+thorvg_lib_dep = [common_dep, loader_dep, binding_dep, thread_dep]
thorvg_lib = library(
'thorvg',