Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c521b108 authored by John Reck's avatar John Reck Committed by Gerrit Code Review
Browse files

Merge "Fix a GL error leak issue"

parents a121d34c f087c828
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@
#include "LayerRenderer.h"
#include "ShadowTessellator.h"
#include "RenderState.h"
#include "utils/GLUtils.h"

namespace android {

@@ -368,6 +369,12 @@ void Caches::flush(FlushMode mode) {

    clearGarbage();
    glFinish();

    // glFinish() need dequeue buffer, and it is not 100% success
    // It generates gl error sometimes, this error will be there
    // until glGetError called. Call GLUtils::dumpGLErrors to clean
    // the error in case it leaks to other functions
    GLUtils::dumpGLErrors();
}

///////////////////////////////////////////////////////////////////////////////