Methods Summary |
---|
public void | applyPendingDisplayDeviceInfoChangesLocked()Applies any pending changes to the observable state of the display device
if the display adapter sent a {@link DisplayAdapter#DISPLAY_DEVICE_EVENT_CHANGED} event.
|
public void | dumpLocked(java.io.PrintWriter pw)Dumps the local state of the display device.
Does not need to dump the display device info because that is already dumped elsewhere.
pw.println("mAdapter=" + mDisplayAdapter.getName());
pw.println("mUniqueId=" + mUniqueId);
pw.println("mDisplayToken=" + mDisplayToken);
pw.println("mCurrentLayerStack=" + mCurrentLayerStack);
pw.println("mCurrentOrientation=" + mCurrentOrientation);
pw.println("mCurrentLayerStackRect=" + mCurrentLayerStackRect);
pw.println("mCurrentDisplayRect=" + mCurrentDisplayRect);
pw.println("mCurrentSurface=" + mCurrentSurface);
|
public final DisplayAdapter | getAdapterLocked()Gets the display adapter that owns the display device.
return mDisplayAdapter;
|
public abstract DisplayDeviceInfo | getDisplayDeviceInfoLocked()Gets information about the display device.
The information returned should not change between calls unless the display
adapter sent a {@link DisplayAdapter#DISPLAY_DEVICE_EVENT_CHANGED} event and
{@link #applyPendingDisplayDeviceInfoChangesLocked()} has been called to apply
the pending changes.
|
public final android.os.IBinder | getDisplayTokenLocked()Gets the Surface Flinger display token for this display.
return mDisplayToken;
|
public final java.lang.String | getNameLocked()Gets the name of the display device.
return getDisplayDeviceInfoLocked().name;
|
public final java.lang.String | getUniqueId()Returns the unique id of the display device.
return mUniqueId;
|
public void | performTraversalInTransactionLocked()Gives the display device a chance to update its properties while in a transaction.
|
public final void | populateViewportLocked(android.hardware.display.DisplayViewport viewport)Populates the specified viewport object with orientation,
physical and logical rects based on the display's current projection.
viewport.orientation = mCurrentOrientation;
if (mCurrentLayerStackRect != null) {
viewport.logicalFrame.set(mCurrentLayerStackRect);
} else {
viewport.logicalFrame.setEmpty();
}
if (mCurrentDisplayRect != null) {
viewport.physicalFrame.set(mCurrentDisplayRect);
} else {
viewport.physicalFrame.setEmpty();
}
boolean isRotated = (mCurrentOrientation == Surface.ROTATION_90
|| mCurrentOrientation == Surface.ROTATION_270);
DisplayDeviceInfo info = getDisplayDeviceInfoLocked();
viewport.deviceWidth = isRotated ? info.height : info.width;
viewport.deviceHeight = isRotated ? info.width : info.height;
|
public java.lang.Runnable | requestDisplayStateLocked(int state)Sets the display state, if supported.
return null;
|
public void | requestRefreshRateLocked(float refreshRate)Sets the refresh rate, if supported.
|
public final void | setLayerStackInTransactionLocked(int layerStack)Sets the display layer stack while in a transaction.
if (mCurrentLayerStack != layerStack) {
mCurrentLayerStack = layerStack;
SurfaceControl.setDisplayLayerStack(mDisplayToken, layerStack);
}
|
public final void | setProjectionInTransactionLocked(int orientation, android.graphics.Rect layerStackRect, android.graphics.Rect displayRect)Sets the display projection while in a transaction.
if (mCurrentOrientation != orientation
|| mCurrentLayerStackRect == null
|| !mCurrentLayerStackRect.equals(layerStackRect)
|| mCurrentDisplayRect == null
|| !mCurrentDisplayRect.equals(displayRect)) {
mCurrentOrientation = orientation;
if (mCurrentLayerStackRect == null) {
mCurrentLayerStackRect = new Rect();
}
mCurrentLayerStackRect.set(layerStackRect);
if (mCurrentDisplayRect == null) {
mCurrentDisplayRect = new Rect();
}
mCurrentDisplayRect.set(displayRect);
SurfaceControl.setDisplayProjection(mDisplayToken,
orientation, layerStackRect, displayRect);
}
|
public final void | setSurfaceInTransactionLocked(android.view.Surface surface)Sets the display surface while in a transaction.
if (mCurrentSurface != surface) {
mCurrentSurface = surface;
SurfaceControl.setDisplaySurface(mDisplayToken, surface);
}
|