480 Commits

Author SHA1 Message Date
Adam Lesinski
1187590da3 Replace AssetManager with AssetManager2 implementation
Test: atest CtsContentTestCases:android.content.res.cts
Test: make libandroidfw_tests
Change-Id: I2bb6d7656d2516d371e83e541ed02f91405f6d94
2018-02-05 18:38:49 -08:00
Adam Lesinski
f7d01dd7e1 Revert "Replace AssetManager with AssetManager2 implementation"
This reverts commit dcb3c6559b09ec89771858ec27a787027da9af50.

Bug:72511998
Change-Id: I665966ca109f66f85d8665db388c71ea2303c3b8
2018-01-25 17:39:40 -08:00
Adam Lesinski
dcb3c6559b Replace AssetManager with AssetManager2 implementation
Test: atest CtsContentTestCases:android.content.res.cts
Test: make libandroidfw_tests
Change-Id: I572eb13c6a4372c7f656f5912821cececd5bf3d4
2018-01-24 15:19:04 -08:00
Adam Lesinski
7fb3831136 Revert "Replace AssetManager with AssetManager2 implementation"
This reverts commit b20a0ce59f59cb5ec857748e056cc341dbd13b92.
2018-01-23 03:17:26 -08:00
Adam Lesinski
b20a0ce59f Replace AssetManager with AssetManager2 implementation
Test: Existing CTS tests pass
Test: make libandroidfw_tests
Change-Id: I858f7e1d909c08273b096601136e3f28e15eb5d4
2018-01-09 16:28:58 -08:00
Mike Reed
7569de0f90 switch to new API for compute image size
Test: make

Change-Id: Ie3a5d068bef1c2a1790ab227f6398695aee11cf7
2017-10-06 16:25:55 -04:00
Derek Sollenberger
71b36912e0 Merge "Reduce overhead by combining libskia and libhwui into a single library." 2017-09-25 15:45:34 +00:00
Derek Sollenberger
d938e5a2e2 Reduce overhead by combining libskia and libhwui into a single library.
This is a multiproject change as we need to both the libraries
themselves as well as those that had dependencies on libskia.so

Bug: 31971097
Test: compile only
Change-Id: Ie6ff1f4682d03289205f4d6048cde9f95c61a90f
2017-07-24 09:42:07 -04:00
Steven Moreland
9f430b2782 Merge "frameworks/base: use proper nativehelper headers" am: 826eafd958 am: 5c091dc944
am: c840945a78

Change-Id: I654e14f0d1b495450db81592a2e564e308746350
2017-07-20 03:05:02 +00:00
Steven Moreland
5c091dc944 Merge "frameworks/base: use proper nativehelper headers"
am: 826eafd958

Change-Id: I36f10ff4d963284a313f1cc5b368f82549a4adb2
2017-07-20 02:50:53 +00:00
Steven Moreland
2279b25342 frameworks/base: use proper nativehelper headers
libnativehelper exports headers under nativehelper. These were
available before incorrectly as global headers in order to give
access to jni.h.

Test: modules using frameworks/base find headers
Bug: 63762847
Change-Id: I0f9f231acdebe460f279135462f43d3e32eff64d
2017-07-19 10:06:40 -07:00
Yang Ni
532a67c464 Merge "Do not CloseGuard KernelID or FieldID" am: 6b70eafae1 am: d25acf1022
am: 1b74e324f6

Change-Id: I1220dcc0ee27b8ba5650bf78cf9e8574b16e3486
2017-06-13 22:29:12 +00:00
Yang Ni
1b74e324f6 Merge "Do not CloseGuard KernelID or FieldID" am: 6b70eafae1
am: d25acf1022

Change-Id: I900b48f94fdbdd1f502de36e3f121f472ea1daf8
2017-06-13 22:18:51 +00:00
Treehugger Robot
6b70eafae1 Merge "Do not CloseGuard KernelID or FieldID" 2017-06-13 21:49:49 +00:00
Yang Ni
3a84a23f36 Do not CloseGuard KernelID or FieldID
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
2017-06-13 19:41:55 +00:00
Yang Ni
25f6c69fbb Merge "Destroy Allocation right away on exception" am: 52bc790f61 am: a37bef769a am: fd9f091995
am: 26a5164479

