Commit Graph

9945 Commits

Author SHA1 Message Date
TreeHugger Robot
85c34682bb Merge "Remove unused HWUI properties." 2018-12-05 16:31:25 +00:00
TreeHugger Robot
d33374530a Merge "use SkTextEncoding" 2018-12-05 14:10:13 +00:00
TreeHugger Robot
764acc461c Merge "Encoding of <overlayable> and <policy>" 2018-12-05 07:06:21 +00:00
TreeHugger Robot
163e42ca59 Merge "Prefer using 3 buffers in vulkan swapchain." 2018-12-05 02:44:32 +00:00
Ryan Mitchell
75e20dda2b Encoding of <overlayable> and <policy>
This change defines two new chunks for encoding overlayable information.
RES_TABLE_OVERLAYABLE_POLICY_TYPE contains flags that represent
restrictions enforced on overlays that try to overlay a specific set of
resource ids. The chunk header is followed by ResTable_ref for each id
that belongs to the policy type. A policy chunk will be created for
every unique combination of policies that are defined in overlayable
declarations.

RES_TABLE_OVERLAYABLE_TYPE holds policy blocks. Since <overlayable>
does not currently have any attributes, only one overlayable block is
encoded in an APK.

This change also removes the SPEC_OVERLAYABLE flag because the runtime
does not use the flag, and the overlayable chunk encoding renders it
obsolete.

Bug: 110869880
Bug: 117545186
Test: libandroidfw_tests and aapt2_tests
Change-Id: I45ae9bf4176699f14c85e2b7a2e8560185d8a0b8
2018-12-04 16:45:26 -08:00
Derek Sollenberger
fd1c87914a Remove unused HWUI properties.
Test: compile only
Change-Id: Ifef24fe53edcab63af3f9b634849d996dc7960ec
2018-12-04 16:22:58 -05:00
Ryan Mitchell
1e1d576b5c Merge "Do not include system overlay data when excluded" 2018-12-04 20:04:33 +00:00
Greg Daniel
4d5bf2a0f5 Prefer using 3 buffers in vulkan swapchain.
Test: manual build and running.
Bug: 119687951

Change-Id: I799955d8e035d01acb991417e95e424848fe711f
2018-12-04 19:50:38 +00:00
Mike Reed
d5342ae44e use SkTextEncoding
Test: make

Change-Id: I699aa495573e410043caaf97599172471fe8895d
2018-12-04 13:35:04 -05:00
TreeHugger Robot
58ccd604a1 Merge "Set color space on Vulkan render target surface" 2018-12-04 17:21:28 +00:00
Stan Iliev
987a80c0ca Set color space on Vulkan render target surface
Test: Pass UiRendering tests with Vulkan pipeline
Bug: 116117654
Bug: 111436479
Change-Id: Id58a8a93c6f311402273b1a9e3606c9732f55aec
2018-12-04 11:23:21 -05:00
TreeHugger Robot
d8a905b38c Merge "Remove dead code" 2018-12-04 15:52:33 +00:00
Elliott Hughes
01fb624e09 Merge "C++17 is the default now." am: fbb102ea84 am: ccb3d1d61a
am: 8dd21cd6b5

Change-Id: I79e72e3a99c9590fdbaab72507044aa85dfa38ef
2018-12-03 18:05:24 -08:00
Elliott Hughes
8dd21cd6b5 Merge "C++17 is the default now." am: fbb102ea84
am: ccb3d1d61a

Change-Id: I9d422db18f2c87c5f44e8f6e3598d6e597b32c21
2018-12-03 17:46:41 -08:00
Ryan Mitchell
449a54fb6b Do not include system overlay data when excluded
Do not include configurations or locales from overlays overriding system
resources when exclude_system is specified in GetResourceConfigurations
or GetResourceLocales.

Bug: 120083032
Test: run cts -m CtsContentTestCases -t
  android.content.res.cts.AssetManagerTest#testGetNonSystemLocales

Change-Id: I4ba3b07d3bb9ac72b196ff7ed4d1e853b51f7eea
2018-12-04 00:58:14 +00:00
Chris Blume
7b8a808b7d Remove ; from closing namespaces in libs/hwui
When closing a namespace a } is sufficient. It doesn't need to be };
like closing a class or enum.

Within frameworks/base/libs/hwui there is a mix between } and }; when
closing a namespace. There are even mixes between a .h and the
corresponding .cpp files.

In a separate CL I was asked to not close with };. That was a good
comment. I adopted the style from nearby code. This CL cleans up the
nearby code.

Test: I made sure the code still built as expected.
Change-Id: Ieb314a4f48d6e33752463f3be4361fdc9be97482
2018-12-03 16:05:14 -08:00
John Reck
46045217e3 Remove dead code
No longer needed

