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

Commit 81a111d8 authored by Santos Cordon's avatar Santos Cordon Committed by Android (Google) Code Review
Browse files

Merge "Log each time the layer stack changes for DisplayDevice." into tm-qpr-dev

parents 629a3fdf 5d908ab4
Loading
Loading
Loading
Loading
+6 −1
Original line number Original line Diff line number Diff line
@@ -22,6 +22,7 @@ import android.graphics.Point;
import android.graphics.Rect;
import android.graphics.Rect;
import android.hardware.display.DisplayViewport;
import android.hardware.display.DisplayViewport;
import android.os.IBinder;
import android.os.IBinder;
import android.util.Slog;
import android.view.Display;
import android.view.Display;
import android.view.DisplayAddress;
import android.view.DisplayAddress;
import android.view.Surface;
import android.view.Surface;
@@ -37,6 +38,7 @@ import java.io.PrintWriter;
 * </p>
 * </p>
 */
 */
abstract class DisplayDevice {
abstract class DisplayDevice {
    private static final String TAG = "DisplayDevice";
    private static final Display.Mode EMPTY_DISPLAY_MODE = new Display.Mode.Builder().build();
    private static final Display.Mode EMPTY_DISPLAY_MODE = new Display.Mode.Builder().build();


    private final DisplayAdapter mDisplayAdapter;
    private final DisplayAdapter mDisplayAdapter;
@@ -266,10 +268,13 @@ abstract class DisplayDevice {
    /**
    /**
     * Sets the display layer stack while in a transaction.
     * Sets the display layer stack while in a transaction.
     */
     */
    public final void setLayerStackLocked(SurfaceControl.Transaction t, int layerStack) {
    public final void setLayerStackLocked(SurfaceControl.Transaction t, int layerStack,
            int layerStackTag) {
        if (mCurrentLayerStack != layerStack) {
        if (mCurrentLayerStack != layerStack) {
            mCurrentLayerStack = layerStack;
            mCurrentLayerStack = layerStack;
            t.setDisplayLayerStack(mDisplayToken, layerStack);
            t.setDisplayLayerStack(mDisplayToken, layerStack);
            Slog.i(TAG, "[" + layerStackTag + "] Layerstack set to " + layerStack + " for "
                    + mUniqueId);
        }
        }
    }
    }


+1 −1
Original line number Original line Diff line number Diff line
@@ -494,7 +494,7 @@ final class LogicalDisplay {
            DisplayDevice device,
            DisplayDevice device,
            boolean isBlanked) {
            boolean isBlanked) {
        // Set the layer stack.
        // Set the layer stack.
        device.setLayerStackLocked(t, isBlanked ? BLANK_LAYER_STACK : mLayerStack);
        device.setLayerStackLocked(t, isBlanked ? BLANK_LAYER_STACK : mLayerStack, mDisplayId);
        // Also inform whether the device is the same one sent to inputflinger for its layerstack.
        // Also inform whether the device is the same one sent to inputflinger for its layerstack.
        // Prevent displays that are disabled from receiving input.
        // Prevent displays that are disabled from receiving input.
        // TODO(b/188914255): Remove once input can dispatch against device vs layerstack.
        // TODO(b/188914255): Remove once input can dispatch against device vs layerstack.