diff options
author | Jason Sams <rjsams@android.com> | 2010-11-04 14:32:19 -0700 |
---|---|---|
committer | Jason Sams <rjsams@android.com> | 2010-11-04 14:32:19 -0700 |
commit | c1d6210fb5cc558ccea95a59a2b33bb9015fc7de (patch) | |
tree | 554b225d7e1de8017a0faf3171bce66fc028df08 /graphics/java/android/renderscript/RenderScriptGL.java | |
parent | cebfaab7a515d72ec0f965eb65ba4fdb6aba7df0 (diff) |
More RS exceptions cleanup.
Remove some dead code.
Change-Id: If97e3fdfe6de7bb28f22e1c5ee748c81cea3db93
Diffstat (limited to 'graphics/java/android/renderscript/RenderScriptGL.java')
-rw-r--r-- | graphics/java/android/renderscript/RenderScriptGL.java | 33 |
1 files changed, 3 insertions, 30 deletions
diff --git a/graphics/java/android/renderscript/RenderScriptGL.java b/graphics/java/android/renderscript/RenderScriptGL.java index 21cbb9a1cbd8..cace0636ab9c 100644 --- a/graphics/java/android/renderscript/RenderScriptGL.java +++ b/graphics/java/android/renderscript/RenderScriptGL.java @@ -68,10 +68,10 @@ public class RenderScriptGL extends RenderScript { private void validateRange(int umin, int upref, int rmin, int rmax) { if (umin < rmin || umin > rmax) { - throw new IllegalArgumentException("Minimum value provided out of range."); + throw new RSIllegalArgumentException("Minimum value provided out of range."); } if (upref < umin) { - throw new IllegalArgumentException("Prefered must be >= Minimum."); + throw new RSIllegalArgumentException("Prefered must be >= Minimum."); } } @@ -93,7 +93,7 @@ public class RenderScriptGL extends RenderScript { public void setSamples(int minimum, int prefered, float Q) { validateRange(minimum, prefered, 0, 24); if (Q < 0.0f || Q > 1.0f) { - throw new IllegalArgumentException("Quality out of 0-1 range."); + throw new RSIllegalArgumentException("Quality out of 0-1 range."); } mSamplesMin = minimum; mSamplesPref = prefered; @@ -188,33 +188,6 @@ public class RenderScriptGL extends RenderScript { nContextBindProgramVertex(safeID(p)); } - - - - ////////////////////////////////////////////////////////////////////////////////// - // File - - public class File extends BaseObj { - File(int id) { - super(id, RenderScriptGL.this); - } - } - - public File fileOpen(String s) throws IllegalStateException, IllegalArgumentException - { - if(s.length() < 1) { - throw new IllegalArgumentException("fileOpen does not accept a zero length string."); - } - - try { - byte[] bytes = s.getBytes("UTF-8"); - int id = nFileOpen(bytes); - return new File(id); - } catch (java.io.UnsupportedEncodingException e) { - throw new RuntimeException(e); - } - } - } |