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

Commit f44baa2e authored by Mathias Agopian's avatar Mathias Agopian Committed by Android Git Automerger
Browse files

am 308e6989: am 24d7050c: Merge "don\'t handle the transparent region of a...

am 308e6989: am 24d7050c: Merge "don\'t handle the transparent region of a layer in draw()" into gingerbread

Merge commit '308e69896c2812953d74ea63fe964bebaa68eef4'

* commit '308e69896c2812953d74ea63fe964bebaa68eef4':
  don't handle the transparent region of a layer in draw()
parents fdc84883 127fbb79
Loading
Loading
Loading
Loading
+1 −15
Original line number Original line Diff line number Diff line
@@ -307,22 +307,8 @@ void LayerBase::drawRegion(const Region& reg) const
    }
    }
}
}


void LayerBase::draw(const Region& inClip) const
void LayerBase::draw(const Region& clip) const
{
{
    // invalidate the region we'll update
    Region clip(inClip);  // copy-on-write, so no-op most of the time

    // Remove the transparent area from the clipping region
    const State& s = drawingState();
    if (LIKELY(!s.transparentRegion.isEmpty())) {
        clip.subtract(transparentRegionScreen);
        if (clip.isEmpty()) {
            // usually this won't happen because this should be taken care of
            // by SurfaceFlinger::computeVisibleRegions()
            return;
        }        
    }

    // reset GL state
    // reset GL state
    glEnable(GL_SCISSOR_TEST);
    glEnable(GL_SCISSOR_TEST);