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

Commit a96a6df1 authored by John Reck's avatar John Reck
Browse files

Add more docs per API council feedback

Test: make
Fixes: 218314633
Change-Id: I49fa3defa7907f48e650618295f7db758e247a2a
parent b42de795
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -131,7 +131,8 @@ public final class HardwareBuffer implements Parcelable, AutoCloseable {
    /** Usage: The buffer will be written to by the GPU */
    public static final long USAGE_GPU_COLOR_OUTPUT       = 1 << 9;
    /**
     * The buffer will be used as a composer HAL overlay layer.
     * The buffer will be used as a hardware composer overlay layer. That is, it will be displayed
     * using the system compositor via {@link SurfaceControl}
     *
     * This flag is currently only needed when using
     * {@link android.view.SurfaceControl.Transaction#setBuffer(SurfaceControl, HardwareBuffer)}
+14 −3
Original line number Diff line number Diff line
@@ -3692,21 +3692,32 @@ public final class SurfaceControl implements Parcelable {
        /**
         * Sets the buffer transform that should be applied to the current buffer.
         *
         * This can be used in combination with
         * {@link AttachedSurfaceControl#addOnBufferTransformHintChangedListener(AttachedSurfaceControl.OnBufferTransformHintChangedListener)}
         * to pre-rotate the buffer for the current display orientation. This can
         * improve the performance of displaying the associated buffer.
         *
         * @param sc The SurfaceControl to update
         * @param transform The transform to apply to the buffer.
         * @return this
         */
        public @NonNull Transaction setBufferTransform(@NonNull SurfaceControl sc,
                /* TODO: Mark the intdef */ int transform) {
                @SurfaceControl.BufferTransform int transform) {
            checkPreconditions(sc);
            nativeSetBufferTransform(mNativeObject, sc.mNativeObject, transform);
            return this;
        }

        /**
         * Updates the region for the content on this surface updated in this transaction.
         * Updates the region for the content on this surface updated in this transaction. The
         * damage region is the area of the buffer that has changed since the previously
         * sent buffer. This can be used to reduce the amount of recomposition that needs
         * to happen when only a small region of the buffer is being updated, such as for
         * a small blinking cursor or a loading indicator.
         *
         * If unspecified, the complete surface is assumed to be damaged.
         * @param sc The SurfaceControl on which to set the damage region
         * @param region The region to set. If null, the entire buffer is assumed dirty. This is
         *               equivalent to not setting a damage region at all.
         */
        public @NonNull Transaction setDamageRegion(@NonNull SurfaceControl sc,
                @Nullable Region region) {