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

Commit fca54fd4 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add more docs per API council feedback"

parents 883aa987 a96a6df1
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
@@ -3700,21 +3700,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) {