Commit graph

967 commits

Author SHA1 Message Date
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
Steven Moreland
561b602a99 Update makefiles for hwtypes.h
Test: pass
Change-Id: I8e17eb8fec5d2f04c526476a866c8dd54ccb556c
2017-03-28 15:18:20 +00:00
Steven Moreland
c8e2b3f7c5 Remove viral readproc group dependency.
This has been copy pasted and isn't actually required.

Test: all hals manually tested to work on internal marlin (which have them binderized).
  Note: tv hals not tested (and they never have been). Filed b/36562029
  Note: for thermal hal, could only run VTS/check logs for errors.
Test: lshal outputs proper stuff
Fixes: 31928447
Change-Id: Id1be584dc0fa2d70e9189b922335146bf6d1382d
2017-03-23 19:49:37 +00:00
Fabien Sanglard
9b117a4dd2 Fix library dependency, remove undeclarate deps
Remove undeclared dependency of libhwcomposer-client on Hwc.h which
created a circular dependency.

Test: Manual
Change-Id: I74d5c4e2db5d247f8b406d1ea42fece41e76659d
2017-03-21 09:43:36 -07:00
Fabien Sanglard
0d55a21044 Add graphics composer support for HWC > HWC1.1
Test: Ryu, Marlin
Change-Id: I58a7394f427534b942d64c93b1891a756c5f510c
2017-03-20 12:24:29 -07:00
TreeHugger Robot
52efd43eee Merge "Move IGraphicBufferProducer to graphics/bufferqueue." 2017-03-15 20:55:46 +00:00
Pawin Vongmasa
4a3cd13ddc Move IGraphicBufferProducer to graphics/bufferqueue.
Test: With CtsMediaTestCases.apk installed,
adb shell am instrument -e size small -w
'android.media.cts/android.support.test.runner.AndroidJUnitRunner'

Bug: 35442034
Change-Id: Ia1ef0eb069fcd97f7afcf42bf3bb16c8c6a752c4
2017-03-15 11:42:40 -07:00
Courtney Goeltzenleuchter
a3023d9b44 Update Display-P3 transfer function
Decided to use same transfer function that Apple is
using for their Display-P3 devices. Difference between
sRGB transfer function and Display-P3 is very small.
We will treat them an synonymous.

Test: make

Change-Id: Id4e52058f2b810b70c46821c5fe6830e623c5491
2017-03-15 08:11:25 -06:00
Yuexi Ma
ed2bb4e8f8 Change vts target base test class name
Test: make vts succeed, vts kernel tests and nfc hal tests passed
Change-Id: I95f10ad7a66f261c9030357edd411fe6d94150e8
2017-03-10 21:14:48 +00:00
TreeHugger Robot
88cfac9540 Merge "graphics: fix a potential use after free" 2017-03-10 20:51:48 +00:00
TreeHugger Robot
d46602235b Merge "graphics: really reset HWC2 on SF crashes" 2017-03-10 20:42:39 +00:00
Chia-I Wu
41a1c15a40 graphics: fix a potential use after free
We cannot lookup _and_ update buffer cache entry in lookupBuffer.
The old buffer is still in use by hwcomposer2.  Add updateBuffer to
do the update after the new buffer has replaced the old buffer in
hwcomposer2.

While at it, s/BufferClone/BufferCacheEntry/g.

Bug: 36064845
Test: manual
Change-Id: I59b61c0198ad528c40020fdebbe27a6cc359226f
2017-03-10 10:53:32 -08:00
Chia-I Wu
6c84f7ee8c graphics: really reset HWC2 on SF crashes
Perform a final presentDisplay to clear the screen and get HWC2 out
of any special state (e.g., some implementations put themselves in
special states between validateDisplay and presentDisplay).  Our
only portable choice really is to abort(), but that is not an option
because we have other clients such as VTS or VR.

Bug: 35872161
Test: manual
Change-Id: I9028705607d1b86d418a379c6e90e833d638b3f5
2017-03-09 09:20:11 -08:00
Steven Moreland
48c52249e4 hidl_default to all targets.
find hardware/interfaces -type f -not -path "*/.git/*" \
-exec sed -i -e '/cc_[A-Za-z_]\+/ { N; s/$/\n    defaults:
\["hidl_defaults"\],/ }' {} \;
./hardware/interfaces/update-makefiles.sh

Test: pass
Bug: 35840847
Change-Id: If10c464d2f000b85c8d698fe11a4f3fc4cfad282
2017-03-08 19:31:53 -08:00
Chia-I Wu
d412d7b1d2 graphics: initialize count to 0 in initCapabilities
Be more defensive against HALs that do not initialize count.

