Remove libutils.so dependency from libRSDriver, libRSCpuRef, and most
parts of libRS_internal.

  NOTE: we're resolving dependencies to provide a model for vendors.
  For us, all this code is above the HAL, thus the dependencies
  are acceptable; whereas for vendors, their equivalent of this code is
  below the HAL, and so the dependencies are not acceptable.

  This CL resolves the libutils dependency by:
  - Implement the timings functions in android::renderscript namespace
  using NDK APIs, instead of using libutils counterparts.
  - Replace android::Vector and android::String8 by std::vector and
  std::string.
  - PROPERTY_VALUE_MAX is replaced as PROP_VALUE_MAX.

  This CL didn't resolve the libutils dependency of rsFont.cpp and
  rsDebugger.cpp in libRS_internal:
  The dependent functionality in rsDebugHelper.h is off by default, and
  only intended for use during development; and rsFont.cpp is part of
  graphics API which is not implemented below the HAL and is not used as
  a model by vendors.

  Additionally, this CL fixed the bug that mNodes was sorted in a
  decreasing order. Nodes in ScriptGroup should be executed in
  ascending order. The bad sort was only for support lib; so there was a
  previously-unknown bug in support lib implementation of ScriptGroup.

  Background:
  libutils contains a collection of things like Vector, String8,
  CallStack. It served the purpose similar to a STL library, when there
  was no stable STL implementation available in Android. And most
  importantly, it is not part of NDK.
  Support lib used to use our own implementations of android::Vector and
  android::String8, because it can only depend on NDK, similarly for the
  timing related functions.
  As part of the Treble requirements, native RS, including vendor version
  libRS_internal, libRSDriver, libRSCpuRef could only depend on NDK
  too. So we need to break the dependency on libutils. And since we now
  have reasonable support of STLs, we should use that instead.

Bug: 34396220
Test: mm, and all CTS tests pass on Bullhead;
      RsTest and RSTest_CompatLib (both native and compat path) also pass.
Change-Id: Ib9a37d16235c1dcd0f5bae3b95c374e394483c91
44 files changed
tree: b49c8e9d9ba3afbc68bb0c9bbd8d39c87db4c589
  1. cpp/
  2. cpu_ref/
  3. driver/
  4. rsov/
  5. script_api/
  6. support/
  7. tests/
  8. Android.bp
  9. Android.mk
  10. build_rs.py
  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. rsApiStubs.cpp
  28. rsApiStubs.h
  29. rsApiType.cpp
  30. rsClosure.cpp
  31. rsClosure.h
  32. rsCompatibilityLib.h
  33. rsComponent.cpp
  34. rsComponent.h
  35. rsContext.cpp
  36. rsContext.h
  37. rsCppUtils.cpp
  38. rsCppUtils.h
  39. rsDebugHelper.h
  40. rsDefines.h
  41. rsDevice.cpp
  42. rsDevice.h
  43. rsDriverLoader.cpp
  44. rsElement.cpp
  45. rsElement.h
  46. rsEnv.h
  47. rsFallbackAdaptation.cpp
  48. rsFallbackAdaptation.h
  49. rsFBOCache.cpp
  50. rsFBOCache.h
  51. rsFifo.h
  52. rsFifoSocket.cpp
  53. rsFifoSocket.h
  54. rsFileA3D.cpp
  55. rsFileA3D.h
  56. rsFont.cpp
  57. rsFont.h
  58. rsg.spec
  59. rsg_generator.c
  60. rsgApi.cpp.rsg
  61. rsgApiFuncDecl.h.rsg
  62. rsgApiReplay.cpp.rsg
  63. rsgApiStructs.h.rsg
  64. rsGrallocConsumer.cpp
  65. rsGrallocConsumer.h
  66. rsHidlAdaptation.cpp
  67. rsHidlAdaptation.h
  68. rsInternalDefines.h
  69. rsList.h
  70. rsMap.h
  71. rsMatrix2x2.cpp
  72. rsMatrix2x2.h
  73. rsMatrix3x3.cpp
  74. rsMatrix3x3.h
  75. rsMatrix4x4.cpp
  76. rsMatrix4x4.h
  77. rsMesh.cpp
  78. rsMesh.h
  79. rsMutex.cpp
  80. rsMutex.h
  81. rsObjectBase.cpp
  82. rsObjectBase.h
  83. rsProgram.cpp
  84. rsProgram.h
  85. rsProgramBase.h
  86. rsProgramFragment.cpp
  87. rsProgramFragment.h
  88. rsProgramRaster.cpp
  89. rsProgramRaster.h
  90. rsProgramStore.cpp
  91. rsProgramStore.h
  92. rsProgramVertex.cpp
  93. rsProgramVertex.h
  94. rsRuntime.h
  95. rsSampler.cpp
  96. rsSampler.h
  97. rsScript.cpp
  98. rsScript.h
  99. rsScriptC.cpp
  100. rsScriptC.h
  101. rsScriptC_Lib.cpp
  102. rsScriptC_LibGL.cpp
  103. rsScriptGroup.cpp
  104. rsScriptGroup.h
  105. rsScriptGroup2.cpp
  106. rsScriptGroup2.h
  107. rsScriptGroupBase.h
  108. rsScriptIntrinsic.cpp
  109. rsScriptIntrinsic.h
  110. rsSignal.cpp
  111. rsSignal.h
  112. rsStream.cpp
  113. rsStream.h
  114. rsThreadIO.cpp
  115. rsThreadIO.h
  116. rsType.cpp
  117. rsType.h
  118. rsUtils.h
  119. run_rs_cts.sh
  120. spec.h
  121. spec.l
  122. update-prebuilts.py
  123. update_rs_prebuilts.sh