Loading media/mca/filterfw/java/android/filterfw/core/GLEnvironment.java +6 −2 Original line number Original line Diff line number Diff line Loading @@ -31,6 +31,8 @@ public class GLEnvironment { private int glEnvId; private int glEnvId; private boolean mManageContext = true; public GLEnvironment() { public GLEnvironment() { nativeAllocate(); nativeAllocate(); } } Loading @@ -51,12 +53,14 @@ public class GLEnvironment { } } public void initWithNewContext() { public void initWithNewContext() { mManageContext = true; if (!nativeInitWithNewContext()) { if (!nativeInitWithNewContext()) { throw new RuntimeException("Could not initialize GLEnvironment with new context!"); throw new RuntimeException("Could not initialize GLEnvironment with new context!"); } } } } public void initWithCurrentContext() { public void initWithCurrentContext() { mManageContext = false; if (!nativeInitWithCurrentContext()) { if (!nativeInitWithCurrentContext()) { throw new RuntimeException("Could not initialize GLEnvironment with current context!"); throw new RuntimeException("Could not initialize GLEnvironment with current context!"); } } Loading @@ -78,13 +82,13 @@ public class GLEnvironment { if (Looper.myLooper() != null && Looper.myLooper().equals(Looper.getMainLooper())) { if (Looper.myLooper() != null && Looper.myLooper().equals(Looper.getMainLooper())) { Log.e("FilterFramework", "Activating GL context in UI thread!"); Log.e("FilterFramework", "Activating GL context in UI thread!"); } } if (!nativeActivate()) { if (mManageContext && !nativeActivate()) { throw new RuntimeException("Could not activate GLEnvironment!"); throw new RuntimeException("Could not activate GLEnvironment!"); } } } } public void deactivate() { public void deactivate() { if (!nativeDeactivate()) { if (mManageContext && !nativeDeactivate()) { throw new RuntimeException("Could not deactivate GLEnvironment!"); throw new RuntimeException("Could not deactivate GLEnvironment!"); } } } } Loading Loading
media/mca/filterfw/java/android/filterfw/core/GLEnvironment.java +6 −2 Original line number Original line Diff line number Diff line Loading @@ -31,6 +31,8 @@ public class GLEnvironment { private int glEnvId; private int glEnvId; private boolean mManageContext = true; public GLEnvironment() { public GLEnvironment() { nativeAllocate(); nativeAllocate(); } } Loading @@ -51,12 +53,14 @@ public class GLEnvironment { } } public void initWithNewContext() { public void initWithNewContext() { mManageContext = true; if (!nativeInitWithNewContext()) { if (!nativeInitWithNewContext()) { throw new RuntimeException("Could not initialize GLEnvironment with new context!"); throw new RuntimeException("Could not initialize GLEnvironment with new context!"); } } } } public void initWithCurrentContext() { public void initWithCurrentContext() { mManageContext = false; if (!nativeInitWithCurrentContext()) { if (!nativeInitWithCurrentContext()) { throw new RuntimeException("Could not initialize GLEnvironment with current context!"); throw new RuntimeException("Could not initialize GLEnvironment with current context!"); } } Loading @@ -78,13 +82,13 @@ public class GLEnvironment { if (Looper.myLooper() != null && Looper.myLooper().equals(Looper.getMainLooper())) { if (Looper.myLooper() != null && Looper.myLooper().equals(Looper.getMainLooper())) { Log.e("FilterFramework", "Activating GL context in UI thread!"); Log.e("FilterFramework", "Activating GL context in UI thread!"); } } if (!nativeActivate()) { if (mManageContext && !nativeActivate()) { throw new RuntimeException("Could not activate GLEnvironment!"); throw new RuntimeException("Could not activate GLEnvironment!"); } } } } public void deactivate() { public void deactivate() { if (!nativeDeactivate()) { if (mManageContext && !nativeDeactivate()) { throw new RuntimeException("Could not deactivate GLEnvironment!"); throw new RuntimeException("Could not deactivate GLEnvironment!"); } } } } Loading