10748 Commits

Author SHA1 Message Date
Derek Sollenberger
2173ea286a Export symbols for the newly exposed APEX/internal headers
Bug: 137655431
Test: CtsUiRenderingTestCases
Change-Id: I71c6d1a53ae080bf104848679ee62a77cf07c9fa
2020-02-20 21:50:06 -05:00
Derek Sollenberger
42c50042d1 Remove dependence on libandroid_runtime from Bitmap.cpp
The end goal is to have Bitmap.cpp use AParcel, but until that
API is extended to support this use case this is an alternative
way to isolate the graphics files from the libandroid_runtime.

Test: CtsGraphicsTestCases
Bug: 145227478
Change-Id: Ie3854fe03dec4f7b1b485295bb9a5ebba52ddb7c
2020-02-20 21:50:06 -05:00
Derek Sollenberger
15da7e24a5 Update Region.cpp to use AParcel NDK APIs
Test: CtsGraphicsTestCases
Bug: 145227478
Change-Id: I36f5d3e760bce3c302277c7897c7f8df0ac3cb61
2020-02-20 21:50:06 -05:00
Derek Sollenberger
ee538a3a85 Cleanup header and build targets for libhwui clients.
Targets that will also be contained within the UI module
are allowed to access internal headers.  All other targets
that depend on libhwui are restricted to using the APEX headers.

Bug: 137655431
Test: CtsUiRenderingTestCases
Change-Id: Id92e9874dafb98bd79839d45ab8f22ab999689de
2020-02-20 21:50:06 -05:00
Derek Sollenberger
c5882c4eb6 Remove dependencies on headers outside UI module
This includes AndroidRuntime and core_jni_helper.h

Bug: 137655431
Test: CtsUiRenderingTestCases
Change-Id: If3d26f41eaf4981505ee47634097f3645fd563fd
2020-02-20 21:49:44 -05:00
Derek Sollenberger
5368eda512 Cleanup LOG_TAG when bundled in HWUI
Bug: 137655431
Test: CtsUiRenderingTestCases
Change-Id: If0f1377e0ab831f38d752c3bbe282397c061b02c
2020-02-19 21:13:34 -05:00
Derek Sollenberger
83ccff716f Move android.graphics JNI & APEX files into HWUI
The graphics JNI code is now separate from libandroid_runtime
and it along with HWUI headers are no longer visible to targets
outside the boundary of what is to become the UI mainline module

The exposed headers to targets outside the module are now restriced
to C APIs contained in the apex header directory.

Bug: 137655431
Test: CtsUiRenderingTestCases
Change-Id: I30d34055b6870dc1039f190a88f4a747cee17300
2020-02-19 21:13:34 -05:00
TreeHugger Robot
2ae81c3c0f Merge "Update GraphicsStats proto definition" 2020-02-19 14:23:20 +00:00
Stan Iliev
b65171956c Update GraphicsStats proto definition
Follow ProtoBestPractices and comments suggested by cl/295218381.
Changing proto definition, should be fine, because these are
fields added after the last Android release.
Move PipelineType enum inside GraphicsStats and add a default
UNKNOWN state.
Rename start_millis and end_millis in GraphicsStats atom.
Fields in GraphicsStatsProto cannot be renamed as these were
part of previous Android releases.

Test: Ran "adb shell cmd stats pull-source 10068"
Test: Ran "statsd_testdrive 10068" and it looks OK
Bug: 149646555
Change-Id: Idc326eb2a7eb9ff0be39026e6fec544491b7d8a6
2020-02-18 10:12:42 -05:00
TreeHugger Robot
d8c867b117 Merge "[HWUI] Remove libgui from libhwui's dependency list" 2020-02-15 02:21:42 +00:00
TreeHugger Robot
805edec77d Merge "[HWUI] Remove references to gui/Surface." 2020-02-15 02:16:16 +00:00
TreeHugger Robot
9d0ab78e40 Merge "Use updated factory for SkOverdrawColorFilter" 2020-02-15 00:16:54 +00:00
Howard Ro
c7ddb87337 Merge "Allow statsd to link against libprotoutil" 2020-02-14 23:28:02 +00:00
Alec Mouri
680414e09e [HWUI] Remove libgui from libhwui's dependency list
* Add sync features extensions into EglExtensions
* Header cleanup

