OSDN Git Service

Always disable the clip for layers
authorRomain Guy <romainguy@google.com>
Thu, 12 Sep 2013 23:09:19 +0000 (16:09 -0700)
committerRomain Guy <romainguy@google.com>
Thu, 12 Sep 2013 23:13:38 +0000 (23:13 +0000)
Bug #8149344

Change-Id: Ifd413cadb171232eb846b3d91b05b2d2457b9f35

libs/hwui/DisplayList.cpp

index 0d7b37d..bb6526e 100644 (file)
@@ -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 {