Commit graph

341 commits

Author SHA1 Message Date
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