From b97b251c26b801b26f2630e3a2e3f93e4088f2c5 Mon Sep 17 00:00:00 2001 From: Jason Sams Date: Sun, 16 Jan 2011 15:04:08 -0800 Subject: Add error checks to the copyFrom functions. Change-Id: Iac064c52eb58b05a94fa1c432304c6216256555b --- graphics/java/android/renderscript/Mesh.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'graphics/java/android/renderscript/Mesh.java') diff --git a/graphics/java/android/renderscript/Mesh.java b/graphics/java/android/renderscript/Mesh.java index fcf8178..c20151e 100644 --- a/graphics/java/android/renderscript/Mesh.java +++ b/graphics/java/android/renderscript/Mesh.java @@ -733,14 +733,14 @@ public class Mesh extends BaseObj { Mesh sm = smb.create(); - sm.getVertexAllocation(0).copyFrom(mVtxData); + sm.getVertexAllocation(0).copy1DRangeFromUnchecked(0, mVtxCount / floatCount, mVtxData); if(uploadToBufferObject) { if (uploadToBufferObject) { sm.getVertexAllocation(0).syncAll(Allocation.USAGE_SCRIPT); } } - sm.getIndexSetAllocation(0).copyFrom(mIndexData); + sm.getIndexSetAllocation(0).copy1DRangeFromUnchecked(0, mIndexCount, mIndexData); if (uploadToBufferObject) { sm.getIndexSetAllocation(0).syncAll(Allocation.USAGE_SCRIPT); } -- cgit v1.1