Test: manual
Change-Id: I8b70454a1a3134c01d225be504579fc2e81ca88b
2017-03-07 14:45:33 -08:00
Chia-I Wu
c2e949ec5f graphics: add a basic test for IMapper::lockFlex
Bug: 32023011
Test: manual
Change-Id: Iae143d11056f6ab169d1068fdaa62e889051b16e
2017-03-07 12:26:03 -08:00
Chia-I Wu
8cc5a15410 graphics: clean up composer VTS tests
Add libVtsHalGraphicsComposerUtils which provides a wrapper to
IComposer.  Port tests to be based on
libVtsHalGraphicsComposerUtils.

Test: manual
Change-Id: I400c347b54702c3d45954e6cdc101d3dc1241efd
2017-03-07 12:26:03 -08:00
Chia-I Wu
89d09ddb0a graphics: clean up mapper VTS tests
Add libVtsHalGraphicsMapperUtils which provides a wrapper to
IMapper.  Port tests to be based on libVtsHalGraphicsMapperUtils.

Test: manual
Change-Id: I0639df178fd0a94153b48733930bb13f2d0aa930
2017-03-07 12:24:26 -08:00
Chia-I Wu
69505c6842 graphics: clean up allocator VTS tests
Add libVtsHalGraphicsAllocatorUtils which provides a wrapper to
IAllocator.  Port tests to be based on
libVtsHalGraphicsAllocatorUtils.

Test: manual
Change-Id: I6d56160dc4fa6e5106cc55e75cdd923f15635317
2017-03-07 12:23:25 -08:00
Courtney Goeltzenleuchter
37606f9fe9 Add dataspace to match upstream EGL extension
EGL's EGL_EXT_gl_colorspace_bt2020_pq extension
supports a bt2020 color space with a ST2084
transfer function (Dolby Perceptual Quantizer)
Test: make

Change-Id: I3de03b91ee24880a4b2dab14c0f07185a53bf067
2017-03-02 13:50:43 -07:00
Yuexi Ma
50d7e27b3c change all vts hidl tests to use VtsHalHidlTargetBaseTest (internal master)
Bug: 33385836
Test: mma
Change-Id: Ide3ebc4a9db76257f33bcfb0c1f13d2ee33eeaa8
2017-02-28 22:27:28 +00:00
TreeHugger Robot
2bb6dc745e Merge "hwcomposer HAL uses "default" service name" 2017-02-25 02:40:45 +00:00
Yifan Hong
69ab674dce hwcomposer HAL uses "default" service name
The getService() and registerAsService() methods of interface objects
now have default parameters of "default" for the service name. HALs
will not have to use any service name unless they want to register
more than one service.

Test: builds

Bug: 33844934
Change-Id: I0c7987ffa7b22bb7386a4a1320242b3248e434e4
2017-02-24 16:55:20 -08:00
TreeHugger Robot
2653620a61 Merge "Remove viral dependency on libhwbinder. (2/2)" 2017-02-24 23:25:26 +00:00
Steven Moreland
7e73d5b908 Remove viral dependency on libhwbinder. (2/2)
find hardware/interfaces -name Android.mk -exec sed -i -e '/libhwbinder
\\/d' {} \;
find hardware/interfaces -name Android.bp -exec sed -i -e
'/"libhwbinder"/d' {} \;
./hardware/interfaces/update-makefiles.sh

Note, automotive has some actual dependencies on libhwbinder, filed
b/35758626 for this.

Test: everything links
Test: (sanity) booted marlin on internal master with these changes
Bug: 35710429
Change-Id: I6d0726c8130d00684b978efbdd48e3ae396f12e5
2017-02-24 12:18:01 -08:00
Yifan Hong
33df4dbeb3 Merge "gralloc HAL uses "default" service name" 2017-02-24 18:21:11 +00:00
Chris Phoenix
c8e3295842 gralloc HAL uses "default" service name
The getService() and registerAsService() methods of interface objects
now have default parameters of "default" for the service name. HALs
will not have to use any service name unless they want to register
more than one service.

Test: builds

Bug: 33844934
Change-Id: Ic3859ccf21e7ee5177f47cb06e3e0c93dd572bf6
2017-02-23 11:28:54 -08:00
Yifan Hong
442b8933ea hwcomposer HAL uses "default" service name
The getService() and registerAsService() methods of interface objects
now have default parameters of "default" for the service name. HALs
will not have to use any service name unless they want to register
more than one service.

Test: builds

Bug: 33844934
Change-Id: I3d51429681d834f53dc5f6765e97675eafdceda4
2017-02-22 18:40:53 -08:00
Tri Vo
d94a7d2df9 Remove .vts spec files
Test: mmma hardware/interfaces
Change-Id: Idae97ce60a6368cfa685ae6b2d71b9ad163e8605
2017-02-22 12:53:52 -08:00
Zhuoyao Zhang
8422f6aa04 Update the test binary and source file name on master.
* To confirm with Vts naming convention.

