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

Commit 45d70c2b authored by John Reck's avatar John Reck
Browse files

Add nullability annotations to HardwareRenderer

Fixes: 126701502
Test: none
Change-Id: Ic215ffeb8decdadd1ae140c0b278b481b3eb010c
parent 2a980300
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -14113,14 +14113,14 @@ package android.graphics {
  public class HardwareRenderer {
    ctor public HardwareRenderer();
    method public void clearContent();
    method public android.graphics.HardwareRenderer.FrameRenderRequest createRenderRequest();
    method @NonNull public android.graphics.HardwareRenderer.FrameRenderRequest createRenderRequest();
    method public void destroy();
    method public boolean isOpaque();
    method public void notifyFramePending();
    method public void setContentRoot(@Nullable android.graphics.RenderNode);
    method public void setLightSourceAlpha(@FloatRange(from=0.0f, to=1.0f) float, @FloatRange(from=0.0f, to=1.0f) float);
    method public void setLightSourceGeometry(float, float, float, float);
    method public void setName(String);
    method public void setName(@NonNull String);
    method public void setOpaque(boolean);
    method public void setStopped(boolean);
    method public void setSurface(@Nullable android.view.Surface);
@@ -14132,9 +14132,9 @@ package android.graphics {
  }
  public final class HardwareRenderer.FrameRenderRequest {
    method public android.graphics.HardwareRenderer.FrameRenderRequest setFrameCommitCallback(@NonNull java.util.concurrent.Executor, @NonNull Runnable);
    method public android.graphics.HardwareRenderer.FrameRenderRequest setVsyncTime(long);
    method public android.graphics.HardwareRenderer.FrameRenderRequest setWaitForPresent(boolean);
    method @NonNull public android.graphics.HardwareRenderer.FrameRenderRequest setFrameCommitCallback(@NonNull java.util.concurrent.Executor, @NonNull Runnable);
    method @NonNull public android.graphics.HardwareRenderer.FrameRenderRequest setVsyncTime(long);
    method @NonNull public android.graphics.HardwareRenderer.FrameRenderRequest setWaitForPresent(boolean);
    method public int syncAndDraw();
  }
+5 −5
Original line number Diff line number Diff line
@@ -193,7 +193,7 @@ public class HardwareRenderer {
     *
     * @param name The debug name to use for this HardwareRenderer instance
     */
    public void setName(String name) {
    public void setName(@NonNull String name) {
        nSetName(mNativeProxy, name);
    }

@@ -330,7 +330,7 @@ public class HardwareRenderer {
         *
         * @return this instance
         */
        public FrameRenderRequest setVsyncTime(long vsyncTime) {
        public @NonNull FrameRenderRequest setVsyncTime(long vsyncTime) {
            mFrameInfo.setVsync(vsyncTime, vsyncTime);
            mFrameInfo.addFlags(FrameInfo.FLAG_SURFACE_CANVAS);
            return this;
@@ -351,7 +351,7 @@ public class HardwareRenderer {
         *
         * @return this instance
         */
        public FrameRenderRequest setFrameCommitCallback(@NonNull Executor executor,
        public @NonNull FrameRenderRequest setFrameCommitCallback(@NonNull Executor executor,
                @NonNull Runnable frameCommitCallback) {
            setFrameCompleteCallback(frameNr -> executor.execute(frameCommitCallback));
            return this;
@@ -372,7 +372,7 @@ public class HardwareRenderer {
         *                   completion.
         * @return this instance
         */
        public FrameRenderRequest setWaitForPresent(boolean shouldWait) {
        public @NonNull FrameRenderRequest setWaitForPresent(boolean shouldWait) {
            mWaitForPresent = shouldWait;
            return this;
        }
@@ -406,7 +406,7 @@ public class HardwareRenderer {
     * @return An instance of {@link FrameRenderRequest}. The instance may be reused for every
     * frame, so the caller should not hold onto it for longer than a single render request.
     */
    public FrameRenderRequest createRenderRequest() {
    public @NonNull FrameRenderRequest createRenderRequest() {
        mRenderRequest.reset();
        return mRenderRequest;
    }