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

Commit 83601538 authored by John Reck's avatar John Reck
Browse files

Revert "Fix destroyHardwareResources"

This reverts commit bac48c4d0c6f71f67074a430cd365ea2e15924b8.

Change-Id: Iba8b729d5e91ca31976fc2bdf9c1dd5fdb19de9a
parent e45ceae6
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -127,8 +127,6 @@ public class ThreadedRenderer extends HardwareRenderer {
    @Override
    void destroyHardwareResources(View view) {
        destroyResources(view);
        // mRootNode belongs to us and not a view, so we need to destroy it
        mRootNode.destroyDisplayListData();
        nDestroyHardwareResources(mNativeProxy);
    }

+3 −1
Original line number Diff line number Diff line
@@ -13625,7 +13625,9 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
     * @hide
     */
    protected void destroyHardwareResources() {
        resetDisplayList();
        // Intentionally empty. RenderNode's lifecycle is now fully managed
        // by the hardware renderer.
        // However some subclasses (eg, WebView, TextureView) still need this signal
    }
    /**
+2 −7
Original line number Diff line number Diff line
@@ -211,8 +211,7 @@ void RenderNode::prepareTreeImpl(TreeInfo& info) {
        // This will also release the hardware layer if we have one as
        // isRenderable() will return false, thus causing pushLayerUpdate
        // to recycle the hardware layer
        LOG_ALWAYS_FATAL_IF(mStagingDisplayListData || (mDisplayListData && !mNeedsDisplayListDataSync),
                "View.destroyHardwareResources wasn't called!");
        setStagingDisplayList(NULL);
        break;
    }

@@ -261,11 +260,7 @@ void RenderNode::pushStagingDisplayListChanges(TreeInfo& info) {
        mNeedsDisplayListDataSync = false;
        // Do a push pass on the old tree to handle freeing DisplayListData
        // that are no longer used
        TreeInfo::TraversalMode mode = TreeInfo::MODE_MAYBE_DETACHING;
        if (CC_UNLIKELY(info.mode == TreeInfo::MODE_DESTROY_RESOURCES)) {
            mode = TreeInfo::MODE_DESTROY_RESOURCES;
        }
        TreeInfo oldTreeInfo(mode, info);
        TreeInfo oldTreeInfo(TreeInfo::MODE_MAYBE_DETACHING, info);
        prepareSubTree(oldTreeInfo, mDisplayListData);
        delete mDisplayListData;
        mDisplayListData = mStagingDisplayListData;