Bug: 35273456
Test: mma
Change-Id: I845da64085253cd02480465479618308045a52ed
2017-02-21 20:47:18 -08:00
Chia-I Wu
4339871180 graphics: composer should not die with its client
Fail elegantly when any of IComposerCallback method returns an
error.

Bug: 35334576
Test: manual
Change-Id: If84a265d3bfa01178ea7316d7fe3ba7941ad127f
2017-02-17 13:24:52 -08:00
Ryan Campbell
2caf0a60f3 Remove coverage flags from tests.
Remove unnecessary coverage flags from HAL tests.

Bug: 32749731
Test: none
Change-Id: I7e4e3bce2d9d444bfa8475c140bce2ee7e3b0c0d
2017-02-14 16:50:34 -08:00
Zhuoyao Zhang
f008f8fdc4 Merge "Update .vts files on master based on the latest .hal file and hidl-gen" 2017-02-14 18:51:27 +00:00
Zhuoyao Zhang
3bef939f94 Update .vts files on master based on the latest .hal file and hidl-gen
Test: mma
Change-Id: I9558f300505db83e26f7c241c5cf729cd005a07b
2017-02-13 18:03:06 -08:00
Steven Moreland
a0da1a1c3d Move hidl shims to the vendor partition. (2/2)
We need google shims on the vendor partition because they are providing
an implementation of a vendor defined interface. They were written by
google just as a courtesy/to make the transition easier. They're
basically a set for vendors to assemble their hal implementations
from.

Bug: 34135607
Test: marlin persist.hal.binderization on/off
Change-Id: I2e2af5af39264cf290259755bb9b2eb9827a21f5
2017-02-13 15:03:41 -08:00
TreeHugger Robot
86fa244c12 Merge "Update makefiles to use filgroup syntax." 2017-02-10 23:25:52 +00:00
TreeHugger Robot
a9e8d15a46 Merge "graphics: use FIFO scheduler in IComposer" 2017-02-10 22:47:13 +00:00
Tri Vo
85120c9490 Update makefiles to use filgroup syntax.
Test: mmma hardware/interfaces
Change-Id: I9f4457c78b7820c242d46359f0debe05d1b3e482
2017-02-10 12:45:19 -08:00
Chia-I Wu
4a71a73843 graphics: use FIFO scheduler in IComposer
Make IComposer default implementation use the same process scheduler
as SurfaceFlinger does.

Bug: 35210697
Test: manual
Change-Id: Ie2ebe1d3fd26505984d9f6c33d63b5db36b0b64a
2017-02-10 12:23:45 -08:00
Andreas Huber
d38f147c35 Updated makefiles
Java intermediates are now created in the common rather than the device-
specific generated sources subdirectory.

Bug: 33842609
Test: make
Change-Id: I16af4cd19bf0b24baa0ad9ebfdb86b4d959c8672
2017-02-09 17:20:45 -08:00
Tri Vo
ce608bec74 Migrate driver/profiler to test/vts-testcase/hal.
Bug: 34893894
Test: mmma hardware/interfaces

Change-Id: Ic72716577a5f93700c5056986aff55a76b170b5d
2017-02-07 19:13:28 -08:00
Keun Soo Yim
7b9b6ca18f move VTS stub files and non-functional tests
Test: mma
Bug: 34976004
Change-Id: I20273bdc3a05e2986fcf921f65d2afd6d72781e4
2017-02-04 02:45:25 +00:00
Zhuoyao Zhang
e9b43bbe2d Update Andriod.bp for hals.
* Add driver/profiler build rule for all hals.

Test: mma
Change-Id: I98325f7af14fec7dd1bb64b1668de8c7c20ace92
2017-02-03 10:03:01 -08:00
Chia-I Wu
e4b6f6a70d Merge "graphics: get rid of BINDERIZED" 2017-02-02 22:49:31 +00:00
Chia-I Wu
16624b69d6 graphics: get rid of BINDERIZED
It is always on now and all buffers be cloned and registered.
Clients (SF) should make use of the buffer caching mechanism and
pass each unique buffer once, to avoid the overhead.

Test: manual
Change-Id: I74ccbf74e110c8b413a66cfc60044b71ba3f44e3
2017-02-02 09:19:49 -08:00
Chia-I Wu
b00f59df0f graphics: add composer tests to VTS
Test: vts-tradefed run vts -m HalGraphicsComposerHidlTargetTest
Change-Id: I2e695787865d3bb855076acae18fa135064036ab
2017-02-01 15:07:29 -08:00
Chia-I Wu
fed07e87ea graphics: add basic target-side tests for IComposer
Add graphics_composer_hidl_hal_test.

