Commit graph

379 commits

Author SHA1 Message Date
Chia-I Wu
b511645d99 graphics: make allocator default impl a static library
Convert the default impl into a static library,
android.hardware.graphics.allocator@2.0-passthrough.

Test: boots and VTS
Change-Id: I8ec8b30766462ecb3fb789af7c6dbb3c088ccf57
2018-01-14 21:39:38 -08:00
Chia-I Wu
d6daa8ddf9 graphics: add allocator HAL support library
Add a header-only library
android.hardware.graphics.allocator@2.0-hal that can be used by
implementations.  An imlpementation can

  class VendorHal : public AllocatorHal { ... };

  auto allocator = std::make_unique<Allocator>();
  allocator->init(std::make_unique<VendorHal>(...));

Or, if vendor extensions are to be added to the IAllocator,

  class AlocatorHalExt : public AllocatorHal { ... };
  class VendorHal : public AllocatorHalExt { ... };
  class AllocatorExt : public AllocatorImpl<IAllocatorExt, AllocatorHalExt> { ... };

  auto allocator = std::make_unique<AllocatorExt>();
  allocator->init(std::make_unique<VendorHal>(...));

Test: builds
Change-Id: I7cb7a4888316b871e5c49d96524b1642fc708f2d
2018-01-14 21:39:38 -08:00
Chia-I Wu
d6695d5bdc graphics: move libgralloc1-adapter
Move libgralloc1-adapter from 2.0/default/ to
2.0/utils/gralloc1-adapter/.  Fix build issues after the move.

Test: builds
Change-Id: I674fe60c724a4ffc1540c796b92209a1dbf36438
2018-01-14 21:39:38 -08:00
Lloyd Pique
2765f9d406 Fix crash on hotplug disconnect
ComposerClient destroys its internal model of the display while handling
the onHotPlug event from the Hwc. Subsequently SurfaceFlinger destroys
its model of the display, and destroys all Hwc layers associated with
the display.

This fixes the code for destroying layers to not dereference an invalid
iterator if the display does not exist, allowing destruction to
continue.

It also fixes a similar issue which could occur if a HWC layer is being
created for a display at around the same time as the disconnect event.

Test: hotplug disconnect no longer crashes
Bug: 38464421
Change-Id: I0f2d28fe89fccf997b4bbb9fa6b5c0e6a6e49b93
2018-01-11 13:04:50 -08:00
Chia-I Wu
e3c695c8e6 Merge "graphics: improve PRESENT_OR_VALIDATE_DISPLAY support" am: f43ab227a5 am: 8e1ec23a5d
am: a72e80eafa

Change-Id: I40e32ddcb9646f08e1cb0b7a0eaa137ea4b6b94b
2017-12-21 17:40:56 +00:00
Chia-I Wu
a72e80eafa Merge "graphics: improve PRESENT_OR_VALIDATE_DISPLAY support" am: f43ab227a5
am: 8e1ec23a5d

Change-Id: I856a4bfc708f34a331f83e1466e689a2fa5427b7
2017-12-21 07:30:24 +00:00
Chia-I Wu
8e1ec23a5d Merge "graphics: improve PRESENT_OR_VALIDATE_DISPLAY support"
am: f43ab227a5

Change-Id: Ief20e5b035a25b77fe714b0ace4d3d4fa543380d
2017-12-21 07:28:39 +00:00
Chia-I Wu
f43ab227a5 Merge "graphics: improve PRESENT_OR_VALIDATE_DISPLAY support" 2017-12-21 06:54:22 +00:00
Jiyong Park
e514a4b8a8 android.hardware.graphics.allocator@2.0 is no longer VNDK-SP
The interface lib has been in VNDK-SP because
android.hardware.graphics.mapper@1.0 was using it. However, since the
dependency has gone [1], there is no need keep it in VNDK-SP. The
VNDK-SP set should be kept as small as possible because libs in VNDK-SP
are subject to double-loading.

Unmark the 'support_system_process' property to exclude the lib from
VNDK-SP.

This commit re-lands I8722c1ac15ddf56a627a12a0c649b4d734e5e5cd because
it was reverted during O-MR1 push to AOSP-master.

Bug: 69480083
Test: walleye boots to the UI
Change-Id: I0af8115dceb9711c6c451ffaeedda6c823ec2905
Merged-In: I8722c1ac15ddf56a627a12a0c649b4d734e5e5cd
(cherry picked from commit ec44d18dbe)
2017-12-13 11:58:24 +08:00
Chia-I Wu
cdc287ba06 graphics: improve PRESENT_OR_VALIDATE_DISPLAY support
There is no cap defined for PRESENT_OR_VALIDATE_DISPLAY in HIDL so
it must always work.  Make sure it does not call HWC2 presentDisplay
when the underlying HWC2 does not support
HWC2_CAPABILITY_SKIP_VALIDATE.

Bug: 70407085
Test: boots
Change-Id: I54a4400e09e669c5064f05739f595ed978dcc713
2017-12-12 09:37:19 -08:00
Steven Moreland
e5c6548346 Remove subdirs
Removing whenever I see these in code reviews.

Test: none
Merged-In: I4322f533a837d55618ec2ed2125e8966ace9d61d
Change-Id: I4322f533a837d55618ec2ed2125e8966ace9d61d
2017-11-28 14:23:43 -08:00
Steven Moreland
8b76a6b90d Remove subdirs
Removing whenever I see these in code reviews.

Test: none
Merged-In: I4322f533a837d55618ec2ed2125e8966ace9d61d
Change-Id: I4322f533a837d55618ec2ed2125e8966ace9d61d
2017-11-28 14:22:55 -08:00
Steven Moreland
fcca4e23b7 Remove subdirs
Removing whenever I see these in code reviews.

Test: none
Merged-In: I4322f533a837d55618ec2ed2125e8966ace9d61d
Change-Id: I4322f533a837d55618ec2ed2125e8966ace9d61d
2017-11-28 14:22:43 -08:00
Jiyong Park
ec44d18dbe android.hardware.graphics.allocator@2.0 is no longer VNDK-SP
The interface lib has been in VNDK-SP because
android.hardware.graphics.mapper@1.0 was using it. However, since the
dependency has gone [1], there is no need keep it in VNDK-SP. The
VNDK-SP set should be kept as small as possible because libs in VNDK-SP
are subject to double-loading.

Unmark the 'support_system_process' property to exclude the lib from
VNDK-SP.

Bug: 69480083
Test: walleye boots to the UI
Change-Id: I8722c1ac15ddf56a627a12a0c649b4d734e5e5cd
2017-11-21 10:45:29 +09:00
Zhuoyao Zhang
164cfb73d9 Convert GraphicsMapper Hal test to test against each of the service names. am: 94b11ca19f am: c8c5001b00
am: 3b9ea1cd62

