452 Commits

Author SHA1 Message Date
Pawin Vongmasa
34cca21eac Make IGraphicBufferProducer a hybrid interface.
android::IGraphicBufferProducer will now become a hybrid
interface on
top of the HIDL interface
android::hardware::graphics::bufferqueue::V1_0::IGraphicBufferProducer.

Test: With CtsMediaTestCases.apk installed,
adb shell am instrument -e size small -w
'android.media.cts/android.support.test.runner.AndroidJUnitRunner'

Bug: 33854657
Change-Id: Ia8914ea49d2acf3d43682982a164d7e10f7b8542
2017-03-14 18:45:26 -07:00
Miao Wang
db889edb1d Merge changes from topic 'USAGE_IO_INPUT'
am: 70fac233fa

Change-Id: I3f8db9b25a8ccee8ddb596baf5e54a268747de9f
2017-03-09 20:51:50 +00:00
Miao Wang
483a424903 [RenderScript] Use ANativeWindow_fromSurface to get ANativeWindow from Java Surface.
am: 33287e8a89

Change-Id: Iffd2de04c50f07806063543abe9cd359ce48b6df
2017-03-09 20:50:38 +00:00
Miao Wang
70fac233fa Merge changes from topic 'USAGE_IO_INPUT'
* changes:
  [RenderScript] Update RenderScript JNI with the corresponding AllocationGetSurface driver implementation change.
  [RenderScript] Use ANativeWindow_fromSurface to get ANativeWindow from Java Surface.
2017-03-09 20:38:49 +00:00
Yang Ni
25684ceff5 Merge "Removed close guards for Element and Type objects"
am: 97c9b57cec

Change-Id: I28b4149b6a0ace42dff2ca4ce9a1803b0baa4430
2017-03-07 00:36:19 +00:00
Miao Wang
1e95fc8658 [RenderScript] Update RenderScript JNI with the corresponding
AllocationGetSurface driver implementation change.

 - AllocationGetSurface now returns opaque handle to ANativeWindow*,
 instead of IGraphicBufferProducer*, as IGraphicBufferProducer is not
 part of NDK. So the JNI side need to change accordingly.

Bug: 34396220
Test: mm, CTS tests pass.
Change-Id: If9b6a733202d29bc40c0e0b87c4fb48db092cbe5
2017-03-06 10:03:30 -08:00
Miao Wang
33287e8a89 [RenderScript] Use ANativeWindow_fromSurface to get ANativeWindow
from Java Surface.

 - ANativeWindow_fromSurface and ANativeWindow_release has to be used in
 pairs to avoid leaks.

Bug: 34396220
Test: mm, CTS tests pass.
Change-Id: Id67fd005a056df4d496a48f705d445a2d8c45232
2017-03-06 09:59:06 -08:00
Yang Ni
45438c9402 Removed close guards for Element and Type objects
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
2017-03-03 10:44:30 -08:00
Miao Wang
76535e8888 Merge "Update RenderScript JNI code for Treble"
am: 9017b25631

Change-Id: I0cc281a372ec83d3731a83b0af5cc3a02b259a67
2017-02-24 05:47:35 +00:00
Miao Wang
cbb0206cb4 Update RenderScript JNI code for Treble
- Include rsApiStubs.h instead of rs.h, and remove unused
  dependencies for rs.h in Android.mk.
  - Remove libRSDriver.so from LOCAL_REQUIRED_MODULE, since it is not
  required nor directly used by librs_jni.so.
  - Fix the discrepancy in ElementGetNativeData and
  ElementGetSubElements, respective to NDK APIs exposed in libRS.so.

  rsApiStubs.h contains all public RenderScript APIs exposed in libRS.so.
  It fixes the mismatch of the declarations and definitions of the two
  functions mentioned above. And it does not rely on the auto generated
  header (rsgApiFuncDecl.h) anymore.

Bug: 34396220
Test: mm
Merged-In: Iedb1b976cfa9033dccefe78cbe80c8022f990e53
Change-Id: Iedb1b976cfa9033dccefe78cbe80c8022f990e53
2017-02-23 19:39:43 -08:00
Elliot Waite
28ba4722a9 Fix @links in reference docs. am: 54de77470d
am: ab978c035e