Test: manual execution
Change-Id: I38c2fcd5cfb27dcd0299df389cbf84fe4056de1b
2017-02-01 15:07:29 -08:00
Courtney Goeltzenleuchter
1b2a09e5c9 Merge "Add enums for 10bit color formats" 2017-01-30 15:49:52 +00:00
TreeHugger Robot
0bf271e2b4 Merge "Add dataspace definition for sensor direct report" 2017-01-28 01:56:52 +00:00
Daniel Nicoara
0a60e4bcbe Introduce ComposerBase interface to allow custom Hwc implementations
Decouples the ComposerClient code which deals with parsing the command buffer
messages sent by SurfaceFlinger from the Hwc code that handles the
commands.

Bug: 33297270
Test: Compiled and verified on device that hwcomposer-2-1 service can
start correctly. SurfaceFlinger can connect to the service and the
system boots up. Also verified SurfaceFlinger runs correctly without
hwcomposer-2-1.
Change-Id: I43357306caea57d262735f4756c379ba9d0138cd
2017-01-26 10:32:27 -05:00
Courtney Goeltzenleuchter
0d955c185b Add enums for 10bit color formats
To improve wide-color behavior it's useful to have more bits
per color component. This defines 10:10:10:2 and 10:10:10:X
for that use.
This can be used for any color space / dataspace that is
compatible with unsigned integer components, e.g. Display-P3,
BT2020, etc.
Test: TBD

Change-Id: I69647f6bb2d5b0666a0819b10ee42705361e267d
2017-01-25 10:38:08 -07:00
Peng Xu
b9c5f8fa72 Add dataspace definition for sensor direct report
Bug: 32022776
Test: compiles
Change-Id: I9e2855a454117a17e252dcb580104afea29ddc02
2017-01-24 02:54:03 -08:00
TreeHugger Robot
a9e5636cc3 Merge "Rename CommandWriter to CommandWriterBase" 2017-01-23 21:48:45 +00:00
Daniel Nicoara
bd82b81935 Rename CommandWriter to CommandWriterBase
CommandWriter will be used as a base class in extensions of HWC. Renamed
for consistency.

Bug: 33297385
Test: Compiled
Change-Id: Iabe59f37157062961b916d55108cb9f4fb792619
2017-01-23 14:57:15 -05:00
Romain Guy
5b70f3d3c5 Merge "Add Display-P3 color mode" 2017-01-23 18:31:41 +00:00
TreeHugger Robot
6b058752c5 Merge "Use MQDescriptor typedefs for cleanup" 2017-01-23 15:56:44 +00:00
Hridya Valsaraju
790db1074c Use MQDescriptor typedefs for cleanup
Test: mm
Bug: 33815422

Change-Id: I41ca833231622a5a72970014cfcac400b512e44a
2017-01-23 15:56:24 +00:00
Romain Guy
fa48a77c1f Add Display-P3 color mode
Test: compile
Bug: 32984164
Change-Id: Ie3f361664320482974811b229a82e1703eb19c43
2017-01-20 16:10:07 -08:00
TreeHugger Robot
9968f30f01 Merge "Remove useless Android.mk files." 2017-01-19 21:37:37 +00:00
Steven Moreland
f37a0a439d Ran update-makefiles.sh.
GNSS/Fingerprint/Graphics have all gotten out of sync.

Bug: 34397031
Test: compiles
Change-Id: Ie0a081a4574fd617d5d97ca30ba879f5284efd64
2017-01-19 02:10:44 +00:00
Steven Moreland
66816de87f Remove useless Android.mk files.
Test: none
Change-Id: I99f4d3e5b943742009e366b13bee2c32e38a3fba
2017-01-18 11:49:08 -08:00
Daniel Nicoara
6633f75d26 Merge "Fix log message using undeclared variable" 2017-01-18 15:11:54 +00:00
Zhuoyao Zhang
f18be3d708 Merge "Add build rule of driver/profier for graphics allocator hal." 2017-01-17 23:35:45 +00:00
Peng Xu
5ead55c42c Merge "Add gralloc1 flags for direct mode sensors and SSBO/UBO buffers." 2017-01-14 09:48:16 +00:00
Craig Donner
36358b148e Add gralloc1 flags for direct mode sensors and SSBO/UBO buffers.
Added enums:
  * SENSOR_DIRECT_DATA
  * GPU_DATA_BUFFER
  
Also, change the wording according to guideline.

Bug: 30985702
Test: non-functional change
Change-Id: I80f4b02d3b4fda07ef3249b26a7e9dceba35fe1f
2017-01-14 02:10:27 +00:00
Daniel Nicoara
3d2b8d63b5 Fix log message using undeclared variable
Bug: None
Test: Compiled with LOG_FATAL() enabled
Change-Id: Iffb709d2bc923bc7428abb1ee326f0ed147c38df
2017-01-13 10:19:00 -05:00
Zhuoyao Zhang
e7544edd81 Add build rule of driver/profier for graphics allocator hal.
* Updated the corresponding .vts file to match the latest .hal file.

