Home | History | Annotate | Download | only in display

Lines Matching refs:Display

17 package com.android.server.display;
24 import android.hardware.display.DisplayManagerGlobal;
25 import android.hardware.display.IDisplayManager;
26 import android.hardware.display.IDisplayManagerCallback;
27 import android.hardware.display.WifiDisplayStatus;
38 import android.view.Display;
50 * decides how to configure logical displays based on the physical display devices currently
54 * The display manager service relies on a collection of {@link DisplayAdapter} components,
55 * for discovering and configuring physical display devices attached to the system.
56 * There are separate display adapters for each manner that devices are attached:
57 * one display adapter for built-in local displays, one for simulated non-functional
61 * Display adapters are only weakly coupled to the display manager service.
62 * Display adapters communicate changes in display device state to the display manager
64 * by the display manager service. This separation of concerns is important for
66 * two classes: display adapters handle individual display devices whereas
67 * the display manager service handles the global state. Second, it eliminates
68 * the potential for deadlocks resulting from asynchronous display device discovery.
73 * Because the display manager may be accessed by multiple threads, the synchronization
75 * the display manager while holding a surface transaction with the expectation that
79 * To make this work, all of the objects that belong to the display manager must
84 * Where things get tricky is that the display manager is not allowed to make
119 // The synchronization root for the display manager.
120 // This lock guards most of the display manager's state.
127 // This option may disable certain display adapters.
131 // services should be started. This option may disable certain display adapters.
134 // True if the display manager service should pretend there is only one display
135 // and only tell applications about the existence of the default logical display.
136 // The display manager can still mirror content to secondary displays but applications
145 // List of all currently registered display adapters.
148 // List of all currently connected display devices.
151 // List of all removed display devices.
154 // List of all logical displays indexed by logical display id.
157 private int mNextNonDefaultDisplayId = Display.DEFAULT_DISPLAY + 1;
159 // List of all display transaction listeners.
166 // Set to true when there are pending display changes that have yet to be applied
170 // The Wifi display adapter, or null if not registered.
173 // Viewports of the default display and the display that should receive touch
178 // Persistent data store for all internal settings maintained by the display manager service.
181 // Temporary callback list, used when sending display events to applications.
185 // Temporary display info, used for comparing display configurations.
206 * Pauses the boot process to wait for the first display to be initialized.
211 while (mLogicalDisplays.get(Display.DEFAULT_DISPLAY) == null) {
229 * Called during initialization to associate the display manager with the
240 * Called during initialization to associate the display manager with the
272 * Registers a display transaction listener to provide the client a chance to
273 * update its surfaces within the same transaction as any display layout updates.
287 * Unregisters a display transaction listener to provide the client a chance to
288 * update its surfaces within the same transaction as any display layout updates.
302 * Overrides the display information of a particular logical display.
304 * of the default display. It is expected to apply the requested change
305 * to the display information synchronously so that applications will immediately
308 * @param displayId The logical display id.
314 LogicalDisplay display = mLogicalDisplays.get(displayId);
315 if (display != null) {
316 mTempDisplayInfo.copyFrom(display.getDisplayInfoLocked());
317 display.setDisplayInfoOverrideFromWindowManagerLocked(info);
318 if (!mTempDisplayInfo.equals(display.getDisplayInfoLocked())) {
327 * Sets the overscan insets for a particular display.
331 LogicalDisplay display = mLogicalDisplays.get(displayId);
332 if (display != null) {
333 display.setOverscan(left, top, right, bottom);
397 * Returns information about the specified logical display.
399 * @param displayId The logical display id.
400 * @return The logical display info, or null if the display does not exist. The
406 LogicalDisplay display = mLogicalDisplays.get(displayId);
407 if (display != null) {
408 return display.getDisplayInfoLocked();
415 * Returns the list of all display ids.
515 + "rename a wifi display.");
537 + "forget a wifi display.");
573 // Register default display adapter.
611 // In safe mode, we disable non-essential display adapters to give the user
614 // In only-core mode, we disable non-essential display adapters to minimize
628 Slog.w(TAG, "Attempted to add already added display device: "
633 Slog.i(TAG, "Display device added: " + device.getDisplayDeviceInfoLocked());
639 // Blank or unblank the display immediately to match the state requested
655 Slog.w(TAG, "Attempted to change non-existent display device: "
660 Slog.i(TAG, "Display device changed: " + device.getDisplayDeviceInfoLocked());
672 Slog.w(TAG, "Attempted to remove non-existent display device: "
677 Slog.i(TAG, "Display device removed: " + device.getDisplayDeviceInfoLocked());
685 // Adds a new logical display based on the given display device.
691 if (isDefault && mLogicalDisplays.get(Display.DEFAULT_DISPLAY) != null) {
692 Slog.w(TAG, "Ignoring attempt to add a second default display: " + deviceInfo);
697 Slog.i(TAG, "Not creating a logical display for a secondary display "
698 + " because single display demo mode is enabled: " + deviceInfo);
705 LogicalDisplay display = new LogicalDisplay(displayId, layerStack, device);
706 display.updateLocked(mDisplayDevices);
707 if (!display.isValidLocked()) {
709 Slog.w(TAG, "Ignoring display device because the logical display "
714 mLogicalDisplays.put(displayId, display);
725 return isDefault ? Display.DEFAULT_DISPLAY : mNextNonDefaultDisplayId++;
729 // Currently layer stacks and display ids are the same.
734 // Updates all existing logical displays given the current set of display devices.
741 LogicalDisplay display = mLogicalDisplays.valueAt(i);
743 mTempDisplayInfo.copyFrom(display.getDisplayInfoLocked());
744 display.updateLocked(mDisplayDevices);
745 if (!display.isValidLocked()) {
749 } else if (!mTempDisplayInfo.equals(display.getDisplayInfoLocked())) {
758 // Perform one last traversal for each removed display device.
770 // Configure each display device.
785 * Tells the display manager whether there is interesting unique content on the
786 * specified logical display. This is used to control automatic mirroring.
788 * If the display has unique content, then the display manager arranges for it
789 * to be presented on a physical display if appropriate. Otherwise, the display manager
790 * may choose to make the physical display mirror some other logical display.
793 * @param displayId The logical display id to update.
794 * @param hasContent True if the logical display has content.
800 LogicalDisplay display = mLogicalDisplays.get(displayId);
801 if (display != null && display.hasContentLocked() != hasContent) {
802 display.setHasContentLocked(hasContent);
814 // Find the logical display that the display device is showing.
815 LogicalDisplay display = findLogicalDisplayForDeviceLocked(device);
816 if (display != null && !display.hasContentLocked()) {
817 display = null;
819 if (display == null) {
820 display = mLogicalDisplays.get(Display.DEFAULT_DISPLAY);
823 // Apply the logical display configuration to the display device.
824 if (display == null) {
825 // TODO: no logical display for the device, blank it
826 Slog.w(TAG, "Missing logical displaydisplay device: "
831 display.configureDisplayInTransactionLocked(device, isBlanked);
837 setViewportLocked(mDefaultViewport, display, device);
841 setViewportLocked(mExternalTouchViewport, display, device);
846 LogicalDisplay display, DisplayDevice device) {
848 viewport.displayId = display.getDisplayIdLocked();
855 LogicalDisplay display = mLogicalDisplays.valueAt(i);
856 if (display.getPrimaryDisplayDeviceLocked() == device) {
857 return display;
880 // Delivers display event notifications to callbacks.
883 Slog.d(TAG, "Delivering display event: displayId="
914 pw.println("DISPLAY MANAGER (dumpsys display)");
932 pw.println("Display Adapters: size=" + mDisplayAdapters.size());
939 pw.println("Display Devices: size=" + mDisplayDevices.size());
950 LogicalDisplay display = mLogicalDisplays.valueAt(i);
951 pw.println(" Display " + displayId + ":");
952 display.dumpLocked(ipw);
958 * This is the object that everything in the display manager locks on.
960 * clear that the object belongs to the display manager service and that it is
1065 Slog.d(TAG, "Display listener for pid " + mPid + " died.");