Skip to content
Snippets Groups Projects
  1. Feb 26, 2024
  2. Feb 22, 2024
    • Jean-François's avatar
      Throw when ScriptC is used on unsupported ABIs · 4f585f7c
      Jean-François authored
      ScriptC won't be supported on any new architecture (for example riscv64), so
      throw an exception when it is used on an unsupported architecture.
      
      Note that using `Build.SUPPORTED_ABIS` includes ABIs supported due to
      dynamic binary translation, which do not support ScriptC. So we can't
      use `Build.SUPPORTED_ABIS` to determine if ScriptC is supported or
      not.
      
      Instead we attempt loading `libRS.so`.
      `libRS.so` is not present on riscv64 images, so this allows us to know
      if we are on a riscv64 system.
      A problem occurs on x86 images with binary translation for riscv64
      (aka berberis): when running a riscv64 binary, the binary translation
      system will fallback to the x86 version of the libraries via what is
      called a "native bridge". This means that `libRS.so` would successfully
      load on those system, which we do not want because even though it would load it wouldn't run properly.
      This is why a separate CL in the binary translation codebase was landed that explicitly refuses to load `libRS.so`:
      https://android-review.git.corp.google.com/c/platform/frameworks/libs/binary_translation/+/2971952
      
      Bug: 206676167
      Test: atest CtsRsBlasTestCases:android.cts.rsblas.IntrinsicBLAS#test_L3_SGEMM_API -- --abi x86_64
      
      Change-Id: I2ed2e2ae531046d1d00e9a2d2f864375b0bb3570
      4f585f7c
  3. Oct 26, 2023
  4. Oct 03, 2023
  5. Oct 02, 2023
  6. Feb 07, 2023
  7. May 16, 2022
    • Jean-Luc Brouillet's avatar
      Fix bug in Blend that did not use options. · 1f42ae91
      Jean-Luc Brouillet authored
      For one of the many variants of Blend, a cut&paste error made
      that the options were not passed.
      
      This was not caught because no test exercised this.
      
      I've added the test (in a related CL) and fixed the bug.
      
      Bug: 178718752
      Test: Ran the RS Java tests
      Change-Id: Ide2fef96137ffd89e4431cf15be5df398036d909
      Merged-In: Ide2fef96137ffd89e4431cf15be5df398036d909
      (cherry picked from commit a2c6eb2f)
      1f42ae91
  8. Apr 21, 2021
    • Xusong Wang's avatar
      Deprecate RS Java APIs. · 1f8dc651
      Xusong Wang authored
      This CL marks RenderScript Java APIs as deprecated.
      
      Bug: 168711199
      Test: m
      Test: CtsRenderscriptTestCases
      Test: CtsRsCppTestCases
      Test: CtsRsBlasTestCases
      Change-Id: Id271a794679d445c480d62c87ae6c8150f6901f8
      Merged-In: Id271a794679d445c480d62c87ae6c8150f6901f8
      (cherry picked from commit 8b4548c4)
      1f8dc651
  9. Apr 01, 2021
    • Bob Badour's avatar
      [LSC] Add LOCAL_LICENSE_KINDS to frameworks/base · de423b7a
      Bob Badour authored
      Added SPDX-license-identifier-Apache-2.0 to:
        drm/java/Android.bp
        graphics/java/Android.bp
        identity/Android.bp
        identity/java/Android.bp
        keystore/java/Android.bp
        location/java/Android.bp
        location/tests/Android.bp
        lowpan/java/Android.bp
        media/mca/effect/java/Android.bp
        media/mca/filterfw/java/Android.bp
        media/mca/filterpacks/java/Android.bp
        mime/java/Android.bp
        mms/java/Android.bp
        opengl/java/Android.bp
        rs/java/Android.bp
        sax/java/Android.bp
        services/tests/servicestests/test-apps/PackageParsingTestManifests/Android.bp
        telecomm/java/Android.bp
        telephony/common/Android.bp
        tests/FlickerTests/test-apps/Android.bp
      
      Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD to:
        telephony/java/Android.bp
      
      Bug: 68860345
      Bug: 151177513
      Bug: 151953481
      
      Test: m all
      
      Exempt-From-Owner-Approval: janitorial work
      Change-Id: I2ee0af9ce8f74de2172b359b41d2c52a8b8f7e6c
      de423b7a
  10. Mar 30, 2021
    • Anton Hansson's avatar
      Move framework java filegroups into subdirectories · 9b2c4a65
      Anton Hansson authored
      All the java code used to build the framework jar and run metalava
      was previously defined in the toplevel Android.bp files. Move these
      into the subdirs where the source actually lives.
      
      This simplifies the rules themselves (no path and needless prefix) and
      declutters the top level Android.bp.
      
      Test: m
      Change-Id: I97086e309eacb879d16facb8497d9940fa5ddaf6
      9b2c4a65
  11. Mar 07, 2021
    • Hans Boehm's avatar
      No longer call registerNativeAllocation · 5dc6b621
      Hans Boehm authored
      The original rationale is obsolete, since contexts are now almost
      always shared.
      
      This call was unbalanced; there was no corresponding
      freeNativeAllocation call. Thus, in the rare cases in which this
      actually makes a difference, it's likely to lead to perpetually
      increasing native allocation counts, which is more likely to be
      confusing than helpful to the garbage collector.
      
      (Discussed with Tim and Jean-Luc, and concluded that it was best
      just to remove the code.)
      
      Test: Treehugger
      Bug: 181351667
      Change-Id: I376a16732231aad0fdacd022de301464e5ac71dd
      5dc6b621
  12. Mar 01, 2021
    • Xusong Wang's avatar
      Deprecate RS Java APIs. · 8b4548c4
      Xusong Wang authored
      This CL marks RenderScript Java APIs as deprecated.
      
      Bug: 168711199
      Test: m
      Test: CtsRenderscriptTestCases
      Test: CtsRsCppTestCases
      Test: CtsRsBlasTestCases
      Change-Id: Id271a794679d445c480d62c87ae6c8150f6901f8
      8b4548c4
  13. Feb 13, 2021
    • Jean-Luc Brouillet's avatar
      Fix bug in Blend that did not use options. · a2c6eb2f
      Jean-Luc Brouillet authored
      For one of the many variants of Blend, a cut&paste error made
      that the options were not passed.
      
      This was not caught because no test exercised this.
      
      I've added the test (in a related CL) and fixed the bug.
      
      Bug: 178718752
      Test: Ran the RS Java tests
      Change-Id: Ide2fef96137ffd89e4431cf15be5df398036d909
      a2c6eb2f
  14. Nov 04, 2020
    • Mathew Inwood's avatar
      Add maxTargetSdk restriction to unused APIs. · 5d123b67
      Mathew Inwood authored
      These are APIs that have @UnsupportedAppUsage but for which we don't
      have any evidence of them currently being used, so should be safe to
      remove from the unsupported list.
      
      Bug: 170729553
      Test: Treehugger
      Merged-In: I626caf7c1fe46c5ab1f39c2895b42a34319f771a
      Change-Id: I54e5ecd11e76ca1de3c5893e3a98b0108e735413
      5d123b67
  15. Nov 02, 2020
    • Mathew Inwood's avatar
      Add maxTargetSdk restriction to unused APIs. · 5f0edaaa
      Mathew Inwood authored
      These are APIs that have @UnsupportedAppUsage but for which we don't
      have any evidence of them currently being used, so should be safe to
      remove from the unsupported list.
      
      Bug: 170729553
      Test: Treehugger
      Merged-In: I8285daa8530260251ecad6f3f38f98e263629ca7
      Change-Id: I626caf7c1fe46c5ab1f39c2895b42a34319f771a
      5f0edaaa
  16. Oct 29, 2020
    • Mathew Inwood's avatar
      Add maxTargetSdk restriction to unused APIs. · 8e742f92
      Mathew Inwood authored
      These are APIs that have @UnsupportedAppUsage but for which we don't
      have any evidence of them currently being used, so should be safe to
      remove from the unsupported list.
      
      This is a resubmit of ag/12929664 with some APIs excluded that caused
      test failures; see bugs 171886397, 171888296, 171864568.
      
      APIs excluded:
      Landroid/bluetooth/le/ScanRecord;->parseFromBytes([B)Landroid/bluetooth/le/ScanRecord;
      Landroid/os/Process;->myPpid()I
      Landroid/os/SharedMemory;->getFd()I
      Landroid/hardware/input/InputManager;->INJECT_INPUT_EVENT_MODE_WAIT_FOR_FINISH:I
      
      Bug: 170729553
      Test: Treehugger
      Change-Id: I8285daa8530260251ecad6f3f38f98e263629ca7
      8e742f92
  17. Oct 28, 2020
  18. Oct 27, 2020
    • Mathew Inwood's avatar
      Add maxTargetSdk restriction to unused APIs. · 72f07d6a
      Mathew Inwood authored
      These are APIs that have @UnsupportedAppUsage but for which we don't
      have any evidence of them currently being used, so should be safe to
      remove from the unsupported list.
      
      Bug: 170729553
      Test: Treehugger
      Change-Id: I4c8fd0006f950de9955242e93968fb0996ceb372
      72f07d6a
  19. Jan 14, 2020
    • Artur Satayev's avatar
      Use new UnsupportedAppUsage annotation. · 53ada2ab
      Artur Satayev authored
      Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library.
      
      Bug: 145132366
      Test: m && diff unsupportedappusage_index.csv \
            git diff HEAD^ HEAD | grep '^[+-][^+-]' | grep -v '.import'
      Merged-In: I853372f3c6fef905553bb31be4f1bb48df735f7a
      Change-Id: I853372f3c6fef905553bb31be4f1bb48df735f7a
      53ada2ab
  20. Jan 08, 2020
    • Derek Sollenberger's avatar
      Update renderscript to use stable graphics APIs · db98b528
      Derek Sollenberger authored
      This change removes usage of skia data structures and replaces
      them with stable C APIs. It also removes two unused java APIs
      that were missing their native components.
      
      Test: CTS presubmit tests
      Bug: 137655431
      Change-Id: I18cbe0cf9dc731c4c6c1f645be0df2f462764118
      db98b528
    • Artur Satayev's avatar
      Use new UnsupportedAppUsage annotation. · 2ebb31c0
      Artur Satayev authored
      Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library.
      
      Bug: 145132366
      Test: m && diff unsupportedappusage_index.csv \
            git diff HEAD^ HEAD | grep '^[+-][^+-]' | grep -v '.import'
      
      Change-Id: I853372f3c6fef905553bb31be4f1bb48df735f7a
      2ebb31c0
  21. Dec 19, 2019
  22. Dec 18, 2019
    • Artur Satayev's avatar
      Use new UnsupportedAppUsage annotation. · a5264903
      Artur Satayev authored
      Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library.
      
      Bug: 145132366
      Test: m && diff unsupportedappusage_index.csv \
            git diff HEAD^ HEAD | grep '^[+-][^+-]' | grep -v '.import'
      Change-Id: I087bb1cecbe59f1cf0c2e770c735d7a433722c6f
      a5264903
  23. Mar 27, 2019
    • Leon Scroggins III's avatar
      Pass Bitmap's native instance to JNI where feasible · 71fae62f
      Leon Scroggins III authored
      Test: CtsGraphicsTestCases, CtsUiRenderingTestCases,
            CtsRenderscriptTestCases
      
      This is significantly faster than passing the Java object down and then
      calling a JNI method to retrieve the pointer. See
      https://buganizer.corp.google.com/issues/16656908#comment19
      
      In some cases this changes what used to be native crashes (due to
      android::BitmapWrapper:assertValid's LOG_ALWAYS_FATAL_IF) into
      NullPointerExceptions (if a caller used a null Bitmap).
      
      In addition:
      - Remove unnecessary JNIEnv param from toBitmap(jlong)
      - Change instances of toBitmap(JNIEnv*, jobject) to the above
      - Replace calls to GraphicsJNI::getSkBitmap() to inline calls to
        toBitmap/getSkBitmap
      - make Canvas#nInitRaster @FastNative (FIXME: Could these be
        @CriticalNative?)
      
      Change-Id: I6194097be1b6e6952eba70e1e7052a5a250eed93
      71fae62f
  24. Mar 06, 2019
  25. Feb 11, 2019
    • Hans Boehm's avatar
      Correct registerNativeAllocation type · da3cee60
      Hans Boehm authored
      We're changing the argument type to long, since it should be roughly
      large enough to hold a size_t everywhere.
      
      Make style checker happy by reordering imports.
      
      Test: Treehugger
      Change-Id: Iccdc5fa592f56d448817f7762af1cff27b4fc2a8
      da3cee60
  26. Aug 06, 2018
    • Mathew Inwood's avatar
      Add @UnsupportedAppUsage annotations · 1532447a
      Mathew Inwood authored
      For packages:
        android.renderscript
      
      This is an automatically generated CL. See go/UnsupportedAppUsage
      for more details.
      
      Exempted-From-Owner-Approval: Mechanical changes to the codebase
      which have been approved by Android API council and announced on
      android-eng@
      
      Bug: 110868826
      Test: m
      Change-Id: I016f6e720e79c48afe44f4690b5dd99fc81ae780
      Merged-In: I1aa8ebca448547031b426a7b305c5c3d6fcf2652
      1532447a
  27. Aug 02, 2018
    • Mathew Inwood's avatar
      Add @UnsupportedAppUsage annotations · f0c90b1f
      Mathew Inwood authored
      For packages:
        android.renderscript
      
      This is an automatically generated CL. See go/UnsupportedAppUsage
      for more details.
      
      Exempted-From-Owner-Approval: Mechanical changes to the codebase
      which have been approved by Android API council and announced on
      android-eng@
      
      Bug: 110868826
      Test: m
      Change-Id: I1aa8ebca448547031b426a7b305c5c3d6fcf2652
      f0c90b1f
  28. Mar 21, 2018
  29. Jun 13, 2017
    • Yang Ni's avatar
      Do not CloseGuard KernelID or FieldID · 3a84a23f
      Yang Ni authored
      Bug: 28053584
      
      Stop CloseGuarding for two reasons:
      
      1) KernelID and FieldID objects are constructed in auto-generated
      (RenderScript reflected) Java code. It would be impossible for a user to
      explicitly call destroy() on them. Guarding them would leave a lot of
      noisy warnings in logcat.
      
      2) These KernelID and FieldID objects are not big compared to other
      RenderScript objects, e.g. Allocations. They occupy almost no native
      resources except for a native pointer. Leaving their destruction to Java
      GC would be completely acceptable, since any delay in reclaiming them is
      unlikely to cause memory pressure.
      
      Test: CTS on x86_64 emulator
      Change-Id: I587b5561a0b2bdbf0b2e95bf2995c20d5f5faf9d
      3a84a23f
  30. May 05, 2017
  31. May 04, 2017
    • Yang Ni's avatar
      Destroy Allocation with ScriptIntrinsicLut · 8b8f75a7
      Yang Ni authored
      Bug: 28053584
      
      On destroying the intrinsic, destroy its contained Allocation right away.
      
      Test: CTS on x86_64 emulator
      Change-Id: I5ca0da33b620c3291b7cafda31a6cc83eb7461a0
      8b8f75a7
  32. Apr 20, 2017
  33. Apr 18, 2017
  34. Mar 03, 2017
    • Yang Ni's avatar
      Removed close guards for Element and Type objects · 45438c94
      Yang Ni authored
      Bug: 28053769
      
      These objects are tiny and unlikely to cause memory issues.
      
      In addition, llvm-rs-cc auto-generated code contains such objects, which are
      not visibible to developers and impossible to manually destroy, leaving
      distracting warnings in Strict Mode.
      
      Test: RsTest with StrictMode on and CTS tests
      
      Change-Id: Iec68cca4f1259124b9f503a230c1a28b97ede1f3
      45438c94
  35. Jan 26, 2017
  36. Jun 14, 2016
  37. Jun 02, 2016
Loading