Change-Id: If0d0613362e0ea95cf48eaf9a16d3eea48b589ea
2017-01-26 04:39:57 +00:00
Elliot Waite
54de77470d Fix @links in reference docs.
Change-Id: I40cea46efd80c448640ff69753698fe8404da40b
2017-01-25 17:00:55 -08:00
Treehugger Robot
66f15cc01b Merge "Rely on the platform -std default." 2016-10-08 21:45:16 +00:00
Elliott Hughes
c08e32e0be Rely on the platform -std default.
Bug: http://b/32019064
Test: builds
Change-Id: I7180f1eb539ff8cbe33832d010775f053a922946
2016-10-07 15:57:17 -07:00
Miao Wang
166b402861 Correctly pass number of input allocations for BLAS
Bug: 31992305

Test: Build and CTS RsBlas test pass on Angler.
Change-Id: If49c0be003d9c2a2175924dc3303703b9ab49357
(cherry picked from commit b742fcc808165fbeeb1a48761e7d629f60207de2)
2016-10-07 19:21:07 +00:00
Miao Wang
b742fcc808 Correctly pass number of input allocations for BLAS
Bug: 31992305

Test: Build and CTS RsBlas test pass on Angler.
Change-Id: If49c0be003d9c2a2175924dc3303703b9ab49357
2016-10-06 10:45:42 -07:00
David Gross
8e988ec8d8 Merge \"Delete simple reduction implementation.\" into nyc-dev
am: d749245b88

Change-Id: I28a4e52a41678ecb10b0869566e1cb79d4287b60
2016-06-13 22:12:48 +00:00
David Gross
4a4578530a Delete simple reduction implementation.
Bug: 27298560
Change-Id: I8a89c9df753d12ee8af06008d424e77bb916cd8f
2016-06-02 14:47:12 -07:00
Miao Wang
35927794fc Merge "[RenderScript] Fix ScriptIntrinsicBlur documentation." into nyc-dev
am: 75445fd6a0

* commit '75445fd6a043a892bb7d7f18c1d62c5f72337413':
  [RenderScript] Fix ScriptIntrinsicBlur documentation.

Change-Id: I8ccd115fd6f92ef4b4ef7194a77fd01ffbda5916
2016-05-19 22:24:27 +00:00
Miao Wang
7ae30e18a4 Merge "Update documentation about copyTo and copyFrom." into nyc-dev
am: 1a523b7502

* commit '1a523b7502135a5cc0a94ea380263638b0ffdab1':
  Update documentation about copyTo and copyFrom.

Change-Id: I0aa87cd4bde408ba5395ae3f951d86e10ece58de
2016-05-19 22:24:21 +00:00
Miao Wang
c242fa6b5d [RenderScript] Fix ScriptIntrinsicBlur documentation.
Bug: 28177406
Change-Id: Icccf35857cf29f827a78704e7751c8791cda0d7b
2016-05-18 16:28:55 -07:00
Miao Wang
3231e8e022 Update documentation about copyTo and copyFrom.
Bug: 23159764
Bug: 26862970

  - Add detailed description of AutoPadding
  - Add comments to all the copy related APIs.
  - Fix typos in the comments.

Change-Id: I2d045e0d90efd94f1407f88d3e35bcd42ea93fb9
2016-05-18 16:28:47 -07:00
Miao Wang
e41611d7ab Merge "[RenderScript] Interrupt mMessageThread when tearing down context." am: 9f2a1979a7
am: b02f7b0a0e

* commit 'b02f7b0a0e17ac97184e113ea527145a302f8bbc':
  [RenderScript] Interrupt mMessageThread when tearing down context.

Change-Id: Icc19c3d04f3b33f928ef6f61b4a42471d51736b5
2016-05-11 19:32:00 +00:00
Miao Wang
4a574806e6 [RenderScript] Interrupt mMessageThread when tearing down context.
- Interrupt mMessageThread, so it gets to see immediately
    that mRun is false and exit rightaway.

Change-Id: Ic586ef225a5c6f3a77f89de00b7fb3f3547c9838
2016-05-10 16:48:25 -07:00
Yang Ni
888017db77 Merge "Fixed BaseObj finalizer and destroy()" into nyc-dev
am: 8ca7638

