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

Commit 7ff37ada authored by Chris Craik's avatar Chris Craik Committed by Android Git Automerger
Browse files

am ff2c22e2: Merge "Move functor GL setup to just before functor" into klp-dev

* commit 'ff2c22e2':
  Move functor GL setup to just before functor
parents b1986354 ff2c22e2
Loading
Loading
Loading
Loading
+9 −6
Original line number Diff line number Diff line
@@ -449,14 +449,8 @@ status_t OpenGLRenderer::invokeFunctors(Rect& dirty) {
status_t OpenGLRenderer::callDrawGLFunction(Functor* functor, Rect& dirty) {
    if (mSnapshot->isIgnored()) return DrawGlInfo::kStatusDone;

    interrupt();
    detachFunctor(functor);

    mCaches.enableScissor();
    if (mDirtyClip) {
        setScissorFromClip();
        setStencilFromClip();
    }

    Rect clip(*mSnapshot->clipRect);
    clip.snapToPixelBoundaries();
@@ -477,6 +471,15 @@ status_t OpenGLRenderer::callDrawGLFunction(Functor* functor, Rect& dirty) {
    info.height = getSnapshot()->height;
    getSnapshot()->transform->copyTo(&info.transform[0]);

    // setup GL state for functor
    if (mDirtyClip) {
        setScissorFromClip();
        setStencilFromClip(); // can issue draws, so must precede enableScissor()/interrupt()
    }
    mCaches.enableScissor();
    interrupt();

    // call functor immediately after GL state setup
    status_t result = (*functor)(DrawGlInfo::kModeDraw, &info);

    if (result != DrawGlInfo::kStatusDone) {