Bug: 136263382
Test: builds
Change-Id: Ibd29cfe5201419210c9dc09e82af10524454b6cd
2020-02-14 15:24:22 -08:00
Alec Mouri
43fe6fcde5 [HWUI] Remove references to gui/Surface.
ANativeWindow usage now has enough feature parity so that we can use
that instead.

Bug: 137012798
Test: builds
Test: Scroll through settings
Change-Id: I0054315058b28bcb5e779a6f71a3cfb164625a5f
2020-02-14 15:24:16 -08:00
Mike Reed
331c4e1207 Use updated factory for SkOverdrawColorFilter
Test: make

Change-Id: Ibf67a37e90152326b3088d2f15f17a6ad261658c
2020-02-14 17:50:18 -05:00
Jeffrey Huang
260613f89f Allow statsd to link against libprotoutil
Bug: 145923087
Test: m -j
Change-Id: I8e21903d8a1c142499ee5b772da54b0fcbae3b67
2020-02-14 10:08:22 -08:00
TreeHugger Robot
bc12e084cd Merge "[ANativeWindow] Rename allocateBuffers to tryAllocateBuffers" 2020-02-14 12:04:48 +00:00
Alec Mouri
c9d5f3d952 [ANativeWindow] Rename allocateBuffers to tryAllocateBuffers
Renaming was done in response to API feedback.

Bug: 148962594
Test: builds
Change-Id: I05b3e99800d967dda243b6e7af48f1b645909bdd
2020-02-13 13:58:50 -08:00
Alec Mouri
8a82b141d1 [HWUI] use ANativeWindow_getLastQueuedBuffer api
Bug: 137012798
Test: builds
Change-Id: Ic33a21a73b0579726f47c53cc102fb91b5ead0d6
2020-02-13 13:28:36 -08:00
Automerger Merge Worker
7cd9daebb1 Merge "Merge "Remove String16 operator<<, now provided in header" am: 35d04c27ee am: f1e6950510" into qt-qpr1-dev-plus-aosp am: 2593e104d5
Change-Id: I5cc3034b3d8ad29a3244ab436325f1f6a5cf243c
2020-02-11 23:26:19 +00:00
Automerger Merge Worker
f1e6950510 Merge "Remove String16 operator<<, now provided in header" am: 35d04c27ee
Change-Id: I225b599e1bb7ba052361c0c0cb926b2c015f7baf
2020-02-11 23:03:21 +00:00
Ryan Mitchell
2ad1f912c0 Merge "Sort bag by attribute key when using libs" 2020-02-10 23:38:59 +00:00
Steven Moreland
849ccdeafe Remove String16 operator<<, now provided in header
Bug: N/A
Test: N/A
Change-Id: Ic0418d81d37726dcfc100ce919b6f79be4077c8a
2020-02-10 15:28:41 -08:00
Ryan Mitchell
155d539634 Sort bag by attribute key when using libs
When shared libraries are assigned package ids in a different order
than compile order, bag resources that use attributes from both
multiple libraries will not be sorted in ascending attribute id order.
This change detects when the attribute ids are not in order and sorts
the bag entries accordingly.

The change is designed to be less invasive. Deduping the GetBag logic
should probably be spun off in a separate bug.

Bug: 147674078
Test: libandroidfw_tests
Change-Id: Id8ce8e9c7ef294fcc312b77468136067d392dbd0
2020-02-10 14:12:00 -08:00
Jerome Gaillard
0eb6fbd686 Merge changes Ia42a37c0,I644bc828
* changes:
  Make libandroid_runtime build on mac
  Make HWUI build for macOs