Change-Id: I35fe24a6b990daf5244a276b250d22d034398461
2017-11-15 02:31:15 +00:00
Zhuoyao Zhang
3b9ea1cd62 Convert GraphicsMapper Hal test to test against each of the service names. am: 94b11ca19f
am: c8c5001b00

Change-Id: Iec2365f86d51388a2fdcb69eba35e8d746d1ba78
2017-11-15 01:47:25 +00:00
Zhuoyao Zhang
c8c5001b00 Convert GraphicsMapper Hal test to test against each of the service names.
am: 94b11ca19f

Change-Id: I067c835282bdd84571f3e57ab61073ed2fd54b15
2017-11-15 01:35:13 +00:00
Xin Li
bb9e38fef9 Merge commit '1a06284b24f5eb7bb9c1fea0817da8898b3b1bff' from
oc-mr1-dev-plus-aosp into stage-aosp-master

Change-Id: I2a044eb8c9981d0a8198ffe2df55559afbd76341
Merged-In: I4fb9f18884f7ef21162015a0032c4431444f7025
2017-11-14 12:08:38 -08:00
Zhuoyao Zhang
94b11ca19f Convert GraphicsMapper Hal test to test against each of the service
names.

Bug:64203181
Test: vts-tradefed run vts -m VtsHalGraphicsMapperV2_0Target
Change-Id: Icbef0f0575183033c069d8ec097ab774207c40de
2017-11-13 17:10:25 -08:00
Steven Moreland
c2f829a1d2 Updating makefiles for hidl_interface.
Bug: 64487114
Test: manual
Merged-In: Ie13d9e014cf2b81c18c67f551b4644fb9f0ba812
Change-Id: Ie13d9e014cf2b81c18c67f551b4644fb9f0ba812
2017-11-13 11:39:07 -08:00
Steven Moreland
8db261bc99 Updating makefiles for hidl_interface.
Bug: 64487114
Test: manual
Merged-In: Ie13d9e014cf2b81c18c67f551b4644fb9f0ba812
Change-Id: Ie13d9e014cf2b81c18c67f551b4644fb9f0ba812
2017-11-13 10:00:18 -08:00
Steven Moreland
a1169dd600 Update makefiles for hidl_interface.
Bug: 35570956
Test: manual
Change-Id: I7a220b78ee081240e1dc30ef5672ba39e3e98375
2017-11-10 09:06:55 -08:00
Chia-I Wu
d4bb253b18 graphics: add OWNERS file to default implementations am: e3b1836d90 am: d9c63996ce
am: eb4eba96c9

Change-Id: Ieef144876dfa608ddf34de391ce40e8fd8d6c7c4
2017-11-07 19:12:52 +00:00
Chia-I Wu
eb4eba96c9 graphics: add OWNERS file to default implementations am: e3b1836d90
am: d9c63996ce

Change-Id: I3b582fba337306fe2fb32b5b480ccef7d763a97d
2017-11-07 19:00:29 +00:00
Chia-I Wu
23dbc0f5ab graphics: support FB HAL using HWC2OnFbAdapter am: 16e8ed254d am: 20b073fe6c
am: 85ade632ce

Change-Id: I6f020f5fbe0ecd04d5115e1553169b23bf3d196f
2017-11-07 18:23:51 +00:00
Chia-I Wu
85ade632ce graphics: support FB HAL using HWC2OnFbAdapter am: 16e8ed254d
am: 20b073fe6c

Change-Id: I3e50c5f00b8385a33ff1d04622102ca041cc408d
2017-11-07 18:19:19 +00:00
Chia-I Wu
e051dcef99 graphics: require validateDisplay after onRefresh am: 8101b24ca7
am: a565609b83

Change-Id: I713f68f0b789acac0ab1340f1a2de9a514a8079d
2017-11-07 18:19:13 +00:00
Chia-I Wu
e3b1836d90 graphics: add OWNERS file to default implementations
Test: none
Change-Id: I76a3c84a1fcb61dffa4641ec2120e484752bdf5b
2017-11-07 08:53:12 -08:00
Chia-I Wu
16e8ed254d graphics: support FB HAL using HWC2OnFbAdapter
FB (framebuffer) HAL has been replaced by HWC HAL for 5+ years, but
we still support the legacy path in SurfaceFlinger.  Devices using
the legacy path cannot be Treblized.

This change allows such devices to use HIDL IComposer, by adding
support for FB HAL in the default implementation.

Test: boots hikey960
Change-Id: Ie9050bbcaac0fd5b134786f4f9f0f5075f4ebd0c
2017-11-06 15:08:07 -08:00
Chia-I Wu
8101b24ca7 graphics: require validateDisplay after onRefresh
After initialization or onRefresh, we want to make sure
validateDisplay is called before presentDisplay.

Bug: 67505273
Test: manual
Change-Id: Id876d9251586aaaf552ca82c52f8f902af364251
2017-11-06 15:08:07 -08:00
Steven Thomas
bc67a6a8fb Guard against racy ComposerClient reconnection
The hardware composer service has a rule that only one client can be
connected at a time. The surface flinger process, when transitioning
composer ownership from surface flinger to vr flinger, will destroy the
current client on one thread and create a new client on another
thread. Although surface flinger ensures that these events happen in the
expected sequence (delete then create), the requests sometimes land in
the hardware composer service in inverted order, causing the creation
request to fail with an error.

Instead of failing with an error, block for a brief period (1 second)
until the existing client is removed, then proceed to initialize the new
client. This gives us enough time to ensure an inverted
creation/destruction order doesn't cause client creation to fail, while
avoiding a deadlock if the existing client is never destroyed.

Bug: 62925812

Test: - Transitioned to/from vr flinger hundreds of times, and confirmed
I no longer see sporadic composer client creation failure due to an
already existing client.

- Ran the vts graphics composer tests and confirmed they all pass.

Change-Id: I40be1fb0cb3d42ddb5a9fc159188886e9f5b6267
2017-11-06 15:08:07 -08:00
Chia-I Wu
179aa67cfc Merge "graphics: require validateDisplay after onRefresh" 2017-10-26 04:45:04 +00:00
TreeHugger Robot
8b6afd52e2 Merge "graphics: early return in CommandWriterBase::writeQueue" 2017-10-24 23:50:29 +00:00
Steven Moreland
f390f03aa4 Update for Soong-only makefiles.
Test: pass
Bug: 33420795
Change-Id: Ibec6d1e38939b9e7566a96381439be2aac3bf8ca
2017-10-11 18:30:28 +00:00
Steven Moreland
1d7374c5e1 Update for Soong java makefiles. am: c3e80fa01e am: 0fff75dee1 am: 6c811964a1
am: 116161d94e

