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

Commit b6b52483 authored by Chet Haase's avatar Chet Haase Committed by Android Git Automerger
Browse files

am be29d82f: Merge "Correctly adjust clip regions that lie offscreen" into jb-mr1-dev

* commit 'be29d82f':
  Correctly adjust clip regions that lie offscreen
parents 595703cd be29d82f
Loading
Loading
Loading
Loading
+14 −3
Original line number Diff line number Diff line
@@ -399,9 +399,20 @@ bool Caches::setScissor(GLint x, GLint y, GLint width, GLint height) {
    if (scissorEnabled && (x != mScissorX || y != mScissorY ||
            width != mScissorWidth || height != mScissorHeight)) {

        if (x < 0) x = 0;
        if (y < 0) y = 0;

        if (x < 0) {
            width += x;
            x = 0;
        }
        if (y < 0) {
            height += y;
            y = 0;
        }
        if (width < 0) {
            width = 0;
        }
        if (height < 0) {
            height = 0;
        }
        glScissor(x, y, width, height);

        mScissorX = x;