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

Commit 86feb911 authored by Omprakash Dhyade's avatar Omprakash Dhyade Committed by Linux Build Service Account
Browse files

frameworks/base: build drawing Cache only if not drawing with render node

If layer is software rendered, its cache
will be built twice, if invalidated during draw.
Check for drawing with rendernode.

Change-Id: Ic95ea1d7ce7087528789dc11c1ca766a3f4d5ead
parent f2873f6c
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -15938,8 +15938,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
        RenderNode renderNode = null;
        Bitmap cache = null;
        int layerType = getLayerType(); // TODO: signify cache state with just 'cache' local
        if (layerType == LAYER_TYPE_SOFTWARE
                || (!drawingWithRenderNode && layerType != LAYER_TYPE_NONE)) {
        if (!drawingWithRenderNode && layerType != LAYER_TYPE_NONE) {
            // If not drawing with RenderNode, treat HW layers as SW
            layerType = LAYER_TYPE_SOFTWARE;
            buildDrawingCache(true);