Repository: google/filament
File: android/filament-android/src/main/java/com/google/android/filament/View.java (Java)

Code before:
                options.quality.ordinal());
    }

    /**
     * Returns the dynamic resolution options associated with this view.
     * @return value set by {@link #setDynamicResolutionOptions}.
     */
    @NonNull
    public DynamicResolutionOptions getDynamicResolutionOptions() {
        if (mDynamicResolution == null) {
            mDynamicResolution = new DynamicResolutionOptions();
        }
        return mDynamicResolution;
    }

    /**
     * Returns the last dynamic resolution scale factor used by this view. This value is updated
     * when Renderer::render(View*) is called
     * @param out A 2-float array where the value will be stored, or null in which case the array is
     *            allocated.
     * @return A 2-float array containing the horizontal and the vertical scale factors
     * @see Renderer#render(View)
     */
    @NonNull @Size(min = 2)
    public float[] getLastDynamicResolutionScale(@Nullable @Size(min = 4) float[] out) {
        out = Asserts.assertFloat4(out);
        nGetLastDynamicResolutionScale(getNativeObject(), out);
        return out;
    }

    /**
     * Sets the rendering quality for this view (e.g. color precision).
     *
     * @param renderQuality The render quality to use on this view
     */
    public void setRenderQuality(@NonNull RenderQuality renderQuality) {
        mRenderQuality = renderQuality;
        nSetRenderQuality(getNativeObject(), renderQuality.hdrColorBuffer.ordinal());
    }

    /**
     * Returns the render quality used by this view.
     * @return value set by {@link #setRenderQuality}.
     */
    @NonNull
    public RenderQuality getRenderQuality() {
        if (mRenderQuality == null) {
            mRenderQuality = new RenderQuality();
        }
        return mRenderQuality;
    }

Review comment (suggestion):
I think you meant `@Size(min = 2) float[] out` and `out = Asserts.assertFloat2(out);` for these two lines.

Code after:
                options.quality.ordinal());
    }

    /**
     * Returns the dynamic resolution options associated with this view.
     * @return value set by {@link #setDynamicResolutionOptions}.
     */
    @NonNull
    public DynamicResolutionOptions getDynamicResolutionOptions() {
        if (mDynamicResolution == null) {
            mDynamicResolution = new DynamicResolutionOptions();
        }
        return mDynamicResolution;
    }

    /**
     * Returns the last dynamic resolution scale factor used by this view. This value is updated
     * when Renderer::render(View*) is called
     * @param out A 2-float array where the value will be stored, or null in which case the array is
     *            allocated.
     * @return A 2-float array containing the horizontal and the vertical scale factors
     * @see Renderer#render(View)
     */
    @NonNull @Size(min = 2)
    public float[] getLastDynamicResolutionScale(@Nullable @Size(min = 2) float[] out) {
        out = Asserts.assertFloat2(out);
        nGetLastDynamicResolutionScale(getNativeObject(), out);
        return out;
    }

    /**
     * Sets the rendering quality for this view (e.g. color precision).
     *
     * @param renderQuality The render quality to use on this view
     */
    public void setRenderQuality(@NonNull RenderQuality renderQuality) {
        mRenderQuality = renderQuality;
        nSetRenderQuality(getNativeObject(), renderQuality.hdrColorBuffer.ordinal());
    }

    /**
     * Returns the render quality used by this view.
     * @return value set by {@link #setRenderQuality}.
     */
    @NonNull
    public RenderQuality getRenderQuality() {
        if (mRenderQuality == null) {
            mRenderQuality = new RenderQuality();
        }
        return mRenderQuality;
    }