summaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authorStephen Hines <srhines@google.com>2013-02-08 21:03:51 -0800
committerStephen Hines <srhines@google.com>2013-02-08 21:03:51 -0800
commit5f528becb09b0956bcad15b32639f87b87f40f13 (patch)
treefcb2a9f5bdb27b4ad30005b8eb39fe587623a293 /graphics
parenta9a7b3740598c79792cbcebca6a00d1595324ae9 (diff)
downloadframeworks_base-5f528becb09b0956bcad15b32639f87b87f40f13.zip
frameworks_base-5f528becb09b0956bcad15b32639f87b87f40f13.tar.gz
frameworks_base-5f528becb09b0956bcad15b32639f87b87f40f13.tar.bz2
Check Element in all API levels for copy2DRangeFrom().
Change-Id: I561317671a16888fc9f35908ab1ae1489a14fc6c
Diffstat (limited to 'graphics')
-rw-r--r--graphics/java/android/renderscript/Allocation.java24
1 files changed, 4 insertions, 20 deletions
diff --git a/graphics/java/android/renderscript/Allocation.java b/graphics/java/android/renderscript/Allocation.java
index 7e43a9a..1c83c51 100644
--- a/graphics/java/android/renderscript/Allocation.java
+++ b/graphics/java/android/renderscript/Allocation.java
@@ -899,38 +899,22 @@ public class Allocation extends BaseObj {
* @param data to be placed into the allocation
*/
public void copy2DRangeFrom(int xoff, int yoff, int w, int h, byte[] data) {
- // We can only validate the type on API 18+, since this check was not present in
- // earlier releases.
- if (mRS.getApplicationContext().getApplicationInfo().targetSdkVersion >= 18) {
- validateIsInt8();
- }
+ validateIsInt8();
copy2DRangeFromUnchecked(xoff, yoff, w, h, data);
}
public void copy2DRangeFrom(int xoff, int yoff, int w, int h, short[] data) {
- // We can only validate the type on API 18+, since this check was not present in
- // earlier releases.
- if (mRS.getApplicationContext().getApplicationInfo().targetSdkVersion >= 18) {
- validateIsInt16();
- }
+ validateIsInt16();
copy2DRangeFromUnchecked(xoff, yoff, w, h, data);
}
public void copy2DRangeFrom(int xoff, int yoff, int w, int h, int[] data) {
- // We can only validate the type on API 18+, since this check was not present in
- // earlier releases.
- if (mRS.getApplicationContext().getApplicationInfo().targetSdkVersion >= 18) {
- validateIsInt32();
- }
+ validateIsInt32();
copy2DRangeFromUnchecked(xoff, yoff, w, h, data);
}
public void copy2DRangeFrom(int xoff, int yoff, int w, int h, float[] data) {
- // We can only validate the type on API 18+, since this check was not present in
- // earlier releases.
- if (mRS.getApplicationContext().getApplicationInfo().targetSdkVersion >= 18) {
- validateIsFloat32();
- }
+ validateIsFloat32();
copy2DRangeFromUnchecked(xoff, yoff, w, h, data);
}