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

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

Merge "Add more temporary logging for investigating detachFunctor" into jb-dev

parents 1ad66b2f 8857b2f7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1229,7 +1229,7 @@ public abstract class HardwareRenderer {
        void detachFunctor(int functor) {
            if (mCanvas != null) {
                mCanvas.detachFunctor(functor);
            }
            } else Log.e(LOG_TAG, "can't detachFunctor, have no canvas");
        }

        @Override
+3 −0
Original line number Diff line number Diff line
@@ -678,6 +678,9 @@ public final class ViewRootImpl implements ViewParent,
    }

    public void detachFunctor(int functor) {
        Log.e(HardwareRenderer.LOG_TAG, String.format("detachFunctor, mHarwareRenderer==null %b, enabled %b",
                mAttachInfo.mHardwareRenderer == null,
                mAttachInfo.mHardwareRenderer == null ? false : mAttachInfo.mHardwareRenderer.isEnabled()));
        if (mAttachInfo.mHardwareRenderer != null && mAttachInfo.mHardwareRenderer.isEnabled()) {
            mAttachInfo.mHardwareRenderer.detachFunctor(functor);
        }
+5 −2
Original line number Diff line number Diff line
@@ -262,7 +262,10 @@ void OpenGLRenderer::resume() {
}

void OpenGLRenderer::detachFunctor(Functor* functor) {
    mFunctors.remove(functor);
    int size = mFunctors.size();
    int remove = mFunctors.remove(functor);
    ALOGD("OGLR %p detachFunctor %p, removed at index %d of %d",
          this, functor, remove, size);
}

void OpenGLRenderer::attachFunctor(Functor* functor) {
@@ -309,7 +312,7 @@ status_t OpenGLRenderer::invokeFunctors(Rect& dirty) {

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

    if (mDirtyClip) {
        setScissorFromClip();