From 1de466fc91511de8428affcf1eb71dc6af946145 Mon Sep 17 00:00:00 2001 From: Romain Guy Date: Thu, 12 Sep 2013 16:09:19 -0700 Subject: [PATCH] Always disable the clip for layers Bug #8149344 Change-Id: Ifd413cadb171232eb846b3d91b05b2d2457b9f35 --- libs/hwui/DisplayList.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libs/hwui/DisplayList.cpp b/libs/hwui/DisplayList.cpp index 0d7b37d00df2..bb6526e5b108 100644 --- a/libs/hwui/DisplayList.cpp +++ b/libs/hwui/DisplayList.cpp @@ -369,11 +369,10 @@ void DisplayList::outputViewProperties(const int level) { } } - bool clipToBoundsNeeded = mClipToBounds; + bool clipToBoundsNeeded = mCaching ? false : mClipToBounds; if (mAlpha < 1) { if (mCaching) { ALOGD("%*sSetOverrideLayerAlpha %.2f", level * 2, "", mAlpha); - clipToBoundsNeeded = false; // clipping done by layer } else if (!mHasOverlappingRendering) { ALOGD("%*sScaleAlpha %.2f", level * 2, "", mAlpha); } else { @@ -422,11 +421,10 @@ void DisplayList::setViewProperties(OpenGLRenderer& renderer, T& handler, renderer.concatMatrix(mTransformMatrix); } } - bool clipToBoundsNeeded = mClipToBounds; + bool clipToBoundsNeeded = mCaching ? false : mClipToBounds; if (mAlpha < 1) { if (mCaching) { renderer.setOverrideLayerAlpha(mAlpha); - clipToBoundsNeeded = false; // clipping done by layer } else if (!mHasOverlappingRendering) { renderer.scaleAlpha(mAlpha); } else { -- 2.11.0