Change-Id: I33643636e2511de77fdf7de57777eb67edee2e52
2017-10-11 16:39:21 +00:00
Steven Moreland
116161d94e Update for Soong java makefiles. am: c3e80fa01e am: 0fff75dee1
am: 6c811964a1

Change-Id: I85ccbb4a15cd18938607f5bca4e065b9d7e0182b
2017-10-11 16:31:07 +00:00
Steven Moreland
0fff75dee1 Update for Soong java makefiles.
am: c3e80fa01e

Change-Id: Ia8835f9c95bd98a96f5fd3aff11191e7d3726fb9
2017-10-11 16:23:54 +00:00
Steven Moreland
c3e80fa01e Update for Soong java makefiles.
Test: pass
Bug: 33420795
Change-Id: Id9b1919a19b8ff682738cfb0869a479b4dbb4293
2017-10-10 23:07:20 +00:00
Chia-I Wu
1791e78820 graphics: early return in CommandWriterBase::writeQueue
When there is no data to be written, return early.

Bug: 67512553
Test: manual
Change-Id: I4e8dc72ec22293fac7a84b38c98e29d5cf7f78b6
2017-10-10 10:23:59 -07:00
Chia-I Wu
68b60c45fd graphics: require validateDisplay after onRefresh
After initialization or onRefresh, we want to make sure
validateDisplay is called before presentDisplay.

Bug: 67505273
Test: manual
Change-Id: Id876d9251586aaaf552ca82c52f8f902af364251
2017-10-06 12:40:53 -07:00
Steven Moreland
9b019ac4fe Merge "Remove useless Android.mk files." am: 75d5cf515a am: f27cfa15d7 am: 33dc30ce49
am: 0653f3b212

Change-Id: I7c2da3cf30da7b4a1eda7e5369e9caa5ebab2462
2017-10-05 21:52:50 +00:00
Steven Moreland
0653f3b212 Merge "Remove useless Android.mk files." am: 75d5cf515a am: f27cfa15d7
am: 33dc30ce49

Change-Id: Ia35d20e0fc1df6f7c46b5581537d7ed387965899
2017-10-05 21:51:13 +00:00
Steven Moreland
f27cfa15d7 Merge "Remove useless Android.mk files."
am: 75d5cf515a

Change-Id: I8c0918c4a787cc3f4c7c69f52737d3a0d9d64426
2017-10-05 21:44:26 +00:00
Treehugger Robot
75d5cf515a Merge "Remove useless Android.mk files." 2017-10-05 21:40:27 +00:00
Chia-I Wu
4eea85634f Merge "graphics: add IMapper@2.1" 2017-10-05 16:05:37 +00:00
Steven Moreland
4b60470f1a Remove useless Android.mk files.
These have been c/p'd all over the place.

Test: m -j nothing
Bug: 33420795
Change-Id: I77979866dbb2345a41a873c84ec3fccd7b127510
2017-10-04 15:52:40 -07:00
Steven Moreland
70bfb9d250 Merge "Update for hidl adapter module defaults." am: 988c977079 am: 861651985f am: b53e6ad535
am: 9a17f41f6f

Change-Id: I78d9292068b372238554fd9d35128e69f5b5f9d2
2017-10-04 21:54:11 +00:00
Steven Moreland
9a17f41f6f Merge "Update for hidl adapter module defaults." am: 988c977079 am: 861651985f
am: b53e6ad535

Change-Id: I23269fb7a9bdd352e670a80f390527d9eef31412
2017-10-04 21:51:00 +00:00
Steven Moreland
861651985f Merge "Update for hidl adapter module defaults."
am: 988c977079

Change-Id: I289818be1b30397391847ba1c532d1014fdbed27
2017-10-04 21:45:09 +00:00
Steven Moreland
527fd76a0e Update for hidl adapter module defaults.
Test: pass
Change-Id: Idc6a943149a279bf17cfcfd0f2571473e53bbbbf
2017-10-04 12:47:03 -07:00
Chia-I Wu
12b806bac0 graphics: add IMapper@2.1
Add necessary methods to protect the framework against crafted
buffer handles.

Bug: 62535446
Bug: 62084097
Bug: 32587089
Test: manual
Change-Id: I11486c0767a90788da9f84c2177202f26c0d9ce1
2017-10-03 15:41:18 -07:00
Steven Moreland
91799c6cc7 Merge "Fix typo in update makefiles." am: 9960148420 am: f07e364ce3 am: 71a193a425
am: 9fdd241905

Change-Id: I1c852fa6600fecc44d5afd1a65a5f51c43ecf71c
2017-09-27 00:02:52 +00:00
Steven Moreland
9fdd241905 Merge "Fix typo in update makefiles." am: 9960148420 am: f07e364ce3
am: 71a193a425

Change-Id: I45ae43f07323254212532acbf0f891d11143b05f
2017-09-26 23:58:51 +00:00
Steven Moreland
f07e364ce3 Merge "Fix typo in update makefiles."
am: 9960148420

Change-Id: I949634e72f817f3a5411130e968acd8efd1d7725
2017-09-26 23:51:07 +00:00
Steven Moreland
a5299ee739 Fix typo in update makefiles.
Bug: 37518178
Test: pass
Change-Id: Ic401b3a473f15ca4c01e58b3072e19db7c31b653
2017-09-26 21:59:43 +00:00
Steven Moreland
7741c0e17b Update makefiles for hidl adapter. am: 26a0bb2762 am: 73949c1d7e am: b94d0c7290
am: 97228c0b7d

Change-Id: Ic4b459b7c1a4325453945b0b00db8f44e4e77c26
2017-09-26 13:36:09 +00:00
Steven Moreland
97228c0b7d Update makefiles for hidl adapter. am: 26a0bb2762 am: 73949c1d7e
am: b94d0c7290

Change-Id: If766cffbcc003cc0cc5eb98969b924aa918fff44
2017-09-26 12:53:13 +00:00
Steven Moreland
73949c1d7e Update makefiles for hidl adapter.
am: 26a0bb2762

Change-Id: I3a811f5cd49bd4e81e8fcd5c8e88922115812539
2017-09-25 23:14:44 +00:00
Steven Moreland
26a0bb2762 Update makefiles for hidl adapter.
Bug: 37518178
Test: manual
Change-Id: I50e999907d3c64d2b039272b823971998da64d1b
2017-09-25 18:35:56 +00:00
Jaekyun Seok
81104ae5ef Add 'vendor.' prefix to a vendor HAL service name
To prevent property name collisions between properties of system and
vendor, 'vendor.' prefix must be added to a vendor HAL service name.
You can see the details in http://go/treble-sysprop-compatibility.

