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

Commit beff8d83 authored by Romain Guy's avatar Romain Guy
Browse files

Fix incorrect dirty rectangle transformation in hardware layers.

Bug #3413433

Change-Id: Iba201c7c4b4f11937797f3afcbf20c5a7395be25
parent 3a3133d8
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -3537,6 +3537,12 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
                // Make sure we do not set both flags at the same time
                int opaqueFlag = isOpaque ? DIRTY_OPAQUE : DIRTY;

                if (child.mLayerType != LAYER_TYPE_NONE) {
                    mPrivateFlags |= INVALIDATED;
                    mPrivateFlags &= ~DRAWING_CACHE_VALID;
                    child.mLocalDirtyRect.union(dirty);
                }

                final int[] location = attachInfo.mInvalidateChildLocation;
                location[CHILD_LEFT_INDEX] = child.mLeft;
                location[CHILD_TOP_INDEX] = child.mTop;
@@ -3550,12 +3556,6 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
                            (int) (boundingRect.bottom + 0.5f));
                }

                if (child.mLayerType != LAYER_TYPE_NONE) {
                    mPrivateFlags |= INVALIDATED;
                    mPrivateFlags &= ~DRAWING_CACHE_VALID;
                    child.mLocalDirtyRect.union(dirty);
                }

                do {
                    View view = null;
                    if (parent instanceof View) {
+1 −0
Original line number Diff line number Diff line
@@ -39,6 +39,7 @@ void LayerRenderer::prepareDirty(float left, float top, float right, float botto
        mLayer->region.clear();
        dirty.set(0.0f, 0.0f, mLayer->width, mLayer->height);
    } else {
        dirty.intersect(0.0f, 0.0f, mLayer->width, mLayer->height);
        android::Rect r(dirty.left, dirty.top, dirty.right, dirty.bottom);
        mLayer->region.subtractSelf(r);
    }