Test: make android.hardware.graphics.allocator.vts.driver@2.0
      make android.hardware.graphics.allocator@2.0-IAllocator-vts.profiler
      make android.hardware.graphics.allocator@2.0-IAllocatorClient-vts.profiler

Change-Id: Ibf0fdf976a01015cca9cea71a6f25fc513d22d94
2017-01-12 16:47:10 -08:00
Yifan Hong
a18049ad13 Bp/nFoo -> Bp/nHwFoo.
Test: mma
Bug: 33554989
Change-Id: I4b3f852d20fdfc49f2da671dd3c12d618ffb4140
2017-01-11 13:14:59 -08:00
Courtney Goeltzenleuchter
3068374bd1 Merge changes from topic 'display-p3'
* changes:
  Add Display P3 DATASPACE enums
  Remove TODO
2017-01-10 18:31:46 +00:00
Yifan Hong
d0461a4992 Add missing dependencies in graphics mapper vts test.
graphics_mapper_hidl_hal_test is using types from
android.hardware.graphics.common@1.0, but common@1.0 was
not added as a dependency in Android.bp.

Test: make vts compiles
Change-Id: I0d1333e69e63f915df4e99c76173f32fb2c89093
2017-01-09 15:27:33 -08:00
Courtney Goeltzenleuchter
5f3da62cd8 Add Display P3 DATASPACE enums
Need to define Display-P3 dataspace.
Test: grep HAL_DATASPACE_DISPLAY_P3 system/core/include/system/graphics-base.h

Change-Id: I0a2015eb714f9e6f8c2e8cff40b008e58570ba55
2017-01-06 09:31:01 -07:00
Courtney Goeltzenleuchter
2a84d48e5a Remove TODO
Test: Visually inspect file.
Bug: 34109639
Change-Id: If443b4beb1ff06429a8e3ee564a0892d6acd0e9d
2017-01-06 09:31:01 -07:00
Chia-I Wu
939e4018c2 graphics: rewrite libgralloc1-adapter
Rewrite libgralloc1-adapter to be based on Gralloc1On0Adapter.
Previously, the adapter targeted maximum portability and maximum
performance.  The rewritten adapter targets ease of use instead.

This also fixes a bug in the adapter's GRALLOC1_FUNCTION_RELEASE.  The
function does not imply native_handle_close/native_handle_delete.  As a
result, IMapper and IComposer are also fixed to close/delete handles.

Test: builds and boots
Change-Id: I5c071453dc950583087ae07967bca2c22866c538
2017-01-06 12:31:26 +08:00
Chia-I Wu
731eb3d514 graphics: copy Gralloc1On0Adapter over
Copied from libui, unmodified.

Test: none
Change-Id: Icda681bf42a22ba1747e0397b4356ee44537d4dd
2017-01-06 10:05:18 +08:00
Chia-I Wu
0069a382f7 Merge changes from topic 'gralloc-vts'
* changes:
  graphics: add gralloc tests to VTS
  graphics: add basic target-side tests for IMapper
2017-01-06 01:51:39 +00:00
Chia-I Wu
c7b1fa17cf graphics: add gralloc tests to VTS
Test: vts-tradefed run vts -m HalGraphicsAllocatorHidlTargetTest
Test: vts-tradefed run vts -m HalGraphicsMapperHidlTargetTest
Change-Id: I35e03b42e693da1bd3cfc6beac2a64771e0b8ed9
2017-01-05 09:32:30 +08:00
Chia-I Wu
98f99cf4df graphics: add basic target-side tests for IMapper
Add graphics_mapper_hidl_hal_test.

Test: manual execution
Change-Id: Ieb8be74fad1b35f69d74f6f3a93dfa4289fee91d
2017-01-05 09:32:30 +08:00
Steven Moreland
b643842192 Return<*> getStatus().isOk() -> isOk()
Bug: 31348667
Test: compiles
Change-Id: If8d5a23f80dbc04127635b49f1ef77398fc9f8a1
2017-01-04 10:40:05 -08:00
Martijn Coenen
028223775b Remove obsolete references to IPCThreadState/ProcessState.
Threadpool can now be configured/joined if needed with
configureRpcThreadpool() / joinRpcThreadpool().