Test: succeeded building and tested on a walleye device
Bug: 36796459
Change-Id: I4e8fbee791ec917a8f627a1366f4d44ec7e6febc
2017-09-12 08:01:42 +09:00
Chia-I Wu
13570aaa2f Merge "graphics: discard stale data from message queue" into oc-mr1-dev am: 710b7085f9
am: 481885c52d

Change-Id: I4b9387e553c33c4e67768f3d9dba65b092e98914
2017-09-08 22:41:55 +00:00
Chia-I Wu
481885c52d Merge "graphics: discard stale data from message queue" into oc-mr1-dev
am: 710b7085f9

Change-Id: I2a2e69edf9e822b4bd44344163f79b7d036d95c3
2017-09-08 22:39:16 +00:00
Chia-I Wu
48ffe289b0 graphics: discard stale data from message queue
Our use of message queues is synchronous.  If there are already data
in the queue when writeQueue is called, we know they are stale and
can be discarded.

Bug: 65449888
Test: manual
Change-Id: Ie29b8a7386c9733c183a6c3569e3572efa62cbc2
2017-09-08 11:51:57 -07:00
Zhuoyao Zhang
3b77b81ead Merge "Fix VtsHalGraphicsComposerV2_1TargetTest" into oc-mr1-dev
am: 8d2d1d08a1

Change-Id: I88b1726621257074e9b4c3bc415d255d9fb3a74f
2017-09-05 18:54:22 +00:00
Zhuoyao Zhang
425e9672d5 Fix VtsHalGraphicsComposerV2_1TargetTest
Bug: 65252969
Test: make vts
Change-Id: Id4543b385ca9dce532bbf08ef206897924d66acb
2017-08-31 19:57:17 +00:00
Zhuoyao Zhang
4cf8cc0348 Merge "Update vts test to use the updated test template." into oc-mr1-dev
am: 69270ce30f

Change-Id: I6c34ee4d363c3d485abc8e71d938c1e3a98e6f51
2017-08-30 22:19:55 +00:00
Zhuoyao Zhang
6afb992759 Update vts test to use the updated test template.
* For registerTestService/getServiceName, no need to pass
  any hard coded string of HAL service FQName.
* Affect test: VtsHalCameraProviderV2_4TargetTest,
               VtsHalGraphicsComposerV2_1TargetTest,
               VtsHalNeuralnetworksV1_0TargetTest

Bug: 62946472
Bug: 64203181

Test: make vts
      vts-tradefed run vts -m VtsHalCameraProviderV2_4Target

Merged-In: If365ab2ed9a91eb4013d71769804b9d4bf089d66
Change-Id: Id0bddbc2949337147557f45cc60dbfaa114ce25e
(cherry picked from commit d71b654d6d)
2017-08-29 17:44:10 +00:00
Zhuoyao Zhang
a983b8fe62 Revert "Revert "Update vts test to use the updated test template.""
This reverts commit 43d7498d52.

Change-Id: If365ab2ed9a91eb4013d71769804b9d4bf089d66
2017-08-29 17:25:46 +00:00
Tony Mak
43d7498d52 Revert "Update vts test to use the updated test template."
This reverts commit d71b654d6d.

Reason for revert: It breaks some targets in master
                   Example error: https://android-build.googleplex.com/builds/submitted/4303994/sailfish-userdebug_fastbuild3_linux/latest/view/logs/build_error.log

Change-Id: I63a90318bde8869972a8fc4b9a2cc36db26037f5
2017-08-29 10:14:32 +00:00
Zhuoyao Zhang
d71b654d6d Update vts test to use the updated test template.
* For registerTestService/getServiceName, no need to pass
  any hard coded string of HAL service FQName.
* Affect test: VtsHalCameraProviderV2_4TargetTest,
               VtsHalGraphicsComposerV2_1TargetTest,
               VtsHalNeuralnetworksV1_0TargetTest

Bug: 62946472
Bug: 64203181

Test: make vts
      vts-tradefed run vts -m VtsHalCameraProviderV2_4Target

Change-Id: Id0bddbc2949337147557f45cc60dbfaa114ce25e
2017-08-28 18:45:12 +00:00
Zhuoyao Zhang
87fa1f78f0 Update VtsHalGraphicsComposerV2_1TargetTest
* Update to run against different service names.

Bug:38348289
Bug:64203181

Test: make vts
      vts-tradefed run vts -m VtsHalGraphicsComposerV2_1TargetTest

Change-Id: I7c4643935cf5f0ea63b0a97d3079559d9c4f5ec2
2017-08-16 14:37:15 -07:00
Steven Moreland
dfd8287506 Updating all makefiles.
Bug: 64487114
Test: none
Merged-In: I8608c8f636c35f21e4246a805a9eff6d14124e0a
Merged-In: I2fa89b6661c39859ec4fb62c4bb0a05a35e645f0
Merged-In: Ifdc3c17cb2b85c18b37dac2d03bb5c8935c23180
Change-Id: I170fa1c4fe39f8109b1670db58ef99bb11afc0be
2017-08-14 20:25:09 +00:00
Steven Moreland
4f25c2a143 Revert "Revert "Updating all makefiles.""
Relanding without automotive/vehicle/2.0+2.1 changes.

This reverts commit 1020ebedfb.

Merged-In: I8608c8f636c35f21e4246a805a9eff6d14124e0a
Change-Id: Icc49df42c2bedf443d878d5d8fbaa53441ea65db
2017-08-11 23:02:01 +00:00
Steven Moreland
ff308ea6ba Updating all makefiles.
Bug: 64487114
Test: none
Merged-In: I8608c8f636c35f21e4246a805a9eff6d14124e0a
Merged-In: I2fa89b6661c39859ec4fb62c4bb0a05a35e645f0
Change-Id: Ifdc3c17cb2b85c18b37dac2d03bb5c8935c23180
2017-08-11 22:58:47 +00:00
Steven Moreland
1020ebedfb Revert "Updating all makefiles."
This reverts commit 8ac1971678.

Reason for revert: Didn't remove automotive changes from this CL.

Merged-In: I8608c8f636c35f21e4246a805a9eff6d14124e0a
Change-Id: I1c660cffc8817ad0b33da9f6eceb3d88e7c48416
2017-08-11 22:56:56 +00:00
Steven Moreland
6da35570df Updating all makefiles.
Bug: 64487114
Test: none
Change-Id: I8608c8f636c35f21e4246a805a9eff6d14124e0a
2017-08-10 23:43:46 +00:00
Steven Moreland
8ac1971678 Updating all makefiles.
Bug: 64487114
Test: none
Merged-In: I8608c8f636c35f21e4246a805a9eff6d14124e0a
Change-Id: I2fa89b6661c39859ec4fb62c4bb0a05a35e645f0
2017-08-10 22:40:04 +00:00
Tri Vo
70029d3378 Merge "Graphics tests statically link to HAL definition libs." into oc-mr1-dev am: 43b3865a3d
am: ed296a8217