Change-Id: I5017653d4a19b6a0e111f5ae5f0905cf7a5e7d2c
2017-05-08 16:22:04 +00:00
Yang Ni
26a5164479 Merge "Destroy Allocation right away on exception" am: 52bc790f61 am: a37bef769a
am: fd9f091995

Change-Id: Ie83694e722af77c7fc324b8b850e4308f093ab04
2017-05-08 16:12:37 +00:00
Yang Ni
c48a09cce8 Destroy Allocation right away on exception
Bug: 28053584

To avoid holding the resource (surface) for too long.

Test: CTS on x86_64 emulator
Change-Id: I2fdec107c2a16b7dadbf78a9aee79c33423a3676
2017-05-05 15:32:34 +00:00
Yang Ni
674f774176 Merge "Destroy Allocation with ScriptIntrinsicLut" am: 622b140f94 am: 088eca8302 am: 43dca4780f
am: a21bcbff08

Change-Id: Iad951014bb6c3c08a9fcb280bc263a51dc8e6705
2017-05-04 19:14:48 +00:00
Yang Ni
a21bcbff08 Merge "Destroy Allocation with ScriptIntrinsicLut" am: 622b140f94 am: 088eca8302
am: 43dca4780f

Change-Id: Ic180a772a7131e32987364d01581b0333315b798
2017-05-04 19:08:27 +00:00
Yang Ni
8b8f75a700 Destroy Allocation with ScriptIntrinsicLut
Bug: 28053584

On destroying the intrinsic, destroy its contained Allocation right away.

Test: CTS on x86_64 emulator
Change-Id: I5ca0da33b620c3291b7cafda31a6cc83eb7461a0
2017-05-04 18:44:17 +00:00
Steven Moreland
c941fb0f1a RenderScript: IWYU
Renderscript was depending on macros from android-base that were
transitively included from MQDescriptor.h

Test: links
Bug: 37791060
Change-Id: Ie34ddef67328c5fcc6b0122a32725b980615ff43
(cherry picked from commit dc01e938c2550390a540311b22e3e6c7603ed975)
2017-05-02 19:04:08 +00:00
Steven Moreland
dc01e938c2 RenderScript: IWYU
Renderscript was depending on macros from android-base that were
transitively included from MQDescriptor.h

Test: links
Bug: 37791060
Change-Id: Ie34ddef67328c5fcc6b0122a32725b980615ff43
2017-05-01 12:56:08 -07:00
Yang Ni
2d5664f68b Merge "Validates Intrinsic Blur only takes 2D Allocations" am: b44f4d2f51 am: 0962a6e83c am: cfe40aa165
am: 5be70d014b

Change-Id: Ie79dfe42049354c3bb60de9e9987fc8c75167f30
2017-04-20 23:04:07 +00:00
Yang Ni
5be70d014b Merge "Validates Intrinsic Blur only takes 2D Allocations" am: b44f4d2f51 am: 0962a6e83c
am: cfe40aa165

Change-Id: I7f191c2da99f310b4af599ab4849daeb90eb7497
2017-04-20 22:58:37 +00:00
Yang Ni
bb671376ff Validates Intrinsic Blur only takes 2D Allocations
Bug: 24555166

Test: RSTest on x86_64 emulator
Change-Id: I0c8c970ce85989c3213fb4986e517ac0be5beb26
2017-04-18 15:43:08 -07:00
Mike Reed
7c0ae0f58b bitmaps and pixelrefs no longer need lock/unlock
Test: covered by CtsGraphicsTestCases and hwui_unit_tests

Change-Id: I42a25961a2eb3755d2fd22a617aa21a24ec0994f
2017-04-18 10:22:42 -04:00
Miao Wang
f35ddc9843 [RenderScript] Connect ANativeWindow to BufferQueue before calling
AllocationSetSurface.

Bug: 34334222
Test: mm, boot Sailfish, CTS pass and ImageProcessingJB works well.
Change-Id: I77e7fb69987a347862286299622343b4f7879ab0
2017-04-04 05:59:19 +00:00
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