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

Commit 7a9328a3 authored by Chris Craik's avatar Chris Craik Committed by Android (Google) Code Review
Browse files

Merge "Add temporary functor lifetime logging" into jb-dev

parents e5a4a3dc f8dafa14
Loading
Loading
Loading
Loading
+10 −2
Original line number Original line Diff line number Diff line
@@ -2069,6 +2069,11 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc
    }
    }


    private void destroyImpl() {
    private void destroyImpl() {
        int drawGLFunction = nativeGetDrawGLFunction(mNativeClass);
        ViewRootImpl viewRoot = mWebView.getViewRootImpl();
        Log.d(LOGTAG, String.format("destroyImpl, functor %x, viewroot == null %b, isHWAccel %b",
                                    drawGLFunction, (viewRoot == null),
                                    mWebView.isHardwareAccelerated()));
        mCallbackProxy.blockMessages();
        mCallbackProxy.blockMessages();
        clearHelpers();
        clearHelpers();
        if (mListBoxDialog != null) {
        if (mListBoxDialog != null) {
@@ -5296,9 +5301,12 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc


        updateHwAccelerated();
        updateHwAccelerated();


        if (mWebView.isHardwareAccelerated()) {
        int drawGLFunction = nativeGetDrawGLFunction(mNativeClass);
        int drawGLFunction = nativeGetDrawGLFunction(mNativeClass);
        ViewRootImpl viewRoot = mWebView.getViewRootImpl();
        ViewRootImpl viewRoot = mWebView.getViewRootImpl();
        Log.d(LOGTAG, String.format("destroyImpl, functor %x, viewroot == null %b, isHWAccel %b",
                                    drawGLFunction, (viewRoot == null),
                                    mWebView.isHardwareAccelerated()));
        if (mWebView.isHardwareAccelerated()) {
            if (drawGLFunction != 0 && viewRoot != null) {
            if (drawGLFunction != 0 && viewRoot != null) {
                viewRoot.detachFunctor(drawGLFunction);
                viewRoot.detachFunctor(drawGLFunction);
            }
            }
+2 −1
Original line number Original line Diff line number Diff line
@@ -262,6 +262,7 @@ void OpenGLRenderer::resume() {
}
}


void OpenGLRenderer::detachFunctor(Functor* functor) {
void OpenGLRenderer::detachFunctor(Functor* functor) {
    ALOGD("opengl renderer %p detaching functor %p", this, functor);
    mFunctors.remove(functor);
    mFunctors.remove(functor);
}
}


@@ -309,7 +310,7 @@ status_t OpenGLRenderer::invokeFunctors(Rect& dirty) {


status_t OpenGLRenderer::callDrawGLFunction(Functor* functor, Rect& dirty) {
status_t OpenGLRenderer::callDrawGLFunction(Functor* functor, Rect& dirty) {
    interrupt();
    interrupt();
    detachFunctor(functor);
    mFunctors.remove(functor);


    if (mDirtyClip) {
    if (mDirtyClip) {
        setScissorFromClip();
        setScissorFromClip();