Change-Id: Icd03586ac54fda2b01dc1158d4e3ea804be6454c
2017-08-10 03:53:00 +00:00
TreeHugger Robot
43b3865a3d Merge "Graphics tests statically link to HAL definition libs." into oc-mr1-dev 2017-08-10 03:42:37 +00:00
Tri Vo
1b7c33562f Graphics tests statically link to HAL definition libs.
These tests now statically links to HAL def libs which are
not guaranteed to be on the device.

Bug: 64040096
Test: vts-tradefed run commandAndExit vts --skip-all-system-status-check
--skip-preconditions --module VtsHalGraphicsMapperV2_0Target
Test: vts-tradefed run commandAndExit vts --skip-all-system-status-check
--skip-preconditions --module VtsHalGraphicsComposerV2_1Target
Change-Id: I83b68dafbd161f88394f67dbda14f9957ddf7232
2017-08-07 14:07:52 -07:00
Steven Thomas
87f47a4aa2 Merge "Guard against racy ComposerClient reconnection" into oc-mr1-dev am: 85e93f0a3b
am: bad6446522

Change-Id: I78b2627f79c9b2baa920a4552e2480df262702df
2017-08-07 18:11:07 +00:00
Steven Thomas
85e93f0a3b Merge "Guard against racy ComposerClient reconnection" into oc-mr1-dev 2017-08-07 17:53:13 +00:00
Justin Yun
62b93f3f02 Manually update makefile for vndk-sp hidl libs. am: f2bd6c12a2
am: f0a51054c2

Change-Id: I008a20736fca7ad42a1932d80334fb1148e763b1
2017-08-05 02:17:41 +00:00
Justin Yun
723c2dbd43 Update make file for vndk enabled. am: 608d773ef8
am: d66371512c

Change-Id: I35b778c39c2349346278deb6dea56b8cd3701f7d
2017-08-05 02:17:38 +00:00
Justin Yun
f2bd6c12a2 Manually update makefile for vndk-sp hidl libs.
vndk-sp is not automatically tagged by hidl-gen.
For vndk-sp libs, "support_system_process: true" is manually added
in "vndk" property.

Bug: 63866913
Test: build and boot with BOARD_VNDK_VERSION=current
Change-Id: I2b18d691411e58dc55bcdfa39ecb3659242c8437
2017-08-04 14:40:55 +09:00
Justin Yun
608d773ef8 Update make file for vndk enabled.
Update the Android.bp generated with hidl-gen.

Test: build with and without BOARD_VNDK_VERSION=current
Bug: 63866913
Change-Id: I1a9db1df49e0f13c5790da2b118ae9ec63ba34a7
2017-08-04 14:12:23 +09:00
Steven Moreland
6ae7aad171 Update makefiles (frameworks.jar).
Test: links at runtime and buildtime
Bug: 35771640
Change-Id: Ic7a71653d659115205e5bdbb782f73b774af0b29
2017-08-03 23:02:46 +00:00
Chia-I Wu
58fbba63b7 Merge "graphics: ignore/reduce spurious vsync in VTS" into oc-dr1-dev
am: d1231716d3

Change-Id: I6dae4a4f7e287abd7438ece780cefca2bf19ac39
2017-08-03 17:46:34 +00:00
Tri Vo
0621d2f517 Update Android.bp HIDL makefiles am: f5d136c231
am: 7694738e26

Change-Id: I7592025d540bbe46d2e2726ae39ae34f352a1a30
2017-08-03 15:37:24 +00:00
Tri Vo
f5d136c231 Update Android.bp HIDL makefiles
Allow HAL definition libs to be static.

Bug: 32920003
Bug: 64040096
Test: update-all-google-makefiles.sh
Change-Id: I1483d572bea6799717d1614fb7d52fe225e31104
2017-08-03 00:30:01 +00:00
TreeHugger Robot
fce103b8c5 Merge "graphics: ignore/reduce spurious vsync in VTS" 2017-08-01 18:44:32 +00:00
Steven Thomas
4492a30e14 Guard against racy ComposerClient reconnection
The hardware composer service has a rule that only one client can be
connected at a time. The surface flinger process, when transitioning
composer ownership from surface flinger to vr flinger, will destroy the
current client on one thread and create a new client on another
thread. Although surface flinger ensures that these events happen in the
expected sequence (delete then create), the requests sometimes land in
the hardware composer service in inverted order, causing the creation
request to fail with an error.

Instead of failing with an error, block for a brief period (1 second)
until the existing client is removed, then proceed to initialize the new
client. This gives us enough time to ensure an inverted
creation/destruction order doesn't cause client creation to fail, while
avoiding a deadlock if the existing client is never destroyed.

Bug: 62925812

Test: - Transitioned to/from vr flinger hundreds of times, and confirmed
I no longer see sporadic composer client creation failure due to an
already existing client.

- Ran the vts graphics composer tests and confirmed they all pass.

Change-Id: I40be1fb0cb3d42ddb5a9fc159188886e9f5b6267
2017-07-31 18:38:01 -07:00
Zhuoyao Zhang
d710dd540d Add graphics test owners file.
Test: none.
Change-Id: I00c7568c8ae350edc2a442b005ab84ea6a0988e2
2017-07-28 11:25:28 -07:00
Chia-I Wu
4f49038e53 graphics: ignore/reduce spurious vsync in VTS
Bug: 62802718
Test: VTS
Change-Id: I1ed73e0b2f14414f540865a96e6bd5ac1599fbf3
2017-07-26 16:53:56 +00:00
Chia-I Wu
e0ff3e4a26 graphics: ignore/reduce spurious vsync in VTS
Bug: 62802718
Test: VTS
Change-Id: I1ed73e0b2f14414f540865a96e6bd5ac1599fbf3
2017-07-24 11:21:33 -07:00
Chia-I Wu
ae00f5c39c graphics: sideband streams are not buffers
We should call native_handle_clone instead of IMapper::importBuffer
on sideband stream handles.

Bug: 63707399
Test: manual
Change-Id: Ie07e50f6bb771f3c7a69d29e36f60b149dc6af95
2017-07-17 10:33:16 -07:00
Fabien Sanglard
47bd6b4a71 Skip Validate
am: 11ec393689

Change-Id: I47c68719ce214ee40ed0e58ec1a0ddc9c14a2b2a
2017-06-22 05:58:08 +00:00
Fabien Sanglard
a7b0e2785b Skip Validate
am: 11ec393689

