am 0c103af3: Merge change 27171 into eclair
Merge commit '0c103af370f7f0ec59a51f43ec0f6bd51972d3cb' into eclair-plus-aosp * commit '0c103af370f7f0ec59a51f43ec0f6bd51972d3cb': Fix remaining object leaks. Change FountainView to tear down the rsContext and recreate on rotation to test teardown.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -374,6 +374,7 @@ RsType rsi_TypeCreate(Context *rsc)
|
||||
st->setDimLOD(stc->mLOD);
|
||||
st->setDimFaces(stc->mFaces);
|
||||
st->compute();
|
||||
stc->mElement.clear();
|
||||
|
||||
return st;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user