mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 13:43:43 +00:00
gl_engine/renderer: skip sync if nothing should be done.
update by 66305f3e6d
This commit is contained in:
parent
66305f3e6d
commit
6e6dd8a97e
1 changed files with 3 additions and 2 deletions
|
@ -82,6 +82,9 @@ bool GlRenderer::target(TVG_UNUSED uint32_t* buffer, uint32_t stride, uint32_t w
|
|||
|
||||
bool GlRenderer::sync()
|
||||
{
|
||||
//nothing to be done.
|
||||
if (mRenderPassStack.size() == 0) return true;
|
||||
|
||||
mGpuBuffer->flushToGPU();
|
||||
|
||||
// Blend function for straight alpha
|
||||
|
@ -91,8 +94,6 @@ bool GlRenderer::sync()
|
|||
|
||||
mGpuBuffer->bind();
|
||||
|
||||
assert(mRenderPassStack.size() == 1);
|
||||
|
||||
auto task = mRenderPassStack.front().endRenderPass<GlBlitTask>(nullptr, mTargetFboId);
|
||||
|
||||
task->setSize(surface.w, surface.h);
|
||||
|
|
Loading…
Add table
Reference in a new issue