Change-Id: I6e1121c116d51ad143878ea88f7d33c4af9f9e5b
2017-06-22 05:57:18 +00:00
Fabien Sanglard
11ec393689 Skip Validate
b/37474580
b/62806392

Test: marlin, ryu

Change-Id: I9d4ece40a8a093d768bcb4edd332cf0188735e66
2017-06-22 04:48:33 +00:00
Jesse Hall
5efa773cc1 Revert "Load the gralloc module at library load"
This reverts commit 33c08a53ac. Some
gralloc implementations apparently have library initializers (executed
on dlopen) which create anonymous sockets, open device nodes, etc.
which Zygote and some other non-Zygote-child processes that use libui
don't have permissions to do. When the library initializer fails, it
crashes the process.

Reverting this until this initialization code can be made lazy (on
first use of gralloc).

Bug: 62732270
Test: boot fugu to launcher
2017-06-19 11:48:09 -07:00
Jesse Hall
33c08a53ac Load the gralloc module at library load
In the a.h.graphics.mapper default implementation, load the gralloc
module in a static constructor that runs when the library is loaded.
This causes Zygote to load the gralloc module and its dependencies
when it loads a.h.graphics.mapper, so that it doesn't have to be
loaded during each activity launch.

Bug: 62353585
Test: boot to launcher, run calculator, confirm gralloc library is in
      /proc/`pid zygote64`/maps

Change-Id: I56defd76b0ba0fba71dea48e2b0d338511563d1f
2017-06-16 00:48:36 +00:00
Chia-I Wu
2d02d91f7f graphics: fix gralloc1 usage flags in default impl
BufferUsage::SENSOR_DIRECT_DATA should be filtered out for consumer
usage.  BufferUsage::GPU_DATA_BUFFER should be filtered out for
producer usage and be translated to
GRALLOC1_CONSUMER_USAGE_GPU_DATA_BUFFER for consumer usage.

Bug: 62491483
Test: boots
Change-Id: I171712adf45ae80dadeed7997fb9872ff176fa1a
2017-06-12 15:19:42 -07:00
Daniel Nicoara
d47f4a9d65 Move utility classes in a separate static target
Split up utility classes that can be re-used in other IComposer related
tests (such as the IVrComposerClient tests).

Changes:
 * Move GraphicsComposerCallback into separate module
 * Extract TestCommandReader in separate module
 * Extract Composer::execute() from test class

Bug: 38203529
Test: Compiled
Change-Id: I0d1193469e9dd94c477a63058f98111c162dfa99
2017-05-30 15:53:19 -04:00
TreeHugger Robot
98ed02dec2 Merge "graphics: set maxThreads to 4 for the allocator" 2017-05-23 19:52:04 +00:00
Steven Moreland
7708449766 Update makefiles. (2/2) am: 76cfb84140
am: f203167814

Change-Id: I1f13401266f3c2f78c627088b09c79cd7c8d0276
2017-05-22 17:29:04 +00:00
Steven Moreland
f203167814 Update makefiles. (2/2)
am: 76cfb84140

Change-Id: I24d21438a5b2f447d2160929c6ff6e17b2b66820
2017-05-22 17:15:20 +00:00
Steven Moreland
76cfb84140 Update makefiles. (2/2)
Adds default configuration for all hals.

Bug: 38415912
Test: pass
Change-Id: Idd1f3a2b7b16ad956d31784a513e93a066cdd02e
2017-05-19 15:54:03 -07:00
Chia-I Wu
2c3a6cd3cd Merge "graphics: set maxThreads to 4 for the composer" into oc-dev am: 15e33c6d17
am: b8b218b88b

Change-Id: Icb85078986c8453498c1ef2ee5dbb5c58f7fc6a0
2017-05-12 20:02:37 +00:00
Chia-I Wu
b8b218b88b Merge "graphics: set maxThreads to 4 for the composer" into oc-dev
am: 15e33c6d17

Change-Id: I4e5c759f467d6085e9dc1d57ca65db0273343eef
2017-05-12 19:59:18 +00:00
Chia-I Wu
ec71f00148 graphics: set maxThreads to 4 for the composer
There are implmentations that can dead lock when calling certain
functions in certain states.  It works fine before HIDL because
SurfaceFlinger calls those functions in another thread.  We allow
for 4 hwbinder threads in this commit to simulate how SurfaceFlinger
calls hwcomposer.

Bug: 38183197
Test: camera, videos, multi windows, screencap, screenrecord
Change-Id: Ie05b2ca349b8c1ed9a3ac962981434f2efee92d9
2017-05-12 08:40:48 -07:00
Chia-I Wu
17ba27bc61 graphics: set maxThreads to 4 for the allocator
This should help buffer allocation performance.  We choose 4 because
that is the number of binder threads in SurfaceFlinger.

Bug: 38243574
Test: manual
Change-Id: I704aacb271fb7fd6a91c9231ab8a5256531eebc9
2017-05-11 23:00:47 +00:00
Steven Moreland
d09cf863da Update makefiles for c++-sources and c++-headers. (2/2) am: bc71124120
am: a32ebce372

Change-Id: Ic1dd8f98e72656bc12a6e5224e541f75afb79daa
2017-05-11 01:38:14 +00:00
Martijn Coenen
ab97cef29e Merge "Start processes that need real-time with CAP_SYS_NICE." into oc-dev am: 6c062f77c1
am: b05e4c9414

Change-Id: I9fa6d2b4283ca50506ffcc6a665e6a2e46c4c2f9
2017-05-11 01:36:26 +00:00
Steven Moreland
a32ebce372 Update makefiles for c++-sources and c++-headers. (2/2)
am: bc71124120

Change-Id: Icf36068a4d863a8520854c7a83e51f960c188e12
2017-05-11 00:48:55 +00:00
Martijn Coenen
b05e4c9414 Merge "Start processes that need real-time with CAP_SYS_NICE." into oc-dev
am: 6c062f77c1

Change-Id: I921160390dc9f90e7872729194ed1d1240ce68b7
2017-05-11 00:47:30 +00:00
Steven Moreland
4be51a8512 Merge changes from topic 'fix-hidl-generate' into oc-dev
* changes:
  Update makefiles for c++-sources and c++-headers.
  Update makefiles for c++-sources and c++-headers. (2/2)
