Commit Graph

9920 Commits

Author SHA1 Message Date
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
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
Ryan Mitchell
b85d9b2a32 Fix copying null reference across themes
When themes have two different AssetManagers, we only copy attributes
that exist in both the themes. If the value of the attribute or
reference is equal to 0 (a null reference but not using the TYPE_NULL
type), do not attempt to fix the package id of that null reference.

Bug: 119522708
Test: manual test of broken app
Change-Id: Id615d5a47b7f121b08bbba885d106b9cd3f54afc
2018-11-19 14:09:14 -08:00
John Reck
1733e2a6a3 Add an OWNERS to HWUI
Test: none
Change-Id: Idb248e91e1ccc8558775907d20208424a265796c
2018-11-19 12:56:09 -08:00
Aurimas Liutikas
588bdc6719 Merge "Add style value to ResolvedBag in AssetManager2." 2018-11-19 20:48:55 +00:00
Peter Collingbourne
13a734dc96 Fix a use-after-free found by HWAsan.
The variable sizeResult is an iterator pointing into mCurrentValues,
and clearing mCurrentValues invalidates the iterator.

Bug: 119773465
Change-Id: I940ea397af87561d33f74a9d52abc3afd0a7538f
2018-11-19 20:15:26 +00:00
Chris Blume
026d70ba45 Do not use both "virtual" and "override".
C++'s "override" keyword implies "virtual". When "virtual" and
"override" are both specified it means something slightly different from
just "override", which is what was intended here.

I teach the C++11 class here at Google. I asked the C++ arbitors to help
me understand this difference. They warned that it is dangerous and not
worth knowing. But that it is worth avoiding.

Test: Tested on local device -- no noticable change.
BUG=115613038

Change-Id: I372821053755fc4cbb1d001b71af7f02dffde5b2
2018-11-19 10:53:04 -08:00
TreeHugger Robot
058b705883 Merge "Add a sprinkle of speculative anti-crash dust" 2018-11-16 19:19:01 +00:00
Aurimas Liutikas
d42a670ee5 Add style value to ResolvedBag in AssetManager2.
Bug: 117176857
Test: updated AssetManager2Test.MergesStylesWithParentFromSingleApkAssets
Change-Id: I2b79eea8e43431a932756b267b91eb4423c968a5
2018-11-16 10:50:34 -08:00
TreeHugger Robot
db54beb98c Merge "Prepare for switch to idmap2" 2018-11-15 23:37:04 +00:00
John Reck
8e539ca15c Add a sprinkle of speculative anti-crash dust
Bugs: way too many
Bug: 113367810
Test: well it builds...
Change-Id: If00bcaad1c535c4996b59c1b5a7d3a4bba849191
2018-11-15 15:22:29 -08:00
Bookatz
75ee604244 Statsd atom: Power Use
BatteryStats calculates power usage of the device and various components
(such as apps). This information is used, e.g., in the battery panel of
Settings. We now log it to statsd. It can be used for validating how
good the information displayed in Settings is. In the long-term, it is
likely not ideal for off-device calculations, since that can be
hopefully estimated using statsd's raw data.

Three atoms: one for the total power use, one for the power use of each
uid, and one for each non-uid component. Since they will all likely be
pulled together, StatsCompanionService will provide stale data for
BatteryStats pulls called within a second of a previous BatteryStats
pull.

Also in this cl:
Remove StatsLogEventWrapper.writeDouble. Statsd doesn't support actually
writing doubles into its proto reports, so having this function is
misleading (the data will get to statsd and then be completely ignored).
It's less confusing if we don't pretend it does something.

Change-Id: If80bab8ea938afa4632535bb88ff59879fbe8099
Fixes: 119111972
Test: cts-tradefed run cts-dev -m CtsStatsdHostTestCases -t android.cts.statsd.atom.UidAtomTests#testDeviceCalculatedPowerUse
Test: cts-tradefed run cts-dev -m CtsStatsdHostTestCases -t android.cts.statsd.atom.UidAtomTests#testDeviceCalculatedPowerBlameUid
Test: BatteryStatsHelperTest#testDrainTypesSyncedWithProto
2018-11-14 18:13:58 -08:00
Stan Iliev
305e13a293 Handle ANativeWindow resize with Vulkan swapchain
Recreate VulkanSurface, if ANativeWindow has been resized. This
new code is hit when wallpaper is resized from 64x64 to real size.