Bug: 31226656
Test: mma
Change-Id: I0d7d9924cc8c8851cc2b61ebdae906204909890e
2016-12-30 14:00:31 +01:00
Hridya Valsaraju
33351dae85 Templatize MQDescriptor and rename to fmq_sync/fmq_unsync
Bug: 33948735
Test: builds, FMQ unit tests and benchmarks pass.
Change-Id: I5c3beff2c6a69e151e0cb11af299956638cc441b
2016-12-29 14:52:16 -08:00
Chia-I Wu
cbf76aa568 Merge "graphics: HIDLize IMapper" 2016-12-23 02:05:24 +00:00
Chia-I Wu
e4c429ccd2 Merge "graphics: replace non-const references by pointers" 2016-12-23 02:04:27 +00:00
Chia-I Wu
158d5302f5 graphics: HIDLize IMapper
Test: builds and boots
Change-Id: I37503ae4826c3e864d7457fd688c2d5f5dd652a3
2016-12-23 07:39:57 +08:00
Chia-I Wu
e176835019 graphics: replace non-const references by pointers
Pointers are preferred for output parameters in graphics code.  While at
it, initialize local variables that are for outputs.

Test: builds and boots
Change-Id: I959706ea92949bc2f993ee9beff0c8b0c3121347
2016-12-23 07:37:50 +08:00
TreeHugger Robot
f938ff2124 Merge "Change FMQ header location" 2016-12-20 23:14:42 +00:00
Hridya Valsaraju
89b5e6b318 Change FMQ header location
Bug: 31223612 33295104
Test: make
Change-Id: Ib999317333a13fe205dfa7b198f7edbb6657734b
2016-12-20 07:34:53 -08:00
Dan Stoza
0df10c4e41 HwcClient: Fix plane alpha
Plane alpha was being sent as a float but read as unsigned, which, when
converted to a float was causing things that were supposed to be
translucent to be opaque.

Bug: 33739111
Bug: 33737738
Test: Scrim behind modal dialogs is translucent and there is no more
      glitch when rotating apps

Change-Id: I6896bdbb9928bd1aa7265b3ef25a7a96d54ee227
2016-12-19 15:22:47 -08:00
TreeHugger Robot
7df53b7cfb Merge "Remove RGBX_FP16 format" 2016-12-17 04:11:13 +00:00
Chia-I Wu
02d69ca8ad Merge "graphics: rework IComposer" 2016-12-17 00:42:47 +00:00
Romain Guy
c7e0a38121 Remove RGBX_FP16 format
Bug: 32984164
Test: compile
Change-Id: I8ab55ee7aca685987daec7d499f95e9346476c31
2016-12-16 09:58:25 -08:00
Chia-I Wu
bb61a72be7 graphics: rework IComposer
Similar to IAllocator, introduce IComposerClient to manage resources.
Rework the interface such that most state changing calls are batched in a
"command buffer" and execute together.  The goal is to reduce the number
of IPC calls needed to set up the composer.

Test: builds and boots
Change-Id: I324009243234c4d2482ca0ef2591377b11530fc9
2016-12-16 10:27:39 +08:00
Romain Guy
ab2e00be4b Merge "Prevent conflict with deprecated pixel format constants" 2016-12-15 01:27:28 +00:00
Romain Guy
175766c8e4 Prevent conflict with deprecated pixel format constants
Bug: 32984164
Test: Compile
Change-Id: I9c3a1cdf0dbd498379453a982ac2a92aabb532b6
2016-12-13 17:02:05 -08:00
Yifan Hong
f35ee3b192 Revert "Revert "Update makefiles for Java package path.""
This reverts commit a8789f27cb.

Change-Id: I69980b580a556188ba868bb096ae1590b01759f5
2016-12-13 22:20:16 +00:00
Yifan Hong
a8789f27cb Revert "Update makefiles for Java package path."
This reverts commit ab0792ccdc.

Change-Id: I47fc272d9fa8875e3d7ccb10cb748c738fbf8135
2016-12-13 22:18:34 +00:00
Yifan Hong
ab0792ccdc Update makefiles for Java package path.
use V1_0 instead of 1.0.

Bug: 33554192

Test: hidl_test_java
Change-Id: Ic2d95265df10914a60a5bb743d75e839948838c3
2016-12-13 11:32:56 -08:00
Yifan Hong
501839495f Update makefiles for hidlizing IBase.
A new dependency android.hidl.base@1.0 is added for
all projects.

Test: mma

Change-Id: Ia70d0eb0d74de06475a339698386d383d491a43a
2016-12-03 01:01:14 -08:00
Yifan Hong
f9d303435d Update to use the correct logging library.
Test: mma compiles
Change-Id: Idb33dea5faaf1a5e54719c2a5a683d2d47e9b8e8
2016-12-01 17:47:02 -08:00
Chia-I Wu
a7f234cc34 graphics: fix potential leaks for IAllocator
Introduce IAllocatorClient to manage resources owned by a client (e.g., SF
or VTS).  This makes sure there is no resource leak when SF or VTS
crashes.

This also fixes two unrelated bugs

 - sizeof(Buffer) != sizeof(void*) on 32-bit impl.
 - layerCount was not set to 1 in tests

