Commit Graph

9060 Commits

Author SHA1 Message Date
Zhizhou Yang
ded6035da8 Turn off PGO temporarily
Bug: http://b/67862169

Turn off PGO for hwui since it caused a performance regression in
tesetBitmapDrawPerf.

Test: Built successfully and tested the performance with benchmarks.
Change-Id: I7be1ff919cc03eb72e2464867a417cc3dad7a260
2017-10-17 13:37:00 -07:00
Yi Jin
7215f94401 Merge "Use ProtoOutputStream to strip Pii sensetive fields in incidentd" 2017-10-16 20:22:34 +00:00
Zhizhou Yang
990735ee4c Merge "Enable PGO for hwui" 2017-10-14 01:13:55 +00:00
Yi Jin
42711a0b4f Use ProtoOutputStream to strip Pii sensetive fields in incidentd
The in-place algorithm in ProtoOutputStream will have at most 2 copies
of possible nested message values incidentd is getting which makes it
more ram-efficient, and minimize allocations.

Bug: 65641021
Test: the units pass
Change-Id: Ic3fe99b7e27895bd613a129ba0f12ccfca4af317
2017-10-13 15:44:26 -07:00
Zhizhou Yang
17371ecffc Enable PGO for hwui
This patch is trying to apply PGO for hwui. According to some research
on PGO before, we got a 5% to 10% performance improvement with PGO on
hwui and we hope to enable it.

The patch specified a hwui.profdata file, which locates in internal
google_data/pgo_profile directory, to work as the profile to feed PGO.
This profdata can be re-collected through the PGO collecting script in
the benchmark directory, and it was based on hwuimicro/hwuimacro
benchmark for now.

PGO can be turned of by setting ANDROID_PGO_NO_PROFILE_USE environment
variable.

Test: Build hwui successfully and verified the performance improvement
on device through benchmark.
Bug: http://b/63768402

Change-Id: Ib63e5504be34bdfe49f6bc2c52964c30c81f1416
2017-10-13 11:42:13 -07:00
Adam Lesinski
d480f7ba8c AssetManager2: Provide a method for iterating over packages
Test: none
Change-Id: Ia6c335db1ed7d09cd444d387a29f18dc342a697f
2017-10-13 10:23:35 -07:00
Adam Lesinski
970bd8d283 AssetManager2: Implement IDMAP support
This enables RRO (runtime resource overlays) with AssetManager2

Test: make libandroidfw_tests
Test: out/host/<platform>/nativetest64/libandroidfw_tests/libandroidfw_tests --testdata=frameworks/base/libs/androidfw/tests/data
Change-Id: Id8079104faefbfaa3f4017d8f7ee1a8968f151a2
2017-10-13 10:23:34 -07:00
TreeHugger Robot
fcf52c6f5e Merge "libandroidfw_tests: package test data correctly" 2017-10-13 01:14:34 +00:00
Adam Lesinski
873ef0e230 libandroidfw_tests: package test data correctly
- Convert to use soong, which allows bundling test data with benchmarks.
- Also separate libandroidfw_benchmarks so that it doesn't depend
on gtest.

Test: manual
Change-Id: I45bd222fafa87172c77b7f5bb2a7a89ddca72361
2017-10-12 16:02:00 -07:00
TreeHugger Robot
b762f56e6b Merge "Add missing includes." 2017-10-12 22:19:48 +00:00
Rob Carr
53966760d7 Merge "Use new SurfaceFlinger transaction API." 2017-10-12 22:08:03 +00:00
Dan Albert
55a3ec923e Add missing includes.
Change-Id: I652b42aa8355e66405d3207e61d577b5ddf9ae17
Exempt-From-Owner-Approval: trivial cleanup
Test: mma
Bug: None
2017-10-12 13:27:26 -07:00
Dan Albert
cd4e159bbf Merge "Add missing includes." am: 4be4bb3db7 am: 41c08f49b4 am: e9aaf3c546
am: caebafaf94

