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

Commit d443f369 authored by Bo Liu's avatar Bo Liu
Browse files

Revert "Expose setDrawGLFunctionDetachedCallback to webview"

This reverts commit ee34ef16.

This API is no longer needed by webview since 51.0.2704.22.
So remove this API. Note that this system API has never shipped
so it's ok to simply remove it.

Original description:
> Expose setDrawGLFunctionDetachedCallback to webview
>
> Add WebViewDelegate.setDrawGLFunctionDetachedCallback system API that's
> used for webview to receive the functor detach callback.
>
> BUG: 27709981
> Change-Id: Ie6b5e445c0090a181f94fcd2ec1ea77095c9cb03

BUG: 27709981
Change-Id: I9920dbedc6a280b4a19a8715832c4d2f64a7a7be
parent 8ca76380
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -48895,7 +48895,6 @@ package android.webkit {
    method public int getPackageId(android.content.res.Resources, java.lang.String);
    method public void invokeDrawGlFunctor(android.view.View, long, boolean);
    method public boolean isTraceTagEnabled();
    method public java.lang.Runnable setDrawGlFunctionDetachedCallback(android.view.View, java.lang.Runnable);
    method public void setOnTraceEnabledChangeListener(android.webkit.WebViewDelegate.OnTraceEnabledChangeListener);
  }
+0 −15
Original line number Diff line number Diff line
@@ -3899,7 +3899,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
     * cleanup.
     */
    final RenderNode mRenderNode;
    private Runnable mRenderNodeDetachedCallback;
    /**
     * Set to true when the view is sending hover accessibility events because it
@@ -16058,20 +16057,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
     * @hide
     */
    public void onRenderNodeDetached(RenderNode renderNode) {
        if (renderNode == mRenderNode && mRenderNodeDetachedCallback != null) {
            mRenderNodeDetachedCallback.run();
        }
    }
    /**
     * Set callback for functor detach. Exposed to WebView through WebViewDelegate.
     * Should not be used otherwise.
     * @hide
     */
    public final Runnable setRenderNodeDetachedCallback(@Nullable Runnable callback) {
        Runnable oldCallback = mRenderNodeDetachedCallback;
        mRenderNodeDetachedCallback = callback;
        return oldCallback;
    }
    /**
+0 −18
Original line number Diff line number Diff line
@@ -130,24 +130,6 @@ public final class WebViewDelegate {
        ((DisplayListCanvas) canvas).drawGLFunctor2(nativeDrawGLFunctor, releasedRunnable);
    }

    /**
     * Set the Runnable callback the DrawGlFunction functor is detached and free to be destroyed.
     * This will replace the previous callback, if any.
     *
     * @param view The view to set the callback. Should be the view where onDraw inserted
     *        DrawGLFunctor.
     * @param callback The new callback to set on the view.
     * @throws IllegalArgumentException if view is null.
     * @return The previous callback on this view.
     */
    public Runnable setDrawGlFunctionDetachedCallback(
        @NonNull View view, @Nullable Runnable callback) {
        if (view == null) {
            throw new IllegalArgumentException("View cannot be null");
        }
        return view.setRenderNodeDetachedCallback(callback);
    }

    /**
     * Detaches the draw GL functor.
     *