2017-05-10 20:02:40 +00:00
Steven Moreland
bc71124120 Update makefiles for c++-sources and c++-headers. (2/2)
Test: pass
Bug: 38174080
Change-Id: Icad451f9f9ad5f46412356a4171a8a1222f8e545
2017-05-09 19:58:43 -07:00
Mathias Agopian
d8931ac871 fix circular dependency libnativewindow <-> libui
Bug: 37647680, 37648355
Test: compile, manual
Change-Id: I2fdec8e86f6729aadd572a250b9d55d77f0d4eef
2017-05-09 16:40:51 -07:00
Martijn Coenen
f9b3fb49df Start processes that need real-time with CAP_SYS_NICE.
Bug: 37293077
Test: verified CAP_SYS_NICE granted in /proc/pid/status
Change-Id: If404450cbeb077d331b231bda1af2d6eae774b75
2017-05-09 09:57:00 -07:00
Steven Moreland
5c63b11f76 Remove redundant dependencies
android.hidl.base@1.0 and android.hidl.manager@1.0 are built into libhidltransport.

Test: links
Bug: 33276472
Merged-In: I08aaad80f7e2fc262aa3a8b66fe932e8133a928d
Change-Id: I08aaad80f7e2fc262aa3a8b66fe932e8133a928d
2017-05-02 15:29:30 -07:00
TreeHugger Robot
31944dc58e Merge "Remove redundant dependencies" 2017-05-02 21:51:28 +00:00
Steven Thomas
6dbaf573a2 Merge "Avoid crash when setting buffer on deleted layer" into oc-dev 2017-05-02 17:47:24 +00:00
Steven Thomas
58da77ea4b Avoid crash when setting buffer on deleted layer
When setLayerBuffer() was called on a layer previously destroyed by
destroyLayer() the code would crash. Instead, return an error.

Bug: 37159844

Test: Ran vr flinger in a way that would trigger the crash, and
confirmed that I now get error logs instead of crashing. Unfortunately
the error code is consumed by the Composer wrapper class and not
propagated back to the caller, but that's a separate issue (b/37901601).

Change-Id: I75a5b954d47a1deac44d03851f60f347085eca89
2017-05-02 17:39:39 +00:00
Steven Moreland
2cd0d42d72 Remove redundant dependencies
android.hidl.base@1.0 and android.hidl.manager@1.0 are built into libhidltransport.

Test: links
Bug: 33276472
Change-Id: I08aaad80f7e2fc262aa3a8b66fe932e8133a928d
2017-05-02 10:17:28 -07:00
TreeHugger Robot
76061d7881 Merge "graphics: polish Transform docs and indent ColorMode" into oc-dev 2017-05-01 21:09:37 +00:00
Chia-I Wu
b57dd2a005 graphics: remvoe -Wno-unused-parameter
Bug: 34611192
Test: builds
Change-Id: I8d6802ee6c618ea506fcca8e7d74e3b7026f29be
2017-04-28 13:04:49 -07:00
Chia-I Wu
4376069e9d graphics: polish Transform docs and indent ColorMode
Note, current.txt change (as opposed to addition) is only allowed
because this is an unreleased interface.

Bug: 32593292
Test: builds
Change-Id: I95381d1a3a456aeadbc472e2dbbffde19cb43e6c
2017-04-28 13:04:08 -07:00
Chia-I Wu
8de7a17b82 graphics: remove non-HAL pixel formats
HALs are not expected to see YCBCR_422_888, YCBCR_444_888,
FLEX_RGB_888, and FLEX_RGBA_8888.  JPEG is purely wrong.

Note, current.txt change (as opposed to addition) is only allowed
because this is an unreleased interface.

Bug: 32593292
Test: builds
Change-Id: I432e6cb75cfc347a41e8e1632ae1898eed3350c8
2017-04-27 16:55:47 +00:00
Chia-I Wu
00d459d039 graphics: clean up PixelFormat docs
Make the docs more self-contained, not referring to stuff not
defined by the HIDL interfaces.

Mark JPEG, YCBCR_422_888, YCBCR_444_888, FLEX_RGB_888,
FLEX_RGBA_8888 as "MUST NOT USE".  These format are never supposed
to be seen by gralloc and do not belong to the HIDL interfaces.

Note, current.txt change (as opposed to addition) is only allowed
because this is an unreleased interface.

Bug: 32593292
Test: builds
Change-Id: Ia7607cc73dd2f58dfa27e71b0004b21c7ca6904d
2017-04-27 16:54:32 +00:00
Chia-I Wu
841468ad6a graphics: reorder PixelFormat
Sort the enum values in their numerical order. There is no other
change.

Note, current.txt change (as opposed to addition) is only allowed
because this is an unreleased interface.

Bug: 32593292
Test: builds
Change-Id: I47914a7971f922f5602f982b41dd7602842e853b
2017-04-27 16:41:08 +00:00
Chia-I Wu
2ae85702f7 graphics: use mapper from the composer
We must use the mapper HAL instead of gralloc0/gralloc1 from the
composer.

Bug: 37540361
Test: boots on marlin, angler, and ryu
Change-Id: I5a3ff6a025bf51a3507a4f33fa77e9506a6f1ec9
2017-04-25 12:52:50 -07:00
Chia-I Wu
ec74596af8 graphics: clarify importBuffer and passthrough HALs
A buffer handle recieved from a HAL is by definition raw and needs
to be imported.  But because of passthrough HALs, such a raw handle
may have been imported already.  Explicitly specify that an
implementation must accept such a raw handle.

Bug: 37540361
Test: boots on angler, ryu and marlin
Change-Id: I5ecf526e59b27cc4a8f7f5d5ec27477da0946ece
2017-04-25 12:52:50 -07:00
Chia-I Wu
78b63dc6a1 graphics: keep mapper valid during process termination
GraphicBufferMapper is valid during process termination.  IMapper
must stay valid as well.  It should not rely on global/static
objects that may have been destructed.

Bug: 37480313
Test: libgui_test
Change-Id: Icb8079153306f2465c26c0f1ce812895ad83f21b
2017-04-19 11:47:25 -07:00
Andreas Huber
6fa374ad30 Changed the naming scheme for Treble java libraries (both static and dynamic)
android.hardware.foo@1.0-java => android.hardware.foo-V1.0-java

Bug: 37207894
Test: make
Change-Id: I177f4cfd42f635aaf096107af8309d1a82ed41c0
Merged-In: I8b91881dfaf507c0d852d56ebbb53ff0987e5a34
2017-04-13 15:23:46 -07:00
TreeHugger Robot
cb1d509d21 Merge "libhwcomposer-client: mark as vendor_available" into oc-dev 2017-04-13 04:12:19 +00:00
Iliyan Malchev
f140afe383 composer: route binder traffic over vndbinder
b/36683636 Hwcomposer is starting binder threads

Test: sailfish

