don't handle the transparent region of a layer in draw()
this is already taken into consideration in computeVisibleRegion and therefore not needed at draw time. Change-Id: I3fc7336d22f1147dfcd3a20fd71bf79b946d971f
This commit is contained in:
parent
f6679fc6f7
commit
bc7e31a84b
@ -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
|
||||
glEnable(GL_SCISSOR_TEST);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user