Bug: 119111018
Test: Wallpaper is shawn correctly with Vulkan rendering
Change-Id: I5e43310e5ee8597a7f326d51b1773e2cf68b603a
2018-11-13 18:44:34 +00:00
Mårten Kongstad
06a1ac8229 Prepare for switch to idmap2
Prepare the idmap and asset managers for interfacing with idmap2 instead
of today's installd + idmap pipeline, but don't make the switch just
yet.

Instead, idmap2 runs as its own native daemon with an AIDL interface.
This removes the need for installd to fork and exec on each idmap call,
saving about 50 ms per call.

Bug: 78815803
Test: atest OverlayDeviceTests OverlayHostTests
Change-Id: I60852e15d99329896ff9de6559d1e7cd1c67e33d
2018-11-12 13:24:33 -08:00
Mårten Kongstad
e0930d324c libandroidfw: add FALLTHROUGH_INTENDED to silence warnings
Add FALLTHROUGH_INTENDED to silence compiler warnings such as the
following:

-------- 8< --------
[ 42% 27/63] //frameworks/base/libs/androidfw:libandroidfw clang++
Locale.cpp
frameworks/base/libs/androidfw/Locale.cpp:166:7: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
      case 5:
      ^
frameworks/base/libs/androidfw/Locale.cpp:166:7: note: insert 'FALLTHROUGH_INTENDED;' to silence this warning
      case 5:
      ^
      FALLTHROUGH_INTENDED;
frameworks/base/libs/androidfw/Locale.cpp:166:7: note: insert 'break;' to avoid fall-through
      case 5:
      ^
      break;
1 warning generated.
-------- >8 --------

Test: 'make libandroidfw' builds with no compiler warnings
Change-Id: I6bc67f2c072f88c9f1a92b7378a6f1a460db70b4
2018-11-12 13:07:08 -08:00
Mike Reed
7f63c89287 use SkFontMetrics rather than deprecated SkPaint::FontMetrics
Test: make

Change-Id: I02e5e36020f1511e1728037e5eeb353fb5e9f465
2018-11-12 08:17:29 -05:00
John Reck
6ae76d0d8a Merge "Refactors and a potential public API for rendering" 2018-11-09 19:16:27 +00:00
John Reck
8785ceb3b9 Refactors and a potential public API for rendering
Split out the View/ViewRootImpl bits from the
hardware rendering bits.

Create a potential public API surface for
hardware rendering

Bug: 112709971
Test: builds & boots

Change-Id: I9e6f44b07a170574a905f42338282c4bb7e95f56
2018-11-08 15:32:35 -08:00
Mike Reed
827df0576f cast to unsigned to prepare for bit packing
Test: make

Change-Id: Ifa5d89e43c0d189adf91927c58078358103bb4f0
2018-11-08 16:42:33 -05:00
Ryan Mitchell
45ac8e4002 Merge "Fix flaky idmap test" 2018-11-08 19:09:47 +00:00
TreeHugger Robot
c5c5b74da8 Merge "Fix VkInteropFunctorDrawable log messages" 2018-11-08 16:00:09 +00:00
Stan Iliev
575e267a23 Merge "Disable blending for opaque TextureView" into pi-dev
am: 5a3b666ab0

Change-Id: Ifc11ee820172117e3740e82829e37ff38ad8ca29
2018-11-07 13:54:42 -08:00
TreeHugger Robot
5a3b666ab0 Merge "Disable blending for opaque TextureView" into pi-dev 2018-11-07 21:35:14 +00:00
Chris Blume
e9d19cfc96 Merge "Rename VkFunctorDrawable->VkInteropFunctorDrawable" 2018-11-07 21:15:13 +00:00
Derek Sollenberger
d01b5916d8 Set the color space to sRGB on the Surface and remove colorFilter.
Also for a canvas wrapping a bitmap the colorspace of the bitmap
will be used to correctly blend content.

Test: CtsUiRenderingTestCases
Bug: 111436479
Change-Id: I63ad7a30605a7f725cc0ef4716d42ea978fb03e3
2018-11-07 20:56:28 +00:00
Ryan Mitchell
f00738a150 Merge "Only resolve non-dynamic resource references" 2018-11-07 18:42:06 +00:00
Ryan Mitchell
c2b0782c37 Fix flaky idmap test
The entry pool is encoded in UTF-8 not UTF-16. This would cause stringAt
to return a pointer to a cache that holds the UTF-8 string converted to
UTF-16. If the cache becomes invalidated, the UTF-16 pointer is no
longer valid and causes seg faults when looked up.

Test: libandroidfw_tests
Change-Id: I0f13dbeadd0d148de2805efd6cadb8e220368e3b
2018-11-07 10:28:56 -08:00