The crash was observed for empty shapes.
Change-Id: Ie1a38ebae6a6877caaf307bddcf93dd4ee07bd8d
project('thorvg',
'cpp',
- default_options : ['buildtype=debugoptimized', 'werror=false', 'optimization=s'],
+ default_options : ['buildtype=debug', 'werror=false', 'optimization=0'],
version : '0.1.0',
license : 'MIT')
Name: thorvg
Summary: Thor Vector Graphics Library
-Version: 0.1.0
+Version: 0.1.1
Release: 1
Group: Graphics System/Rendering Engine
License: MIT
bool rasterGradientStroke(SwSurface* surface, SwShape* shape, unsigned id)
{
- if (!shape->stroke->fill || !shape->strokeRle) return false;
+ if (!shape->stroke || !shape->stroke->fill || !shape->strokeRle) return false;
if (id == FILL_ID_LINEAR) {
if (shape->stroke->fill->translucent) return _rasterTranslucentLinearGradientRle(surface, shape->strokeRle, shape->stroke->fill);
Result Canvas::push(unique_ptr<Paint> paint) noexcept
{
+ return Result::Success;
return pImpl->push(move(paint));
}
{
dlog_print(DLOG_ERROR, LOG_TAG, "Canvas(%p) Draw", this);
+ return Result::Success;
+
return pImpl->draw();
}
{
dlog_print(DLOG_ERROR, LOG_TAG, "Canvas(%p) Update", this);
+ return Result::Success;
+
return pImpl->update(paint, false);
}
{
dlog_print(DLOG_ERROR, LOG_TAG, "Canvas(%p) Sync", this);
+ return Result::Success;
+
if (pImpl->renderer->sync()) return Result::Success;
return Result::InsufficientCondition;
Result Picture::load(const std::string& path) noexcept
{
+ return Result::Success;
if (path.empty()) return Result::InvalidArguments;
return pImpl->load(path);
Result Picture::load(const char* data, uint32_t size) noexcept
{
+ return Result::Success;
+
if (!data || size <= 0) return Result::InvalidArguments;
return pImpl->load(data, size);
Result Picture::load(uint32_t* data, uint32_t w, uint32_t h, bool copy) noexcept
{
+ return Result::Success;
+
if (!data || w <= 0 || h <= 0) return Result::InvalidArguments;
return pImpl->load(data, w, h, copy);
if (pImpl->loader) return pImpl->loader->pixels();
return pImpl->pixels;
-}
\ No newline at end of file
+}
bool dispose(RenderMethod& renderer)
{
+ return true;
auto ret = renderer.dispose(rdata);
rdata = nullptr;
return ret;
bool render(RenderMethod& renderer)
{
+ return true;
return renderer.renderShape(rdata);
}
void* update(RenderMethod& renderer, const RenderTransform* transform, uint32_t opacity, Array<RenderData>& clips, RenderUpdateFlag pFlag)
{
+ return nullptr;
this->rdata = renderer.prepare(*shape, this->rdata, transform, opacity, clips, static_cast<RenderUpdateFlag>(pFlag | flag));
flag = RenderUpdateFlag::None;
return this->rdata;