Change-Id: I5ec663813ede4bb794691ecb5e9afc0140accb84
2017-10-11 22:56:45 +00:00
Dan Albert
caebafaf94 Merge "Add missing includes." am: 4be4bb3db7 am: 41c08f49b4
am: e9aaf3c546

Change-Id: I41e4375d053ad5aa64bd4ca3a78b23644b2c725b
2017-10-11 22:22:04 +00:00
Dan Albert
41c08f49b4 Merge "Add missing includes."
am: 4be4bb3db7

Change-Id: Icdae2b63df8e5d61e6acabb6fb85efa28026d535
2017-10-11 21:52:41 +00:00
Dan Albert
110e007fb8 Add missing includes.
Test: mma
Bug: None
Change-Id: Iec8b0a7854091946a4bb6e804c5f4cce39a52b47
2017-10-11 12:41:33 -07:00
Yi Jin
974a9c2885 Implement go/streaming-proto native libs, part 2
Implement ProtoOutputStream.h to write protobuf format data.

Usage of dumping proto:
ProtoOutputStream proto(fd);

proto.write(fieldId, value1); // dump a single value

// start to dump a message:
long long token = proto.start(messageFieldId);
proto.write(nestedField1, nestedValue1);
...
proto.end(token);

fieldId will be generated by protoc-cpp plugin(TBD). It is an encoded uint64_t
value, with 0 - 32 bits as its proto number, 33 - 40 bits reserved for
field type, int32, bool, string, message, etc. and 41 - 43 bits for
single, repeated or packed type. Currently packed field is not
supported.

Bug: 65641021
Test: N/A, need to wait for protoc-cpp plugin and will test in
incident_helper
Change-Id: Ic188615b950235aae0edeee4876b78d31feb5619
2017-10-10 17:16:34 -07:00
Robert Carr
e13b58e15b Use new SurfaceFlinger transaction API.
For now we reimplement global transactions in the Java side
JNI layer.

Bug: 64815723
Bug: 64816140
Bug: 64815766
Test: Existing tests pass. go/wm-smoke
Change-Id: I6c0a7b5e65b1b6cc844ac61f3269629af60a4244
2017-10-09 16:52:48 -07:00
Ben Wagner
dfa3307106 Merge "Use own enum instead of SkTypeface::Style." 2017-10-09 20:56:43 +00:00
Ben Wagner
2763fb726b Use own enum instead of SkTypeface::Style.
The current use of SkTypeface::Style and the naming of
Typeface::fSkiaStyle are misleading. Neither is used to actually
interact with Skia (which no longer uses the type in its API). Instead,
this type and field are used to track the values which will be exposed
through the jni layer which match the Android SDK values for the
constants on the android.graphics.Typeface type.

This change allows Skia to hide and eventually remove SkTypeface::Style,
as this is the last known external user. Additionally this allows
Android an easier path when updating the Typeface API in the future.

Test: refactoring CL. Existing unit tests still pass.
Change-Id: Ic820105a5b0d98727586fdc4a9a1c45e8ad40ff3
2017-10-09 18:26:39 +00:00
Stan Iliev
a73b0be1ea Fix layer transform matrix for TextureView
Fix order of matrix multipication and use drawImage instead of
shader.

Test: Ran camera app, message app and smart face lock app.
Bug: 67405584
Change-Id: I3df161d58218e1b1845f1c1ca2db2b12c51b3532
2017-10-06 12:22:07 -04:00
Yi Jin
667ded2fc9 Merge "Implement c++ native lib for streaming proto, part 1" 2017-09-30 00:08:44 +00:00
TreeHugger Robot
2f3072bcf4 Merge "Unpin images when skia pipeline object is destroyed" 2017-09-29 18:17:38 +00:00
Dan Willemsen
67d7c5ae5a Merge "Rename libz-host -> libz" am: 3e47510e0e am: 7190974801 am: 77a00d2b67
am: 79cd199b21

Change-Id: If8f2a330b042d383960fcde3779d697063fa632e
2017-09-29 10:10:38 +00:00
Dan Willemsen
79cd199b21 Merge "Rename libz-host -> libz" am: 3e47510e0e am: 7190974801
am: 77a00d2b67

