common renderer: code refactoring.

renamed internal methods from flush() to sync()
since flush() is reserved for caching flush.
This commit is contained in:
Hermet Park 2020-11-06 15:19:52 +09:00 committed by Hermet Park
parent 9718c6aa5b
commit bb4c6b299f
4 changed files with 4 additions and 4 deletions

View file

@ -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();

View file

@ -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();

View file

@ -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;
}

View file

@ -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; }
};
}