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

Commit 0c103af3 authored by Android (Google) Code Review's avatar Android (Google) Code Review
Browse files

Merge change 27171 into eclair

* changes:
  Fix remaining object leaks.  Change FountainView to tear down the rsContext and recreate on rotation to test teardown.
parents 7756cbee a57e9827
Loading
Loading
Loading
Loading
+0 −13
Original line number Diff line number Diff line
@@ -42,7 +42,6 @@ public class FountainView extends RSSurfaceView {

    public FountainView(Context context) {
        super(context);

        //setFocusable(true);
    }

@@ -59,11 +58,7 @@ public class FountainView extends RSSurfaceView {

    public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) {
        super.surfaceChanged(holder, format, w, h);

        Log.e("rs", "surfaceChanged");
        destroyRS();


        mRS = createRenderScript(false, true);
        mRender = new FountainRS();
        mRender.init(mRS, getResources(), w, h);
@@ -71,15 +66,7 @@ public class FountainView extends RSSurfaceView {

    public void surfaceDestroyed(SurfaceHolder holder) {
        // Surface will be destroyed when we return
        Log.v("rs", "surfaceDestroyed");
        destroyRS();

        try {
            java.lang.Thread.sleep(5000);
        } catch(InterruptedException e) {

        }
        Runtime.getRuntime().exit(0);
    }


+1 −0
Original line number Diff line number Diff line
@@ -374,6 +374,7 @@ RsType rsi_TypeCreate(Context *rsc)
    st->setDimLOD(stc->mLOD);
    st->setDimFaces(stc->mFaces);
    st->compute();
    stc->mElement.clear();

    return st;
}
+0 −6
Original line number Diff line number Diff line
@@ -139,12 +139,6 @@ public:
    uint32_t mLOD;
    bool mFaces;
    ObjectBaseRef<const Element> mElement;

    ObjectBaseRef<const Type> mIndexType;
    ObjectBaseRef<const Type> mPrimitiveType;
    ObjectBaseRef<const Type> *mVertexTypes;


};