Change-Id: Id9f42f47e16eb9193cc9f41ab095b8c37ec1d8f3
2017-09-29 09:33:31 +00:00
Dan Willemsen
7190974801 Merge "Rename libz-host -> libz"
am: 3e47510e0e

Change-Id: Iff30621eddc356394617efcc8ced9dc4c9e85e8d
2017-09-28 22:56:49 +00:00
Dan Willemsen
a2902e38a4 Rename libz-host -> libz
Test: m host
Change-Id: I2806dde519602bc31b622ae3b3f55ab8b1287744
2017-09-27 16:20:31 -07:00
Yi Jin
c23fad2f90 Implement c++ native lib for streaming proto, part 1
Extract protobuf class out and creates EncodedBuffer class
which holds protobuf data.
Next step is to create a ProtoOutputStream and let incident helper
adapt the change as well.
please see frameworks/base/core/java/android/util/proto

Bug: 65641021
Test: unit tested
Change-Id: I0dd343b2e62d60f091c8f857fae3452ec8da6b96
2017-09-27 12:23:51 -07:00
Stan Iliev
944dbf255a Apply texture matrix to the layer canvas
Fix camera preview shown inverted. Apply texture matrix when
drawing opengl layer.

Test: Ran camera preview in message app and smart lock with face.
Ran CtsUiRenderingTestCases and CtsGraphicsTestCases tests.
Bug: 65534412
Change-Id: I3ed52a6c62921fcdfe30104dd176802ed1533fad
2017-09-27 14:39:07 -04:00
TreeHugger Robot
de893f3f0a Merge "use new SkFontMgr API" 2017-09-27 14:39:06 +00:00
Mike Reed
839a186fc3 use new SkFontMgr API
Test: make

Change-Id: I926b604fac4ad92ddf72bbec2ce937bd1d2aac6e
2017-09-26 17:52:16 -04:00
Stan Iliev
232f3628bc Unpin images when skia pipeline object is destroyed
Unpin images when skia pipeline object is destroyed. This fixes
an assert in skia ~SkImage_Raster.

Test: Built and ran Android on a device.
Bug: 66730647
Change-Id: I73603efd4fc2ca584cdb8f6a4774e48a187f6787
2017-09-26 17:12:50 -04:00
TreeHugger Robot
d54a4921ab Merge "A few fixes to AssetManager2 for compat" 2017-09-26 20:12:10 +00:00
John Reck
997ac15bcb Merge "Quick fix: Make incorrect animator usage a warning" into oc-mr1-dev am: 2d362d7159
am: a54a5f6512

Change-Id: I3e78ede76656eff16fce54808a052ab79105ae79
2017-09-26 16:52:15 +00:00
John Reck
a54a5f6512 Merge "Quick fix: Make incorrect animator usage a warning" into oc-mr1-dev
am: 2d362d7159

Change-Id: I7e2895fdb802c25389a689f87e60fe408c955405
2017-09-26 16:34:45 +00:00
Adam Lesinski
03ebac8c68 A few fixes to AssetManager2 for compat
Theme copying should behave the way it did with the old AssetManager
(copy only the framework attributes when copying from a Theme object
from a different AssetManager).

Cleanup the dependencies on libziparchive in ApkAssets.

Test: make libandroidfw_tests
Test: out/host/<platform>/nativetests64/libandroidfw_tests/libandroidfw_tests --testdata=frameworks/base/libs/androidfw/tests/data
Change-Id: I973f7e6eb14ce311306e2ec66a623a4790c8d233
2017-09-25 18:24:41 -07:00
John Reck
d2080d52b3 Quick fix: Make incorrect animator usage a warning
Change-Id: I6d59033433a63d02be746bb8523b312d7c8fe9fa
Bug: 65160121
Test: Repro from bug doesn't repro anymore
2017-09-25 23:27:38 +00:00
Derek Sollenberger
71b36912e0 Merge "Reduce overhead by combining libskia and libhwui into a single library." 2017-09-25 15:45:34 +00:00
Chris Craik
eeca86f7a8 Merge "Speculative fix for missing target crash" into oc-mr1-dev am: a6aafa33ec
am: e188aa84ef