Change-Id: I28ad19b5036c6fbf514770369888ca11892bf212
Signed-off-by: Iliyan Malchev <malchev@google.com>
2017-04-13 00:25:08 +00:00
Steven Moreland
17f0c0dde7 Merge changes from topic 'hidl-vendor-available' into oc-dev
* changes:
  Update makefiles (2/2).
  Update makefiles.
2017-04-12 22:13:58 +00:00
Brian C. Anderson
21c2e11345 Merge "Add PRESENT_FENCE_IS_NOT_RELIABLE" into oc-dev 2017-04-12 21:26:24 +00:00
Brian Anderson
9af5d942a6 Add PRESENT_FENCE_IS_NOT_RELIABLE
Test: adb shell /data/nativetest/libgui_test/libgui_test
  --gtest_filter=*GetFrameTimestamps*
Bug: 36730849, 36887025

Change-Id: Ide992e4dda7840f7982237943256ea3019eda434
2017-04-12 11:28:55 -07:00
Steven Moreland
fed12441ac libgrallocmapperincludes: as header lib and vendor
Bug: 33241851
Test: links
Test: try build with BOARD_VNDK_VERSION current, no errors related to
  this module
Test: (sanity) YouTube

Change-Id: Ia2c3922bf8bf1ab51396a8c8c5fa8d909c442994
2017-04-12 09:57:32 -07:00
Steven Moreland
1c8bff2ccb libhwcomposer-client: mark as vendor_available
By setting vendor_available, the following may become true:

* a prebuilt library from this release may be used at runtime by
  in a later releasse (by vendor code compiled against this release).
  so this library shouldn't depend on runtime state that may change
  in the future.
* this library may be loaded twice into a single process (potentially
  an old version and a newer version). The symbols will be isolated
  using linker namespaces, but this may break assumptions about 1
  library in 1 process (your singletons will run twice).

Background:

This means that these modules may be built and installed twice --
once for the system partition and once for the vendor partition. The
system version will build just like today, and will be used by the
framework components on /system. The vendor version will build
against a reduced set of exports and libraries -- similar to, but
separate from, the NDK. This means that all your dependencies must
also mark vendor_available.

At runtime, /system binaries will load libraries from /system/lib*,
while /vendor binaries will load libraries from /vendor/lib*. There
are some exceptions in both directions -- bionic(libc,etc) and liblog
are always loaded from /system. And SP-HALs (OpenGL, etc) may load
/vendor code into /system processes, but the dependencies of those
libraries will load from /vendor until it reaches a library that's
always on /system. In the SP-HAL case, if both framework and vendor
libraries depend on a library of the same name, both versions will be
loaded, but they will be isolated from each other.

It's possible to compile differently -- reducing your source files,
exporting different include directories, etc. For details see:

https://android-review.googlesource.com/368372

None of this is enabled unless the device opts into the system/vendor
split with BOARD_VNDK_VERSION := current.

Bug: 36426473
Bug: 36079834
Test: m -j libhwcomposer-client
Test: attempt to compile with BOARD_VNDK_VERSION := current
Change-Id: I735b861fcc25bc1048ce0ce3ad48432980248b06
2017-04-12 04:29:48 +00:00
Steven Moreland
3b36a83a2e Update makefiles (2/2).
Test: pass
Change-Id: Ic7e6289c7b69785491708ce0acbb657f4c704229
2017-04-11 09:58:03 -07:00
Chia-I Wu
586fd648d5 Merge "graphics: revise gralloc interfaces" into oc-dev 2017-04-11 01:08:39 +00:00
Chia-I Wu
79d13ff0f5 graphics: revise gralloc interfaces
Revise IAllocator and IMapper to reduce IPC and to support gralloc0
devices.

Specifically, IAllocator is trimmed down to have essentially only

    allocate(BufferDescriptor descriptor, uint32_t count)
        generates (Error error,
                   uint32_t stride,
                   vec<handle> buffers);

The ability to allocate buffers with shared backing store is
removed.  ProducerUsage and ConsumerUsage are moved to the
graphics.common package and are merged and renamed to BufferUsage.
BufferUsage's bits follow gralloc0.

IMapper gains

    typedef vec<uint32_t> BufferDescriptor;
    createDescriptor(BufferDescriptorInfo descriptorInfo)
          generates (Error error,
                     BufferDescriptor descriptor);

where BufferDescriptor is an implementation-defined blob.  lockFlex
is replaced by lockYCbCr.  All getters are removed.

Reference counting with retain/release is replaced by
importBuffer/freeBuffer.

Most if not all gralloc1 features are not used by the runtime yet.
There is also not too much test written for them.  As such, they
tend to behave differently between implementations and cannot be
used reliably.

Bug: 36481301
Test: builds and boots on Pixel
Change-Id: I1d31105120517ea2c128c7a19297acf3bfd312bb
2017-04-10 11:15:54 -07:00
Emilian Peev
cb0b46654d graphics: Update RAW16 format comments
RAW16 format could be used together with depth dataspace.
The buffer contents in this case will be phase detection
statistics data.

Bug: 36015382
Test: testPDStats
Change-Id: Ied1c179193abef62a87fcec6f0906528ed58ea2b
(cherry picked from commit 23699d6314)
2017-04-09 17:48:56 +00:00
Steven Moreland
4e7a307730 Fix transitive includes.
Files relying on transitive include of utils/Log.h (and things that it
includes) from MQDescriptor.h

Test: pass
Merged-In: Iff316b21bef556bb026378b7f89e97ded3febef4
Change-Id: Iff316b21bef556bb026378b7f89e97ded3febef4
2017-04-06 22:04:05 +00:00
Keun-young Park
a232a45b59 add components necessary for bootanim to animation class
- necessary for running shutdown animation:
 android.hardware.graphics.composer
 android.hardware.graphics.allocator
 android.hardware.configstore

bug: 36526187
Test: many reboots
Change-Id: Iba3eefddd2bd33c28152c17081a4ad13619d330d
2017-03-31 16:56:08 -07:00
Andreas Huber
40d3a9bd8c Convert all comments into "doxygen-ready" comments.
Bug: 36453077
Test: mma
Change-Id: I0b1f77dfae5d2258969e33d85ecf45401ffbdfaa
2017-03-29 08:53:58 -07:00
TreeHugger Robot
2f44ec6c86 Merge "Use gralloc usage conversion library" into oc-dev 2017-03-28 20:55:51 +00:00
Jesse Hall
66ee1771a6 Use gralloc usage conversion library
Converting from ..graphics.allocator@2.0 usage to gralloc0 usage isn't
quite as simple as ORing and truncating, which is what the default
implementation was doing. Switch to using library functions that do it
correctly.

Test: boot bullhead
Change-Id: I40ae00e9aad92b374f281569207972b7461a3e55
2017-03-28 08:23:21 -07:00