* commit '8ca763803d8960ddc9f6c498c3294e69aac0f7cf':
  Fixed BaseObj finalizer and destroy()

Change-Id: Id607034269102c84d673b7148beb0b050121e0bc
2016-04-22 19:52:18 +00:00
Yang Ni
1b4df1697f Fixed BaseObj finalizer and destroy()
Bug: 28242626
Bug: 27972184
Bug: 27973681

This is resolving issues in ScriptGroup (V1) again.
In ScriptGroup.destroy(), we also need to consider the old API where
mClosures is not initialized.

Also cleaned up the finalizer for ScriptGroup and Allocation:
Since BaseObj.finalize() calls BaseObj.helpDestroy(), instead of
BaseObj.destroy(), there is no possibility that the finalizers of
child objects may race their parents finalizers. Note that
helpDestroy() does not try to recurse on child objects.

Change-Id: I9dbb2b60f8478f656f8a418c2b5fc8d6848aeef0
2016-04-22 10:21:18 -07:00
Yang Ni
f17e491517 Merge "Made Element accessors thread-safe" am: acd0061
am: 3c207ff

* commit '3c207ff5af7c4f0a9d9cafa6c6f5c947cfdb78ca':
  Made Element accessors thread-safe

Change-Id: I5bc65b3b28c328081335a04ce15864a6dd072543
2016-04-20 18:23:58 +00:00
Yang Ni
acd0061f90 Merge "Made Element accessors thread-safe" 2016-04-20 18:14:08 +00:00
Yang Ni
6bdfe0fc5c Made Element accessors thread-safe
Bug: 28177082
Change-Id: I8f3f2d8ce559e93cba29f8eedd5b95d1389deb23
(cherry picked from commit 33703f0c4e9b16bda5fd72e71d7d89359ee0db17)
2016-04-20 09:49:36 -07:00
Yang Ni
c74d2a8b87 Merge "Made Element accessors thread-safe" into nyc-dev 2016-04-20 16:44:39 +00:00
Yang Ni
e04e5d7cc0 Fixed ScriptGroup finalizer for old API
Bug: 28242626

ScriptGroup finalizer clears out the list of closures, which is
uninitialized for the old API.

Need to check null first, before accessing the list.

Change-Id: Ibf914e17a0878c8c561f823c5f6f6f6619594de1
(cherry picked from commit 07837d6dab331b1693aa3689223b4012012a7fad)
2016-04-19 09:46:47 -07:00
Yang Ni
33703f0c4e Made Element accessors thread-safe
Bug: 28177082
Change-Id: I8f3f2d8ce559e93cba29f8eedd5b95d1389deb23
2016-04-18 17:25:58 -07:00
Yang Ni
82ed817c43 Merge "Fixed ScriptGroup finalizer for old API" into nyc-dev
am: ecf094a

* commit 'ecf094ae9d715ac3cff6213fae4c904f9dd791e8':
  Fixed ScriptGroup finalizer for old API

Change-Id: Ia673958b883634197077b69aebd8af293088fef0
2016-04-18 23:38:14 +00:00
Yang Ni
07837d6dab Fixed ScriptGroup finalizer for old API
Bug: 28242626

ScriptGroup finalizer clears out the list of closures, which is
uninitialized for the old API.

Need to check null first, before accessing the list.

Change-Id: Ibf914e17a0878c8c561f823c5f6f6f6619594de1
2016-04-18 14:27:02 -07:00
Yang Ni
0f10f043be Merge "Destroy Type created by Allocation.createSized()" into nyc-dev 2016-04-12 23:37:01 +00:00
Yang Ni
dadd35d5d7 Merge "Destroy Type created by Allocation.createSized()" am: 2a64e23
am: cc24885

* commit 'cc248853c361588eb5429aee5921acbcc1900c8a':
  Destroy Type created by Allocation.createSized()

