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

This commit is contained in:
Bo Liu
2016-04-27 17:58:32 +00:00
committed by Android (Google) Code Review
3 changed files with 0 additions and 34 deletions

View File

@@ -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);
}

View File

@@ -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;
}
/**

View File

@@ -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.
*