Change-Id: I952357aa76aca5bb6f90d427ddf3d4d5d38f06fe
2017-09-22 23:07:16 +00:00
Chris Craik
e188aa84ef Merge "Speculative fix for missing target crash" into oc-mr1-dev
am: a6aafa33ec

Change-Id: I30c5f2f7b27fb4f35991082bcff5c8995fbcdd75
2017-09-22 22:58:43 +00:00
TreeHugger Robot
a6aafa33ec Merge "Speculative fix for missing target crash" into oc-mr1-dev 2017-09-22 22:41:59 +00:00
Dake Gu
626be1518c Merge "hwuitest: added hwui test for TV application" into oc-mr1-dev am: 88dd458c9a
am: 9a98142be3

Change-Id: I1f90d7c4a1e028bbe967aa5fbe47c8f0c24f5a35
2017-09-22 19:55:42 +00:00
Tenghui Zhu
c0c225a837 Merge "Add systrace for VectorDrawable inflation and draw" into oc-mr1-dev
am: dbe5afd90d

Change-Id: I906a1762d0f768fdb1cac2147a29ae9e0ab8ffe2
2017-09-22 19:49:58 +00:00
Tenghui Zhu
dbe5afd90d Merge "Add systrace for VectorDrawable inflation and draw" into oc-mr1-dev 2017-09-22 19:45:17 +00:00
ztenghui
3d30ca1d3c Add systrace for VectorDrawable inflation and draw
We didn't trace the draw from cache.
Here we add trace for draw into bitmap, which is normally heavy.

fix: 65060698
Bug: 65060698
Test: run test app and get systrace and check

Change-Id: Ia81127c4aa285b3277e9c9edbdf356d85cb28b5e
(cherry picked from commit cf0c41dbc2)
2017-09-22 19:44:24 +00:00
Dake Gu
9a98142be3 Merge "hwuitest: added hwui test for TV application" into oc-mr1-dev
am: 88dd458c9a

Change-Id: I8aa8b1c90f18aaac3342b0652979834fadccc167
2017-09-22 19:35:35 +00:00
Dake Gu
88dd458c9a Merge "hwuitest: added hwui test for TV application" into oc-mr1-dev 2017-09-22 19:26:42 +00:00
Chris Craik
89cd62c8f3 Speculative fix for missing target crash
Bug: 66451158
Test: manual app usage

Change-Id: I2db3aa73edcb80da25ead64205011705f0beef91
2017-09-22 10:00:14 -07:00
Stan Iliev
1843ac7cc9 Fix alpha fading in System UI
Fix alpha not being applied for Views that have non overlapping
rendering (getHasOverlappingRendering is false).

Test: Ran system UI
Bug: 65857651
Change-Id: I31001de0f67bf95ab8425189a4b78427d062585d
2017-09-21 17:14:10 -04:00
Dake Gu
bec4a06812 hwuitest: added hwui test for TV application
This is a test that simulates a standard TV application screen.

The UI elements:
A full screen background bitmap.
Few rows of cards.
Each card has a bitmap and an info area.
Info area has two lines text.
Each card is dimmed, implemented in two modes:
1. adding translucent color RenderNode on top of card
2. applying ColorFilter to bitmap.
Firt card of each row is scaled up and has shadow.

The animations:
Cards are updating translation Y and updating display list
and overlay color alpha or colorfilter.

Test: there are four tests:
tvapp: baseline test, with rounded corner, use Color RenderNode to dim
tvapp_norc: no rounded corner
tvapp_cf: use colorfilter to dim
tvapp_norc_cf: no rounded corner, use colorfilter to dim

Bug: 64990221

Change-Id: I385e349386c41e32b7313180db8c81b8f3e39f88
2017-09-20 17:42:03 -07:00