Test: none
Change-Id: Id260e4a2b1026b9ccd853f277f5e527fb7568f69
2018-12-03 14:58:28 -08:00
Elliott Hughes
60a42ccac5 C++17 is the default now.
Test: builds
Change-Id: I64495775afe4ded7d3312cc35a154fecba64adc3
2018-12-03 09:38:35 -08:00
Bo Hu
dd08224e4d Revert "Make HWUI's surface Reliable^TM"
This reverts commit 650bd9a7b3.

Reason for revert: broken emulator b/120342364

Exempt-From-Owner-Approval:

Change-Id: If05d9d87325e1d836375d7dc79ff66ef057d228d
2018-12-03 13:59:49 +00:00
Greg Daniel
ef60a0589e Merge "In VulkanManager enable ycbcr feature on VkDevice." 2018-11-30 14:27:28 +00:00
John Reck
f0732618f0 Merge "Make HWUI's surface Reliable^TM" 2018-11-29 23:23:00 +00:00
Greg Daniel
050361732a In VulkanManager enable ycbcr feature on VkDevice.
Test: manual build and test

Change-Id: I820670ee7566e1dd5c86cfa473725b91e4eb6154
2018-11-29 16:42:52 -05:00
John Reck
fd45bee176 Merge "Add a unique ID to rendernode" 2018-11-29 20:39:08 +00:00
John Reck
f96b284dec Add a unique ID to rendernode
Bug: 120089776
Test: dump'd skp, verified ID present
Change-Id: I97a03804ebc53925e1b79db3dd616a728eff0bfa
2018-11-29 10:34:32 -08:00
TreeHugger Robot
a248a6a08b Merge "Revert "Revert "support work chain in pulled atoms""" 2018-11-29 01:35:51 +00:00
John Reck
820f382b9e Merge "Remove USE_HWC2 usage" am: 8757179e52 am: 70a2813e86
am: 0ff158799a

Change-Id: I8e87f4661e51b422886c72ef506f196608a32a42
2018-11-28 17:30:15 -08:00
John Reck
0ff158799a Merge "Remove USE_HWC2 usage" am: 8757179e52
am: 70a2813e86

Change-Id: Ida5cf0bb3a644e29c9216fabb89670bf4ec58220
2018-11-28 17:15:58 -08:00
Chenjie Yu
d7e3a228be Revert "Revert "support work chain in pulled atoms""
This reverts commit 9c7b131996.

Reason for revert: Fixed build failures due to merge

Change-Id: I7d7bfed3a3234b966f3fe3fd6e0cbc63d2bedf83
Test: unit test
2018-11-28 15:53:09 -08:00
John Reck
650bd9a7b3 Make HWUI's surface Reliable^TM
You won't believe this one weird trick to make
EGL_BAD_ALLOC errors never happen again! libgui
hates it!

Bug: way too many to list
Test: none - there probably should be, though
Change-Id: I8e7fc3e584f90c01e0fd932497604a1d93710ba6
2018-11-28 13:39:07 -08:00
John Reck
c77543022d Remove USE_HWC2 usage
It's always true now

Test: didn't
Change-Id: Ibefde5feaeaec8fb68cbc6ea1c019bf8b5e608bb
2018-11-28 13:07:24 -08:00
Fabian Kozynski
e3b92ab6ba Merge "Revert "support work chain in pulled atoms"" 2018-11-28 20:32:50 +00:00
Fabian Kozynski
9c7b131996 Revert "support work chain in pulled atoms"
This reverts commit ce8e4dce60.

Reason for revert: breaking multiple targets in master

Change-Id: I3ee74b314e06cb2c4d3d6da82ca116a91aad67d4
2018-11-28 20:13:22 +00:00
Derek Sollenberger
5fdb83b2a3 Merge "Set the color space to sRGB on the Surface and remove colorFilter." 2018-11-28 19:40:22 +00:00
Chenjie Yu
fbc5842d16 Merge "support work chain in pulled atoms" 2018-11-28 19:10:30 +00:00
Mårten Kongstad
59d5a5a938 idmap: use more robust data structures
The problem of creating idmap data consists of three steps:

  1. create the mapping overlay resid -> target resid
  2. fix the padding between the target resids
  3. write the mapping as a binary stream

Because we iterate over the resources in the overlay package, there are
no guarantees on the order in which target resources are processed. This
means we can't fix the padding until after step 1. On the other hand,
after step 2 the mapping should be immutable.

Introduce new data structures that help enforce immutability and
ownership of data, as outlined above.

