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

Commit 8b113cf6 authored by Romain Guy's avatar Romain Guy Committed by Android Git Automerger
Browse files

am cb2c84fd: am 3b66e43e: Merge "Refresh display lists when turning off layers...

am cb2c84fd: am 3b66e43e: Merge "Refresh display lists when turning off layers rendering. Bug #3420565" into honeycomb

* commit 'cb2c84fd':
  Refresh display lists when turning off layers rendering. Bug #3420565
parents 795ff699 cb2c84fd
Loading
Loading
Loading
Loading
+18 −2
Original line number Diff line number Diff line
@@ -2575,8 +2575,24 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
     * @hide
     */
    public void setChildrenLayersEnabled(boolean enabled) {
        if (enabled != mDrawLayers) {
            mDrawLayers = enabled;
            invalidate(true);

            // We need to invalidate any child with a layer. For instance,
            // if a child is backed by a hardware layer and we disable layers
            // the child is marked as not dirty (flags cleared the last time
            // the child was drawn inside its layer.) However, that child might
            // never have created its own display list or have an obsolete
            // display list. By invalidating the child we ensure the display
            // list is in sync with the content of the hardware layer.
            for (int i = 0; i < mChildrenCount; i++) {
                View child = mChildren[i];
                if (child.mLayerType != LAYER_TYPE_NONE) {
                    child.invalidate(true);
                }
            }
        }
    }

    /**