summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/RenderScript.java
Commit message (Collapse)AuthorAgeFilesLines
* Merge changes from topic "renderscript-deprecation" into sc-devXusong Wang2021-03-111-0/+5
|\ | | | | | | | | | | * changes: Silence compiler errors because of renderscript deprecation. Deprecate RS Java APIs.
| * Deprecate RS Java APIs.Xusong Wang2021-03-011-0/+5
| | | | | | | | | | | | | | | | | | | | | | This CL marks RenderScript Java APIs as deprecated. Bug: 168711199 Test: m Test: CtsRenderscriptTestCases Test: CtsRsCppTestCases Test: CtsRsBlasTestCases Change-Id: Id271a794679d445c480d62c87ae6c8150f6901f8
* | No longer call registerNativeAllocationHans Boehm2021-03-061-7/+0
|/ | | | | | | | | | | | | | | | | | 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
* Merge "Use new UnsupportedAppUsage annotation."TreeHugger Robot2020-01-091-1/+1
|\
| * Use new UnsupportedAppUsage annotation.Artur Satayev2020-01-081-1/+1
| | | | | | | | | | | | | | | | | | | | 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
* | Update renderscript to use stable graphics APIsDerek Sollenberger2020-01-081-22/+11
|/ | | | | | | | | | 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
* Revert "Use new UnsupportedAppUsage annotation."Austin Wang2019-12-191-1/+1
| | | | | | | | This reverts commit a5264903e22bc741add895133474ea13a370de4c. Reason for revert: Droidcop-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?branch=git_master&target=sdk_phone_armv7-sdk&lkgb=6083299&lkbb=6085371&fkbb=6083313, bug b/146533269 Change-Id: Ie5b031d7b277cf0e09b0a9776b26bf74f5f69e70
* Use new UnsupportedAppUsage annotation.Artur Satayev2019-12-181-1/+1
| | | | | | | | | 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
* Pass Bitmap's native instance to JNI where feasibleLeon Scroggins III2019-03-271-15/+23
| | | | | | | | | | | | | | | | | | | | | | | 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
* Correct registerNativeAllocation typeHans Boehm2019-02-111-8/+9
| | | | | | | | | | 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
* Add @UnsupportedAppUsage annotationsMathew Inwood2018-08-061-0/+8
| | | | | | | | | | | | | | | | | 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
* Merge \\"Delete simple reduction implementation.\\" into nyc-dev am: d749245b88David Gross2016-06-131-11/+3
|\ | | | | | | | | | | am: 9a53329b0a Change-Id: I66f67b6d55f4ce0496c6e136b82ca58a7a5fbfd6
| * Delete simple reduction implementation.David Gross2016-06-021-11/+3
| | | | | | | | | | Bug: 27298560 Change-Id: I8a89c9df753d12ee8af06008d424e77bb916cd8f
| * Made Element accessors thread-safeYang Ni2016-04-181-91/+91
| | | | | | | | | | Bug: 28177082 Change-Id: I8f3f2d8ce559e93cba29f8eedd5b95d1389deb23
| * Avoid destroying Device separatelyYang Ni2016-04-041-6/+2
| | | | | | | | | | | | | | | | | | Bug: 27983025 Device should be destroyed inside the destructor of the associated Context. Change-Id: I921a89974e1174f837349a89aef9b03efa4882f5
| * Correctly init code cache path for RSYang Ni2016-03-211-5/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 27439261 Script Group needs to know the code cache path before it can call bcc to merge kernels. However, before this change, the code cache path has been initialized by the ScriptC class. In the case where a script group (or even the entire app) does not contain any regular script but only intrinsics, the code cache would remain uninitialized. Fixed this by initializing the code cache path in the RenderScript class the first time when the accessor method is called. Change-Id: I87f9e62e0f3b479f94e43daa3e9695a5b38710db (cherry picked from commit 689f63770048589e1001ce99faf1d2eaf9780a80)
* | [RenderScript] Interrupt mMessageThread when tearing down context.Miao Wang2016-05-101-0/+3
| | | | | | | | | | | | | | - Interrupt mMessageThread, so it gets to see immediately that mRun is false and exit rightaway. Change-Id: Ic586ef225a5c6f3a77f89de00b7fb3f3547c9838
* | Made Element accessors thread-safeYang Ni2016-04-201-91/+91
| | | | | | | | | | | | Bug: 28177082 Change-Id: I8f3f2d8ce559e93cba29f8eedd5b95d1389deb23 (cherry picked from commit 33703f0c4e9b16bda5fd72e71d7d89359ee0db17)
* | Avoid destroying Device separatelyYang Ni2016-04-041-6/+2
| | | | | | | | | | | | | | | | | | | | Bug: 27983025 Device should be destroyed inside the destructor of the associated Context. Change-Id: I921a89974e1174f837349a89aef9b03efa4882f5 (cherry picked from commit 4a70df58a32591429ec04902deac2b2210fb96c3)
* | Correctly init code cache path for RSYang Ni2016-03-181-5/+22
|/ | | | | | | | | | | | | | | | Bug: 27439261 Script Group needs to know the code cache path before it can call bcc to merge kernels. However, before this change, the code cache path has been initialized by the ScriptC class. In the case where a script group (or even the entire app) does not contain any regular script but only intrinsics, the code cache would remain uninitialized. Fixed this by initializing the code cache path in the RenderScript class the first time when the accessor method is called. Change-Id: I87f9e62e0f3b479f94e43daa3e9695a5b38710db
* Merge "Remove the CREATE_FLAG_OPT_LEVEL_0 from the Java API."Stephen Hines2016-01-301-8/+1
|\
| * Remove the CREATE_FLAG_OPT_LEVEL_0 from the Java API.Stephen McGroarty2015-09-021-8/+1
| | | | | | | | | | | | | | | | | | | | | | The flag was previously used to set the optimization level of the bcc compiler to -O0. However, this functionality is now accomplished through deriving the optimization level from the input bitcode. That patch can be found here: https://android-review.googlesource.com/169330 Change-Id: I9c57d941bb35c6f737a31fcd74f31d9de25a16a8 Signed-off-by: Stephen McGroarty <stephen@codeplay.com>
* | [RenderScript] Implement APIs for better multi-frame process support.Miao Wang2016-01-261-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 23535524 Two APIs added for multiframe processing: - createAllocations(...): To create an array of Allocations sharing the same Type and Usage. For USAGE_IO_INPUT Allocations, they also share the same BufferQueue. - getTimeStamp(): API to retrieve the time stamp associated with the most recent buffer. Change-Id: I6b7b35d7dca5e87ee2f3db2ee17cb9cf824bcfe1
* | Merge "[RenderScript] Add API to map Allocation mallocptr to Java ByteBuffer"Miao Wang2016-01-261-3/+11
|\ \
| * | [RenderScript] Add API to map Allocation mallocptr to Java ByteBufferMiao Wang2016-01-251-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 25926361 Bug: 23535524 - Construct the ByteBuffer using the AllocationGetPointer. - Add an API to query the stride of the allocation. - Both ByteBuffer and Stride will be cached for normal Allocations. if using USAGE_IO, since after each ioReceive, the mallocPtr will change, getByteBuffer will always create a new one using the most up-to-date mallocPtr. Change-Id: I5e84b6690e83bb062c383043275524d0e51e46eb
* | | Add general reduction plumbing starting with Java Script::reduce().David Gross2016-01-151-0/+8
|/ / | | | | | | | | | | | | Requires coordinated change in frameworks/rs. Bug: 23535724 Change-Id: I2fee6750cf542948d8fa87a98441002c4d84f36e
* | am 46b51097: Merge "Safely handle interrupts during Thread.join()"Pirama Arumuga Nainar2015-10-051-3/+8
|\ \ | | | | | | | | | | | | * commit '46b51097b92900866ac5b25762f622d3ceb1be5d': Safely handle interrupts during Thread.join()
| * | Safely handle interrupts during Thread.join()Pirama Arumuga Nainar2015-10-051-3/+8
| | | | | | | | | | | | | | | | | | | | | Interrupt current thread if InterruptedException is received during Thread.join(). Also, log the interruption. Change-Id: I452124915ea3f19610e6d4a3411d741f2f604af2
* | | am ca3e5aea: Merge "Retry if interrupted before mMessageThread has joined"Pirama Arumuga Nainar2015-10-021-3/+10
|\| | | | | | | | | | | | | | * commit 'ca3e5aeaa65ae1d77ce92f082ab789933eb18237': Retry if interrupted before mMessageThread has joined
| * | Retry if interrupted before mMessageThread has joinedPirama Arumuga Nainar2015-10-021-3/+10
| |/ | | | | | | | | | | | | | | | | | | | | Bug: 24342101 If interrupted during mMessageThread.join(), retry the join instead of assuming the thread has joined and continuing. Continuing to destroy the context will cause a segfault when the message thread attempts to use the destroyed context. Change-Id: I3213091a0e996449bceb403dffca3063786d5a65
* | am ed3ffe0f: am 6430812a: Merge "RenderScript: implement a Script entry ↵Stephen Hines2015-07-231-0/+10
|\| | | | | | | | | | | | | point for calling a reduce-style kernel." * commit 'ed3ffe0fc86de016ff2b4231e2fcc74a6119f6c7': RenderScript: implement a Script entry point for calling a reduce-style kernel.
| * RenderScript: implement a Script entry point for calling aMatt Wala2015-07-211-0/+10
| | | | | | | | | | | | | | | | | | | | | | reduce-style kernel. Bug: 22631253 This adds a new (currently hidden) API to the Script class and the corresponding code for the RenderScript JNI layer. Change-Id: I40f19aaeb90411b859bd6b0bffc3f071fa327c21
* | am 0f5b7bc2: am 79a1bde2: Merge "Add a flag to the API to specify -O0 on the ↵Stephen Hines2015-07-171-1/+10
|\| | | | | | | | | | | | | bcc command line." * commit '0f5b7bc2fe2ae554ab1f044eb5b10aab5f4812cb': Add a flag to the API to specify -O0 on the bcc command line.
| * Add a flag to the API to specify -O0 on the bcc command line.verena beckham2015-07-161-1/+10
| | | | | | | | | | | | | | | | Add a flag CREATE_FLAG_OPT_LEVEL_0 to set the optimization level to 0 when calling bcc. This will result in an object file that is easier to debug. Change-Id: I0384dca098fa0d9ae0f2e02e798da9de342c1122 Signed-off-by: verena beckham <verena@codeplay.com>
* | am 95e31ac8: am 3385b616: Merge "Added in flag to ask context to wait for ↵Stephen Hines2015-05-211-1/+8
|\| | | | | | | | | | | | | debugger attach." * commit '95e31ac85d4ba0b7dfb087f8bc0a10e4065ca8cd': Added in flag to ask context to wait for debugger attach.
| * Added in flag to ask context to wait for debugger attach.Stephen McGroarty2015-05-141-1/+8
| | | | | | | | | | | | | | | | | | Adds in flag CREATE_FLAG_WAIT_FOR_ATTACH with value 0x0008 to the RenderScript API to be passed down to the C++ implementation to tell it to wait for a debugger to be attached before executing the kernel. Change-Id: Ibc4e903efbed1b1fb14cf378d1a8517d5c8d1f26 Signed-off-by: Stephen McGroarty <stephen@codeplay.com>
| * Sanity checks in JNI code for closure creationYang Ni2015-05-011-3/+15
| | | | | | | | | | | | | | | | | | b/20728113 In case the requested size for memory allocation overflows, or memory allocation fails. Change-Id: I8dac132dd4d0210938660ffbb82cbe44000d2a90
* | [RenderScript] Add dummy getMinorID to maintain compatible with old RSMiao Wang2015-05-141-0/+14
| | | | | | | | | | | | | | compat lib. bug: 21132592 Change-Id: I375f188dfbd33367a9589533aa51b182fda8bc21
* | Fix API name based on API reviewJason Sams2015-05-121-3/+3
| | | | | | | | | | | | | | | | rename getMinorID to getMinorVersion bug 21039492 Change-Id: I03908dba508e30a605818d81a085ad627fa202fb
* | Sanity checks in JNI code for closure creationYang Ni2015-05-041-3/+15
| | | | | | | | | | | | | | | | | | | | b/20728113 In case the requested size for memory allocation overflows, or memory allocation fails. Change-Id: I8dac132dd4d0210938660ffbb82cbe44000d2a90 (cherry picked from commit 4e90b9b57cc96964a9d5c1845172a72cb51feafb)
* | am 3d9c9093: am 91d2f27b: am 7f72f747: Merge "Add BNNM intrinsic."Tim Murray2015-04-151-0/+11
|\| | | | | | | | | * commit '3d9c9093d1d76d4aeb5f99b1746b65788c72736e': Add BNNM intrinsic.
| * Merge "Add BNNM intrinsic."Tim Murray2015-04-151-0/+11
| |\
| | * Add BNNM intrinsic.Tim Murray2015-04-141-0/+11
| | | | | | | | | | | | Change-Id: I05fc9835786455e28d69f2b4ffe70c3292a01404
* | | am 09339053: am 6ca1e45a: am 8704ae46: Merge "Add name to ↵Yang Ni2015-04-141-3/+5
|\| | | | | | | | | | | | | | | | | | | | ScriptGroup2.Builder.create() method" * commit '0933905375790eb850334b53fd6d0981bd40e007': Add name to ScriptGroup2.Builder.create() method
| * | Add name to ScriptGroup2.Builder.create() methodYang Ni2015-04-131-3/+5
| |/ | | | | | | | | | | | | This name will be used to name the .so file generated for the script group with fused kernels. Change-Id: I46e351c8412740512f56b7915b14f36183c6eeaf
* | am 72fcf9eb: am af61d43d: am 6d718c2f: Merge "Add support for setting the ↵Tim Murray2015-04-101-0/+14
|\| | | | | | | | | | | | | cache directory." * commit '72fcf9eb1079312afd7bdbee167c759109af4244': Add support for setting the cache directory.
| * Add support for setting the cache directory.Tim Murray2015-04-091-0/+14
| | | | | | | | Change-Id: I2bf1874705b877a8a8262ab49b47fe8241e603d5
* | resolved conflicts for merge of 764f08ad to masterStephen Hines2015-04-071-20/+0
|\| | | | | | | Change-Id: I0a22225b2d26b6d806de2dcc70ffba29c96865b3
| * Move cache dir to its own class.Tim Murray2015-04-071-20/+0
| | | | | | | | | | | | This prevents us from loading the RS static initializer all the time. Change-Id: I8cea7540e50251aba8c2f199f06f344f991e7d7f
* | unhide RS apisJason Sams2015-03-301-7/+3
| | | | | | | | Change-Id: I30c3349c9222765ad7850890e0431bc6a6d3757a