Change-Id: Ic79bbf7fbf1a3f9d8f49fdb3a3950b0383bc4dcb
2016-04-12 22:18:26 +00:00
Yang Ni
e1798e4284 Destroy Type created by Allocation.createSized()
Bug: 27972184
Change-Id: I4f80c74079087eab20b75a701c56cde141322462
(cherry picked from commit 3444dbe025ad78cae9fd77a4d2203a1a806ae1af)
2016-04-12 15:11:31 -07:00
Yang Ni
2a64e23857 Merge "Destroy Type created by Allocation.createSized()" 2016-04-12 22:07:56 +00:00
Yang Ni
9101274f91 Merge "Destroy Closures in ScriptGroup" am: 01db883
am: 122c39a

* commit '122c39ab82a3e027d0e46e26bb09ac4e5e480842':
  Destroy Closures in ScriptGroup

Change-Id: I9b03e2ae8ec80250686afc9ac9f39d294e5f9b5d
2016-04-12 16:18:15 +00:00
Yang Ni
44d1b3bfba Destroy Closures in ScriptGroup
Bug: 27973681

Implemented correct destruction in ScriptGroup.destroy() and
Clsoure.destroy(), which properly destroys child BaseObj's.

Change-Id: I946f62c2979d6a338b8883514cacad472a213c5c
(cherry picked from commit 44e2f45f0cab4a429e59f07c1e5bf0eef08c7819)
2016-04-12 09:01:44 -07:00
Yang Ni
01db88335d Merge "Destroy Closures in ScriptGroup" 2016-04-12 16:00:47 +00:00
Yang Ni
3444dbe025 Destroy Type created by Allocation.createSized()
Bug: 27972184
Change-Id: I4f80c74079087eab20b75a701c56cde141322462
2016-04-11 17:31:39 -07:00
Stephen Hines
2f737b531d Merge "Fix typos for the word "Unsupported"." am: 9e57114
am: 1dd551b

* commit '1dd551b019bbbb3a6a61b1a462b63e57e31a5b98':
  Fix typos for the word "Unsupported".

Change-Id: I80a9d5f8504e1e2a14595e26fce7079ee490f06e
2016-04-11 22:06:49 +00:00
Stephen Hines
ad57e330ba Fix typos for the word "Unsupported".
Bug: https://code.google.com/p/android/issues/detail?id=206490
Change-Id: Ie1b2c2b0960d8dd8c12ed06d84a16913cd057221
2016-04-11 13:05:55 -07:00
Yang Ni
44e2f45f0c Destroy Closures in ScriptGroup
Bug: 27973681

Implemented correct destruction in ScriptGroup.destroy() and
Clsoure.destroy(), which properly destroys child BaseObj's.

Change-Id: I946f62c2979d6a338b8883514cacad472a213c5c
2016-04-07 13:00:30 -07:00
Yang Ni
cb939dc4fc Avoid destroying Device separately
Bug: 27983025

Device should be destroyed inside the destructor of the associated
Context.

Change-Id: I921a89974e1174f837349a89aef9b03efa4882f5
(cherry picked from commit 4a70df58a32591429ec04902deac2b2210fb96c3)
2016-04-04 18:00:03 -07:00
Yang Ni
af2ac8e2bc Merge "Avoid destroying Device separately" into nyc-dev
am: 1418269

* commit '14182697bbaeee70fd78bd12e8e7d87254415eae':
  Avoid destroying Device separately

Change-Id: Iecd5d3b1288dfab8a3713b8b54180e6e6d0de3d8
2016-04-05 00:55:37 +00:00
Yang Ni
4a70df58a3 Avoid destroying Device separately
Bug: 27983025

Device should be destroyed inside the destructor of the associated
Context.

Change-Id: I921a89974e1174f837349a89aef9b03efa4882f5
2016-04-04 10:23:57 -07:00
Yang Ni
7343f9ed40 Merge "Silence clang static analyzer warnings" am: 01e307d
am: 47e177d

* commit '47e177d9fc12c8d6e58e2a8e50fabbb23a75c83f':
  Silence clang static analyzer warnings

Change-Id: Icc11d6db8007c383da7a852eaabebe2b5e3484d8
2016-04-01 17:15:46 +00:00
Yang Ni
01e307d461 Merge "Silence clang static analyzer warnings" 2016-04-01 16:26:17 +00:00