Bug: 80150169
Test: make libandroidfw_tests
Test: atest OverlayHostTests OverlayDeviceTests
Change-Id: I45689e8003c96d251a63a758f77609972ae963df
2018-11-27 13:04:29 -08:00
John Reck
0aff62d12f Fix failing TextureViewTest
A tiny scaleX/scaleY is sneaking into the matrix,
throwing off the nearest/bilerp calculation.

This tiny scaleX/scaleY appears to be coming from
the inverse texture matrix necessary to workaround
skia issue https://bugs.chromium.org/p/skia/issues/detail?id=7075

So add another workaround for SkMatrix::getType()
reporting this as having a scale, even though there really
isn't one.

Bug: 119783323
Test: atest android.view.cts.TextureViewTest#testSamplingWithTransform
Change-Id: I3e675102ef99ce093f698460242c19dfe7e90345
2018-11-26 16:41:34 -08:00
TreeHugger Robot
bae652012f Merge "idmap: optimize time to create idmap data" 2018-11-26 16:30:24 +00:00
TreeHugger Robot
21c9a426ae Merge "pass font instead of paint to blobbuilder" 2018-11-21 20:24:30 +00:00
TreeHugger Robot
dcf5b75bb4 Merge "InputFlinger Split: Use libinputreader in InputManagerService" 2018-11-21 18:21:05 +00:00
TreeHugger Robot
92553cefba Merge "Update method signature to match private Skia header." 2018-11-21 16:34:20 +00:00
Mike Reed
1c79eabd0e pass font instead of paint to blobbuilder
Test: make

Change-Id: I8605b03098f8fe1d255d3e4d690680c52baf2352
2018-11-21 11:02:19 -05:00
Mårten Kongstad
67d5c938e9 idmap: optimize time to create idmap data
Change idmap to iterate over the resources in the overlay package
instead of the target package when scanning for resources defined in
both packages. This cuts down the runtime cost of creating an idmap
considerably since the algorithm now scales with the number of resources
in the overlay package (a handful) and not the number of resources in
the target package (android: 10k, SystemUI: 8k) at a minor cost to code
complexity.

Improvements on the runtime of ResTable::createIdmap (systrace on an
emulator running aosp_x86_64-eng):

  - target=android: 12.5 ms -> 3.0 ms
  - target=SystemUI: 8.6 ms -> 1.0 ms

The bulk of the cost of creating an idmap from installd is now the fork
and execl to call "idmap --fd ..." which weigh in at 16 ms.

Bug: 80150169
Test: make libandroidfw_tests
Test: atest OverlayHostTests OverlayDeviceTests
Change-Id: I98e18d5958c0cd835a73055b714f5bf0f4f95a09
2018-11-21 06:48:19 -08:00
Derek Sollenberger
dbb4bc8012 Update method signature to match private Skia header.
Test: hwui_unit_tests
Change-Id: Idb1db2973c4b76b3322d87523383bc6fabe85ce7
2018-11-21 08:49:29 -05:00
Chenjie Yu
ce8e4dce60 support work chain in pulled atoms
+ also rewrite map and merge isolated uid to host uid.

output:
Pull from 10014: { 1541137009000000000 10430748770707
(10014)0x2010101->1[I] 0x2010182->lala1[S] 0x2010201->2[I]
0x2018282->lala2[S] 0x20000->10430750[L]  }

Bug: 119043339
Bug: 117975376
Test: unit test
Change-Id: Ib6e3ea0f76594438ee1b3e12e965d85fefb405d7
2018-11-20 16:15:31 -08:00
Peter Collingbourne
689a50ec83 Merge "Fix a use-after-free found by HWAsan." am: 82cf8de1f3 am: 2557458766
am: 96a4e5a412

Change-Id: Ia397ea5db31184e8b52ea3686d06a67d76d876e8
2018-11-20 11:12:19 -08:00
Peter Collingbourne
96a4e5a412 Merge "Fix a use-after-free found by HWAsan." am: 82cf8de1f3
am: 2557458766

Change-Id: I074b3c035442466b03476dca68987981d570440b
2018-11-20 10:56:17 -08:00
TreeHugger Robot
43fae0a000 Merge "Do not use both "virtual" and "override"." 2018-11-20 14:43:14 +00:00
Prabir Pradhan
e5696a5ccc InputFlinger Split: Use libinputreader in InputManagerService
This changes native InputManagerService to use the new backend library
for inputflinger: libinputreader.

Bug: 119264687
Test: manual: Build, run, and test input (touch, mouse)
Change-Id: I619492d5492cd8444d7c2cc7af9717c19c938256
2018-11-19 18:10:48 -08:00
Ryan Mitchell
0d5a91b137 Merge "Fix copying null reference across themes" 2018-11-20 01:00:45 +00:00
John Reck
635ca17ff5 Merge "Add an OWNERS to HWUI" 2018-11-20 00:25:09 +00:00