Loading core/java/android/view/HardwareRenderer.java +7 −3 Original line number Original line Diff line number Diff line Loading @@ -458,8 +458,10 @@ public abstract class HardwareRenderer { * * * @see HardwareCanvas#callDrawGLFunction(int) * @see HardwareCanvas#callDrawGLFunction(int) * @see #detachFunctor(int) * @see #detachFunctor(int) * * @return true if the functor was attached successfully */ */ abstract void attachFunctor(View.AttachInfo attachInfo, int functor); abstract boolean attachFunctor(View.AttachInfo attachInfo, int functor); /** /** * Initializes the hardware renderer for the specified surface and setup the * Initializes the hardware renderer for the specified surface and setup the Loading Loading @@ -1227,11 +1229,13 @@ public abstract class HardwareRenderer { } } @Override @Override void attachFunctor(View.AttachInfo attachInfo, int functor) { boolean attachFunctor(View.AttachInfo attachInfo, int functor) { if (mCanvas != null) { if (mCanvas != null) { mCanvas.attachFunctor(functor); mCanvas.attachFunctor(functor); scheduleFunctors(attachInfo); scheduleFunctors(attachInfo); return true; } } return false; } } /** /** Loading core/java/android/view/ViewRootImpl.java +3 −2 Original line number Original line Diff line number Diff line Loading @@ -670,10 +670,11 @@ public final class ViewRootImpl implements ViewParent, } } } } public void attachFunctor(int functor) { public boolean attachFunctor(int functor) { if (mAttachInfo.mHardwareRenderer != null && mAttachInfo.mHardwareRenderer.isEnabled()) { if (mAttachInfo.mHardwareRenderer != null && mAttachInfo.mHardwareRenderer.isEnabled()) { mAttachInfo.mHardwareRenderer.attachFunctor(mAttachInfo, functor); return mAttachInfo.mHardwareRenderer.attachFunctor(mAttachInfo, functor); } } return false; } } public void detachFunctor(int functor) { public void detachFunctor(int functor) { Loading core/java/android/webkit/WebViewClassic.java +4 −1 Original line number Original line Diff line number Diff line Loading @@ -7827,15 +7827,18 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc mSendScrollEvent = true; mSendScrollEvent = true; int functor = 0; int functor = 0; boolean forceInval = isPictureAfterFirstLayout; ViewRootImpl viewRoot = mWebView.getViewRootImpl(); ViewRootImpl viewRoot = mWebView.getViewRootImpl(); if (mWebView.isHardwareAccelerated() && viewRoot != null) { if (mWebView.isHardwareAccelerated() && viewRoot != null) { functor = nativeGetDrawGLFunction(mNativeClass); functor = nativeGetDrawGLFunction(mNativeClass); if (functor != 0) { if (functor != 0) { viewRoot.attachFunctor(functor); // force an invalidate if functor attach not successful forceInval |= !viewRoot.attachFunctor(functor); } } } } if (functor == 0 if (functor == 0 || forceInval || mWebView.getLayerType() != View.LAYER_TYPE_NONE) { || mWebView.getLayerType() != View.LAYER_TYPE_NONE) { // invalidate the screen so that the next repaint will show new content // invalidate the screen so that the next repaint will show new content // TODO: partial invalidate // TODO: partial invalidate Loading Loading
core/java/android/view/HardwareRenderer.java +7 −3 Original line number Original line Diff line number Diff line Loading @@ -458,8 +458,10 @@ public abstract class HardwareRenderer { * * * @see HardwareCanvas#callDrawGLFunction(int) * @see HardwareCanvas#callDrawGLFunction(int) * @see #detachFunctor(int) * @see #detachFunctor(int) * * @return true if the functor was attached successfully */ */ abstract void attachFunctor(View.AttachInfo attachInfo, int functor); abstract boolean attachFunctor(View.AttachInfo attachInfo, int functor); /** /** * Initializes the hardware renderer for the specified surface and setup the * Initializes the hardware renderer for the specified surface and setup the Loading Loading @@ -1227,11 +1229,13 @@ public abstract class HardwareRenderer { } } @Override @Override void attachFunctor(View.AttachInfo attachInfo, int functor) { boolean attachFunctor(View.AttachInfo attachInfo, int functor) { if (mCanvas != null) { if (mCanvas != null) { mCanvas.attachFunctor(functor); mCanvas.attachFunctor(functor); scheduleFunctors(attachInfo); scheduleFunctors(attachInfo); return true; } } return false; } } /** /** Loading
core/java/android/view/ViewRootImpl.java +3 −2 Original line number Original line Diff line number Diff line Loading @@ -670,10 +670,11 @@ public final class ViewRootImpl implements ViewParent, } } } } public void attachFunctor(int functor) { public boolean attachFunctor(int functor) { if (mAttachInfo.mHardwareRenderer != null && mAttachInfo.mHardwareRenderer.isEnabled()) { if (mAttachInfo.mHardwareRenderer != null && mAttachInfo.mHardwareRenderer.isEnabled()) { mAttachInfo.mHardwareRenderer.attachFunctor(mAttachInfo, functor); return mAttachInfo.mHardwareRenderer.attachFunctor(mAttachInfo, functor); } } return false; } } public void detachFunctor(int functor) { public void detachFunctor(int functor) { Loading
core/java/android/webkit/WebViewClassic.java +4 −1 Original line number Original line Diff line number Diff line Loading @@ -7827,15 +7827,18 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc mSendScrollEvent = true; mSendScrollEvent = true; int functor = 0; int functor = 0; boolean forceInval = isPictureAfterFirstLayout; ViewRootImpl viewRoot = mWebView.getViewRootImpl(); ViewRootImpl viewRoot = mWebView.getViewRootImpl(); if (mWebView.isHardwareAccelerated() && viewRoot != null) { if (mWebView.isHardwareAccelerated() && viewRoot != null) { functor = nativeGetDrawGLFunction(mNativeClass); functor = nativeGetDrawGLFunction(mNativeClass); if (functor != 0) { if (functor != 0) { viewRoot.attachFunctor(functor); // force an invalidate if functor attach not successful forceInval |= !viewRoot.attachFunctor(functor); } } } } if (functor == 0 if (functor == 0 || forceInval || mWebView.getLayerType() != View.LAYER_TYPE_NONE) { || mWebView.getLayerType() != View.LAYER_TYPE_NONE) { // invalidate the screen so that the next repaint will show new content // invalidate the screen so that the next repaint will show new content // TODO: partial invalidate // TODO: partial invalidate Loading