2020-02-10 11:56:33 +00:00
TreeHugger Robot
0dff4461ac Merge changes from topic "statsd_libbinder_ndk"
* changes:
  Use StatsDimensionsValueParcel within statsd apex
  Use cpp aidl_interface within statsd
2020-02-08 03:33:25 +00:00
TreeHugger Robot
0bfb664126 Merge "Refactor GraphicsStatsService for updateability" 2020-02-08 00:00:36 +00:00
Ruchir Rastogi
56da4c3862 Use StatsDimensionsValueParcel within statsd apex
Because statsd now uses StatsDimensionsValueParcel instead of
StatsDimensionsValue.h/c, statsd no longer has to depend on libservices.

Test: m -j
Test: atest StatsdHostTestCases#testBroadcastSubscriber
Bug: 148604617
Change-Id: I6d65383ccec99f4672d6575232981c0f6cc40fcf
2020-02-07 15:55:11 -08:00
TreeHugger Robot
09b630ef77 Merge "PointerController: Add guards to ensure display is valid" 2020-02-07 23:47:28 +00:00
Tim Murray
072be5e5c0 Merge "hwui: remove FatVector" 2020-02-07 20:37:09 +00:00
Prabir Pradhan
be845950a2 PointerController: Add guards to ensure display is valid
This change makes it so that PointerController does not ask its Policy
to load any resources for any displays until a DisplayViewport is set,
and verifies this with unit tests.

Bug: 145699789
Bug: 146385350
Test: atest libinputservice_test
Change-Id: I2e48e7ac4700e6f9fdf939a7bd0e6639b051ade6
2020-02-07 12:24:32 -08:00
Tim Murray
0865f2e7b2 hwui: remove FatVector
FatVector now lives in fw/native/libs/ui.

Test: builds, boots, works
Bug: 149096186
Change-Id: I09dc2fddd2a238ef47d7853b64b0bfbf74d3f71f
2020-02-07 17:57:44 +00:00
Stan Iliev
c90438175f Refactor GraphicsStatsService for updateability
Move GraphicsStatsService to android.graphics package.
Move GraphicsStatsService JNI from libservices.core to
libandroid_runtime.
Declare GraphicsStatsService ctor as the only @SystemApi.
Remove MemoryFile usage from GraphicsStatsService, but use
SharedMemory and other SDK APIs instead. This is done to
avoid using unstable API MemoryFile.getFileDescriptor.
Propose new SharedMemory.getFdDup API for next release, which
is hidden for now.
Refactor statsd puller to avoid proto serialization by moving
data directly into AStatsEventList.
"libprotoutil" is added as a static dependancy to libhwui, which
should be fine because its implementation does not link anything.

Bug: 146353313
Test: Ran "adb shell cmd stats pull-source 10068"
Test: Passed unit tests and GraphicsStatsValidationTest CTS
Change-Id: If16c5addbd519cba33e03bd84ac312595032e0e1
2020-02-07 12:27:07 -05:00
Leon Scroggins
cbeeff9e2e Merge "AImageDecoder: allow no color conversion" 2020-02-07 14:27:15 +00:00
Derek Sollenberger
3109b4cc47 Merge "Ensure SkiaPipeline always has a valid colorspace." 2020-02-06 19:47:24 +00:00
Alec Mouri
ff07c8fd76 [HWUI] use native_window timestamp apis
These aren't finalized as stable yet until we sort out some BufferQueue
challenges.

Bug: 137012798
Test: builds
Change-Id: Icd5eb02afc4cf16a2be485e6710f71818b300b9d
2020-02-06 08:09:30 -08:00
Derek Sollenberger
1863d94e9a Ensure SkiaPipeline always has a valid colorspace.
Previously we didn't assign a colorspace to the pipeline until it
was provided a surface to render into.  This resulted in undefined
behavior if the application attempted to render an offscreen layer
before the OS provided the main window with its surface. Now instead
of deferring setting whether or not the application is wide gamut we
do initialize it to a default setting when the pipeline is created.