Test: builds and boots
Change-Id: I67f5cdd64b97fb3ce1b931099c25f59cc8517f21
2016-11-23 11:58:23 +08:00
Steven Moreland
bbff14d4bb Merge "Update makefiles for logging." 2016-11-22 17:25:36 +00:00
Martijn Coenen
70b9a15df0 Use newly introduced hidl_handle.
Bug: 32089785
Test: builds
Change-Id: I27c7d3945e1fe390661bf322987011a00fe9b3fe
2016-11-22 09:03:11 +01:00
Steven Moreland
f8d68ec855 Update makefiles for logging.
Bug: 32943424
Test: pass
Change-Id: Ic88ce6adf04e0e36db53e4cc06ac2ec5a90c011c
2016-11-21 16:28:54 -08:00
Chia-I Wu
bc46dacfc7 graphics: add target-side tests for IAllocator (again)
With fix for libhidl split and use PixelFormat from common@1.0.

Test: make
Change-Id: Ie4001f4a0c6cb10a5c4f1889dc8cc1907fdee8ca
2016-11-22 06:38:15 +08:00
Chia-I Wu
92354a5b31 Merge "Revert "graphics: add target-side tests for IAllocator"" 2016-11-21 22:22:48 +00:00
Chia-I Wu
24325c6356 Revert "graphics: add target-side tests for IAllocator"
This reverts commit 3e7889e0e8.

Change-Id: I724bcd2ea4fd1005cee132e13736cefd1820de73
2016-11-21 22:13:49 +00:00
Chia-I Wu
8ae0ad08fa Merge "graphics: add target-side tests for IAllocator" 2016-11-21 21:57:31 +00:00
Chia-I Wu
0b855f81c8 Merge "graphics: remove duplicated types" 2016-11-21 02:52:34 +00:00
Yifan Hong
6b920e43d3 Split libhidl into base and transport.
Bug: 32756130

Test: mma
Change-Id: Id21cf23abe2910f26bb7895511862443b93dc112
2016-11-18 00:00:54 -08:00
Chia-I Wu
1c45727b5d graphics: remove duplicated types
Remove duplicated types from allocator@2.0 and composer@2.1.  Those types
are now in common@1.0.

Bug: 32238126
Test: builds and boots
Change-Id: Ibdb907e47969f5a5a98a14a2e2b77a9c5880beff
2016-11-18 08:03:31 +08:00
Courtney Goeltzenleuchter
5f97c269f2 Add defines for wide gamut color support
Test: make
Change-Id: Iac9e91d20138f2aa452985ec170de441de64e865
2016-11-17 08:26:37 -07:00
Chia-I Wu
3e7889e0e8 graphics: add target-side tests for IAllocator
Add VTS annotation, generate .vts files, and add
graphics_allocator_hidl_hal_test.

Test: vts-tradefed
Change-Id: If5381315c4fca30c3798e4c266404d51b23ca508
2016-11-17 10:07:34 +08:00
Steven Moreland
035ce20c08 Merge "Ran update-makefiles.sh" 2016-11-15 17:31:18 +00:00
Steven Moreland
2c68cc4457 Ran update-makefiles.sh
Test: pass
Change-Id: Ia9d14d29ce9f5dc4688cc177bf747c7f11223b2b
2016-11-11 17:21:31 -08:00
Craig Donner
0b00adf391 Add layered image support to gralloc1 hal.
Bug: 31686534
Test: manual
Change-Id: I6442413072cef2a19abd3aacddf964ca1f4e7481
2016-11-11 11:35:06 -08:00
Yifan Hong
c2f2779d9d Update Android.bp to reexport dependent packages.
Test: mma
Change-Id: Iaca7300c366c2c9e860a29e6a111248d315cc5b4
2016-11-09 10:28:38 -08:00
Colin Cross
b785f5b82e Support genrules with multiple tools
To allow genrules with more than one tool, rename the tool property to
tools and make it an array, replace $tool with $(location <label>),
and use $() for other variables for consistency.

Bug: 31948427
Test: compare build.ninja
Change-Id: I3d714f70a2af0dc60faeee10e09b6ed166601f1d
2016-11-04 22:49:15 -07:00
Colin Cross
ded9852531 Stop using genrule to copy headers
There is no need to use a genrule to copy headers, just move them into
an appropriate directory in the source tree and export them directly.

Bug: 31948427
Test: mmma -j frameworks/native/libs/ui
Change-Id: I9c5f385e29c78d47479c77a546cfc737e4dd40f8
2016-11-04 22:49:15 -07:00
Chia-I Wu
4ee34311b3 graphics: add a type-only common package
Copied from system/graphics.h with two changes

 - YCbCr -> YCBCR
 - HAL_TRANSFORM_RESERVED is removed

