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

Commit 08ca2e3a authored by Bo Liu's avatar Bo Liu Committed by Android (Google) Code Review
Browse files

Merge "Revert "Expose setDrawGLFunctionDetachedCallback to webview"" into nyc-dev

parents 9a5f9c20 d443f369
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -48971,7 +48971,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
@@ -3906,7 +3906,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
@@ -16065,20 +16064,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.
     *