Avoid destroying Device separately

Bug: 27983025

Device should be destroyed inside the destructor of the associated
Context.

Change-Id: I921a89974e1174f837349a89aef9b03efa4882f5
This commit is contained in:
Yang Ni
2016-04-04 10:23:57 -07:00
parent f8c07d68c1
commit 4a70df58a3
2 changed files with 4 additions and 8 deletions

View File

@@ -177,9 +177,9 @@ public class RenderScriptGL extends RenderScript {
mWidth = 0;
mHeight = 0;
mDev = nDeviceCreate();
long device = nDeviceCreate();
int dpi = ctx.getResources().getDisplayMetrics().densityDpi;
mContext = nContextCreateGL(mDev, 0, sdkVersion,
mContext = nContextCreateGL(device, 0, sdkVersion,
mSurfaceConfig.mColorMin, mSurfaceConfig.mColorPref,
mSurfaceConfig.mAlphaMin, mSurfaceConfig.mAlphaPref,
mSurfaceConfig.mDepthMin, mSurfaceConfig.mDepthPref,