Test: make
Change-Id: I1d343ff176ac61f911fee949861ce4b12255cd47
2016-11-03 12:01:58 +08:00
Steven Moreland
fcd74ebcdc Running update makefiles.
https://android-review.googlesource.com/#/c/298160/

Test: pass
Change-Id: I14fcde2d3aacc8f8cd9221f2d69e2feae9ae1226
2016-11-02 10:24:33 -07:00
Steven Moreland
69727778a7 Stop all these merge conflicts.
Test: mma -j64
Change-Id: I319198af32adf1fef180c5c2c22ba4b360fa7609
2016-10-26 12:04:37 +02:00
Steven Moreland
22566b8913 Use defaultPassthroughServiceImplementation.
Bug: 32279541
Bug: 32282345

Test: mma
Change-Id: Ic0222963c99bea41de7637e5f20c19d7c541cb97
2016-10-21 19:33:06 +00:00
Chia-I Wu
b0b5a4de76 graphics: add IComposer service daemon
Since HALs might run binder services, we need to start thread pool for
both binder and hwbinder.

Bug: 32021609
Test: builds and boots
Change-Id: I9779e86b1e611a180b1984af36c417dafc3329bc
2016-10-19 12:04:51 +08:00
Chia-I Wu
0c6b7f42a6 graphics: fix leaks in IComposer default impl
When a layer is removed, remove its cached buffer/sidestream as well.

Test: fixed OOM
Change-Id: Ibafe18ff686ae6bcb1fc4baed30b7784d2b40529
2016-10-19 12:00:45 +08:00
Chia-I Wu
4c0d397f1c graphics: add IAllocator service daemon
Bug: 32021161
Test: builds and boots
Change-Id: I2752559c4e168a4ea7cbd9223ef3692cdeda96f6
2016-10-19 11:57:47 +08:00
Chia-I Wu
7f8d39669c graphics: add a default implementation for IComposer
The default implementatoin is built on top of conventional hwcomposer2.

Test: make
Change-Id: Ia4f13b1d682462769056679fc0aae82a75cb53d2
2016-10-13 16:40:51 -07:00
Chia-I Wu
acce69901d graphics: add HIDL definition for HW composer
This is a direct translation of hwcomposer2.h to HIDL.

Test: make
Change-Id: Id007af271b06f0d86afc8bc7c57300c588dc4081
2016-10-13 16:40:51 -07:00
Chia-I Wu
0f215c5a33 graphics: add a default implementation to IMapper
The default implementatoin is built on top of conventional gralloc1.

Test: make android.hardware.graphics.mapper.hallib
Change-Id: I8647dc69dbb1637a141d36358d5769f450422ac1
2016-10-12 06:59:26 -07:00
Chia-I Wu
9af67ec5f8 graphics: add IMapper to complement IAllocator
IMapper is loaded in-process and is defined in C++ instead of HIDL.  To
guarantee binary compability, the interface is a struct of function
pointers instead of a class of pure virtual member functions.  The
functions pointed to by the function pointers must also have C-linkage and
have all of their parameters PODs.

Implementations are expected to be installed to

  /oem/lib/hw/android.hardware.graphics.mapper.hallib.so
  /vendor/lib/hw/android.hardware.graphics.mapper.hallib.so
  /system/lib/hw/android.hardware.graphics.mapper.hallib.so
  (lib64 instead of lib for 64-bit implementations)

The loader will look for the symbol "HALLIB_FETCH_Interface" and use it to
fetch the interface.

Test: make android.hardware.graphics.mapper@2.0
Change-Id: I3a2c7a6ce18a90adda6df2d89559c957a122fdf0
2016-10-12 06:59:26 -07:00
Chia-I Wu
109571a22a graphics: add a default implementation to IAllocator
The default implementatoin is built on top of conventional gralloc1.

This also adds a static library, libgralloc1-adapter.  It is intended to
ease the porting of gralloc0 to gralloc1.

Test: booted to launcher, tested with YouTube and some games.

Change-Id: Id640b1d5a1e1eea1aafabb6c134e6be6e71afff5
2016-10-12 06:59:26 -07:00
Chia-I Wu
e78aa1bd90 Add HAL definition for graphics buffer allocator
It differs from gralloc1.h in that

 - buffer descriptors are created from a struct, BufferDescriptorInfo, to
   reduce round trips
 - testAllocate is a function of its own
 - buffer allocation and export are two different steps
 - reference counting and buffer mapping are moved to gralloc-mapper
 - BAD_HANDLE is renamed to BAD_BUFFER
 - GRALLOC1_CONSUMER_USAGE_FOREIGN_BUFFERS is removed
 - CPU_{READ,WRITE}_OFTEN no longer implies CPU_{READ,WRITE}

Test: make android.hardware.graphics.allocator@2.0

Change-Id: Ibe9367d5b1701c0e1009da829f27fed0f7d98828
2016-10-12 06:59:26 -07:00