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

Commit eb633f07 authored by Steve Kondik's avatar Steve Kondik Committed by Gerrit Code Review
Browse files

Merge "surfaceflinger: Fix top-bottom UI composition with S3D." into ics

parents 4746698e 94b351b4
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -546,6 +546,7 @@ void LayerBase::drawS3DUIWithOpenGL(const Region& clip) const
    int composeS3DFormat = mQCLayer->needsS3DCompose();
    int xoffset = fbWidth/2 ;
    int yoffset = fbHeight/2;
    glClearColor(0,0,0,0);
    // Calculate the new vertices for S3D conversion
    switch (composeS3DFormat) {
        case QCBaseLayer::eS3D_SIDE_BY_SIDE:
@@ -561,6 +562,7 @@ void LayerBase::drawS3DUIWithOpenGL(const Region& clip) const
                const Rect& r = *it++;
                const GLint sy = fbHeight - (r.top + r.height());
                glScissor(r.left/2, sy, r.width()/2, r.height());
                glClear(GL_COLOR_BUFFER_BIT);
                glDrawArrays(GL_TRIANGLE_FAN, 0, 4);//glDrawElements(GL_TRIANGLE_STRIP, 4, GL_UNSIGNED_BYTE, pindices);
            }

@@ -571,6 +573,7 @@ void LayerBase::drawS3DUIWithOpenGL(const Region& clip) const
                const Rect& r = *it++;
                const GLint sy = fbHeight - (r.top + r.height());
                glScissor(xoffset+r.left/2, sy, r.width()/2, r.height());
                glClear(GL_COLOR_BUFFER_BIT);
                glDrawArrays(GL_TRIANGLE_FAN, 0, 4);//glDrawElements(GL_TRIANGLE_STRIP, 4, GL_UNSIGNED_BYTE, pindices);
            }
            break;
@@ -586,7 +589,8 @@ void LayerBase::drawS3DUIWithOpenGL(const Region& clip) const
            while (it != end) {
                const Rect& r = *it++;
                const GLint sy = fbHeight - (r.top + r.height());
                glScissor(r.left, yoffset + sy/2, r.width(), r.height()/2);
                glScissor(r.left, sy/2, r.width(), r.height()/2);
                glClear(GL_COLOR_BUFFER_BIT);
                glDrawArrays(GL_TRIANGLE_FAN, 0, 4);//glDrawElements(GL_TRIANGLE_STRIP, 4, GL_UNSIGNED_BYTE, pindices);
            }

@@ -596,7 +600,8 @@ void LayerBase::drawS3DUIWithOpenGL(const Region& clip) const
            while (it != end) {
                const Rect& r = *it++;
                const GLint sy = fbHeight - (r.top + r.height());
                glScissor(r.left, sy/2, r.width(), r.height()/2);
                glScissor(r.left, yoffset+sy/2, r.width(), r.height()/2);
                glClear(GL_COLOR_BUFFER_BIT);
                glDrawArrays(GL_TRIANGLE_FAN, 0, 4);//glDrawElements(GL_TRIANGLE_STRIP, 4, GL_UNSIGNED_BYTE, pindices);
            }
            break;