Boundary checks for rsAllocationCopy[12]DRange

Performs the following checks:
*  On X and Y ranges
*  On the given LOD vs. available LODs
*  On expected vs. given dimensionality of rs_allocations

Report error using setError() under all context types while
only Debug Context requires so.

Some implementations call rsrAllocationCopy[12]DRange directly, bypassing
top-level rsAllocationCopy[12]DRange. Thus the boundary checks are placed
at rsr level for now.

Bug: http://b/19800472
Test: cts RenderscriptTest and RsTest for angler_aosp-eng

Change-Id: I5c57cee5ed106e8f594f04abfc27a4e127d56a69
1 file changed
tree: 560bbcf947f8585b5357e28b229b16b8a7630a49
  1. api/
  2. cpp/
  3. cpu_ref/
  4. driver/
  5. java/
  6. scriptc/
  7. server/
  8. tests/
  9. Android.bp
  10. Android.mk
  11. CleanSpec.mk
  12. libRS.map
  13. rs.h
  14. rs.spec
  15. rs_compat.spec
  16. rs_hal.h
  17. rsAllocation.cpp
  18. rsAllocation.h
  19. rsAnimation.cpp
  20. rsAnimation.h
  21. rsApiAllocation.cpp
  22. rsApiContext.cpp
  23. rsApiDevice.cpp
  24. rsApiElement.cpp
  25. rsApiFileA3D.cpp
  26. rsApiMesh.cpp
  27. rsApiType.cpp
  28. rsClosure.cpp
  29. rsClosure.h
  30. rsCompatibilityLib.cpp
  31. rsCompatibilityLib.h
  32. rsComponent.cpp
  33. rsComponent.h
  34. rsContext.cpp
  35. rsContext.h
  36. rsCppUtils.cpp
  37. rsCppUtils.h
  38. rsDebugHelper.h
  39. rsDefines.h
  40. rsDevice.cpp
  41. rsDevice.h
  42. rsDriverLoader.cpp
  43. rsElement.cpp
  44. rsElement.h
  45. rsEnv.h
  46. rsFBOCache.cpp
  47. rsFBOCache.h
  48. rsFifo.h
  49. rsFifoSocket.cpp
  50. rsFifoSocket.h
  51. rsFileA3D.cpp
  52. rsFileA3D.h
  53. rsFont.cpp
  54. rsFont.h
  55. rsg.spec
  56. rsg_generator.c
  57. rsgApi.cpp.rsg
  58. rsgApiFuncDecl.h.rsg
  59. rsgApiReplay.cpp.rsg
  60. rsgApiStructs.h.rsg
  61. rsGrallocConsumer.cpp
  62. rsGrallocConsumer.h
  63. rsInternalDefines.h
  64. rsList.h
  65. rsMap.h
  66. rsMatrix2x2.cpp
  67. rsMatrix2x2.h
  68. rsMatrix3x3.cpp
  69. rsMatrix3x3.h
  70. rsMatrix4x4.cpp
  71. rsMatrix4x4.h
  72. rsMesh.cpp
  73. rsMesh.h
  74. rsMutex.cpp
  75. rsMutex.h
  76. rsObjectBase.cpp
  77. rsObjectBase.h
  78. rsProgram.cpp
  79. rsProgram.h
  80. rsProgramBase.h
  81. rsProgramFragment.cpp
  82. rsProgramFragment.h
  83. rsProgramRaster.cpp
  84. rsProgramRaster.h
  85. rsProgramStore.cpp
  86. rsProgramStore.h
  87. rsProgramVertex.cpp
  88. rsProgramVertex.h
  89. rsRuntime.h
  90. rsSampler.cpp
  91. rsSampler.h
  92. rsScript.cpp
  93. rsScript.h
  94. rsScriptC.cpp
  95. rsScriptC.h
  96. rsScriptC_Lib.cpp
  97. rsScriptC_LibGL.cpp
  98. rsScriptGroup.cpp
  99. rsScriptGroup.h
  100. rsScriptGroup2.cpp
  101. rsScriptGroup2.h
  102. rsScriptGroupBase.h
  103. rsScriptIntrinsic.cpp
  104. rsScriptIntrinsic.h
  105. rsSignal.cpp
  106. rsSignal.h
  107. rsStream.cpp
  108. rsStream.h
  109. rsThreadIO.cpp
  110. rsThreadIO.h
  111. rsType.cpp
  112. rsType.h
  113. rsUtils.h
  114. run_rs_cts.sh
  115. spec.h
  116. spec.l
  117. update_rs_prebuilts.sh