Bug: 148042673
Test: apct/device_boot_health_check_extra_postsubmit
Change-Id: I84d743511e949ac977486470bb14eec936de7f88
2020-02-06 07:41:50 -05:00
TreeHugger Robot
c66f4316d6 Merge "Convert fatal aborts to error returns" 2020-02-06 05:09:12 +00:00
Joe Onorato
758bc85bf7 Merge changes from topic "b_144187174"
* changes:
  Remove this TEST_MAPPING file until I can figure out what this error means
  Make libincident into a stable C API.
2020-02-06 03:09:52 +00:00
Joe Onorato
d1d1aeb46a Remove this TEST_MAPPING file until I can figure out what this error means
Missing test_suite setting for test: GtsIncidentConfirmationTestCases, test group: presubmit, TEST_MAPPING file path: [frameworks/base/libs/incident]
Missing test_suite setting for test: GtsIncidentManagerTestCases, test group: presubmit, TEST_MAPPING file path: [frameworks/base/libs/incident]

Test: treehugger
Change-Id: I8c3f5a2ff1e22be764ae4cc42223a29f10a3480e
2020-02-05 15:58:59 -08:00
John Reck
869cb2ad7e Merge "Adjust present time calculation" 2020-02-05 20:39:54 +00:00
Joe Onorato
255ffff56d Make libincident into a stable C API.
Test: atest GtsIncidentConfirmationTestCases GtsIncidentManagerTestCases libincident_test
Bug: 144187174
Change-Id: I65b5a13cfb6a57aa56f738e25a76c5ecb8e7a1a8
2020-02-05 08:29:23 -08:00
Leon Scroggins III
6eeca5c776 AImageDecoder: allow no color conversion
Bug: 135133301
Test: I5e8bdcdae6837db23c0f4ef08f931f3bebe0ce0d

Previously the default SkColorSpace for AImageDecoder was set to the
result of SkAndroidCodec::computeOutputColorSpace. If the image has a
profile that does not map to an SkColorSpace, it will return either
DISPLAY_P3 or SRGB. Using that at decode time will result in color
conversion.

Instead, default to a null SkColorSpace for such a profile, resulting in
no color conversion. If the image has no profile, default to SRGB, as
usual.

A client that wants SRGB can still request and get that, but this allows
getting the raw pixels for an advanced client that may want to do its
own conversion.

Change-Id: I489f31fef79dec11e97c8e8fb9207adb77a3d0c7
2020-02-04 16:11:25 -05:00
Nathaniel Nifong
73420dd351 Merge "Provide a typeface proc during SKP serialization that forces typefaces to be written." 2020-02-04 17:48:20 +00:00
Jerome Gaillard
f9a4dc41b5 Make HWUI build for macOs
Only use AnimatedImageThread on Android, it is not currently supported
on host.

Bug: 148525019
Test: on macOs: lunch sdk & m libhwui
Change-Id: I644bc82887fb7e36b2a5e4117ee328a3df99a0d4
2020-02-04 14:33:27 +00:00
John Reck
56cffe5b6a Adjust present time calculation
Adjust the target present time when using
render_ahead to better fit in the gaps between
vsync pulses. This prevents small clock
drifts from causing jank.

Bug: 143540628
Test: manual, looked at systrace
Change-Id: I26ae6ebf16a3dea48dfd8e1c420d9e5e43e42bcb
2020-02-03 16:47:12 -08:00
John Reck
996773a5d3 Convert fatal aborts to error returns
Bug: 148805166
Test: none
Change-Id: I7824ed77721d2fc9a414797d4637e9d9239f1a99
2020-02-03 16:30:56 -08:00
TreeHugger Robot
0fc173055f Merge "[HWUI] Use ANativeWindow_getNextFrameId api." 2020-02-03 22:52:19 +00:00
TreeHugger Robot
5e135fe823 Merge "Adapt SurfaceControl to libgui API for display info" 2020-02-03 22:29:43 +00:00