mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-13 19:44:28 +00:00
common renderer: code refactoring.
renamed internal methods from flush() to sync() since flush() is reserved for caching flush.
This commit is contained in:
parent
9718c6aa5b
commit
bb4c6b299f
4 changed files with 4 additions and 4 deletions
|
@ -65,7 +65,7 @@ bool GlRenderer::target(TVG_UNUSED uint32_t* buffer, uint32_t stride, uint32_t w
|
|||
}
|
||||
|
||||
|
||||
bool GlRenderer::flush()
|
||||
bool GlRenderer::sync()
|
||||
{
|
||||
GL_CHECK(glFinish());
|
||||
GlRenderTask::unload();
|
||||
|
|
|
@ -36,7 +36,7 @@ public:
|
|||
bool render(const Shape& shape, void *data) override;
|
||||
bool postRender() override;
|
||||
bool target(uint32_t* buffer, uint32_t stride, uint32_t w, uint32_t h);
|
||||
bool flush() override;
|
||||
bool sync() override;
|
||||
bool clear() override;
|
||||
|
||||
static GlRenderer* gen();
|
||||
|
|
|
@ -69,7 +69,7 @@ Result Canvas::update(Paint* paint) noexcept
|
|||
|
||||
Result Canvas::sync() noexcept
|
||||
{
|
||||
if (pImpl->renderer->flush()) return Result::Success;
|
||||
if (pImpl->renderer->sync()) return Result::Success;
|
||||
|
||||
return Result::InsufficientCondition;
|
||||
}
|
|
@ -71,7 +71,7 @@ public:
|
|||
virtual bool render(TVG_UNUSED const Shape& shape, TVG_UNUSED void *data) { return true; }
|
||||
virtual bool postRender() { return true; }
|
||||
virtual bool clear() { return true; }
|
||||
virtual bool flush() { return true; }
|
||||
virtual bool sync() { return true; }
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue