Commit Graph

9492 Commits

Author SHA1 Message Date
zhangkuili
399ac24bdf Merge "[Stability][hwui] check mmap return value"
am: b352dcd153

Change-Id: I8d04c5433ca881e62a23e0aa13e022cdf8d16d9a
2018-06-21 14:53:15 -07:00
zhangkuili
24a1bc39bb [Stability][hwui] check mmap return value
If mmap failed, it return -1 (MAP_FAILED)

Bug:110507462
Test: manual

Change-Id: I3d0bac2e7c8b0bdc9cfb4ebb7b766d858876679d
Signed-off-by: zhangkuili <zhangkuili@xiaomi.com>
2018-06-21 17:43:10 +08:00
Romain Guy
0e6f553743 Fix PixelCopyTest failure in CTS
This feature needs support for renderable float textures, but the checks
were only guaranteeing support for float texture reads.

Bug: 68754504
Test: CtsViewTestCases

Change-Id: I0ce4a81cb8e09c10a5f1e65234685767a24ef8c4
Merged-In: I0ce4a81cb8e09c10a5f1e65234685767a24ef8c4
(cherry picked from commit 8472ac67fd)
(cherry picked from commit 8dc7f8275e5ba9004d219d7d7d990e91fc702095)
2018-06-20 22:52:35 +00:00
Neil Fuller
7dbefdcb92 resolve merge conflicts of 26119befba to pi-dev-plus-aosp
BUG: None
Test: I solemnly swear I tested this conflict resolution.
Change-Id: Iea64af5a88c9bf399fb26468e931be3c73061bac
2018-06-07 20:02:59 +01:00
Ryan Mitchell
6899839e07 Merge "Fix DynamicRefTable::load security bug" into oc-mr1-dev am: 2b6805fedc
am: 5ae85666ac

Change-Id: I64521a290482adb5ade95b641ce9c0c27031a814
2018-06-06 16:09:35 -07:00
Ryan Mitchell
5ae85666ac Merge "Fix DynamicRefTable::load security bug" into oc-mr1-dev
am: 2b6805fedc

Change-Id: I5ef0a789b16dc8aa0936d8fcca3917ce2f884d74
2018-06-06 15:50:57 -07:00
Neil Fuller
d2f29d7a6f Remove CommonClock / CommonTimeManagementService
The service and associated code is unused.

Bug: 80462439
Test: build / boot
Merged-In: Ibdfab1b7d2951a0c45e07bd47850af037990841b
Change-Id: Ibdfab1b7d2951a0c45e07bd47850af037990841b
2018-06-06 17:03:55 +01:00
Ryan Mitchell
18a6ada4aa Fix DynamicRefTable::load security bug
DynamicRefTables parsed from apks are missing bounds checks that prevent
buffer overflows. This changes verifies the bounds of the header before
attempting to preform operations on the chunk.

Bug: 79488511
Test: run cts -m CtsAppSecurityHostTestCases \
        -t android.appsecurity.cts.CorruptApkTests

Change-Id: I02c8ad957da244fce777ac68a482e4e8fa70f846
Merged-In: I02c8ad957da244fce777ac68a482e4e8fa70f846
2018-06-05 22:05:11 +00:00
Yu Jia
048c6751d7 Merge "cts case com.android.server.cts.GraphicsStatsValidationTest#testDaveyDrawFrame in modue CtsIncidentHostTestCases failed" am: 2dd3d8cbef
am: d490e788f1

Change-Id: I6e3507cfb5b6501dd28fb2b6019fdbb74fb745f0
2018-06-04 19:42:29 -07:00
John Reck
8b3480c667 Merge "Attempting to fix the black flicker" into pi-dev
am: b559512508

Change-Id: I95ee7346a8d2f10c07185d3c386a7ee778f6bd98
2018-06-01 04:31:50 -07:00
Derek Sollenberger
fe1c990a57 Merge "Bind correct FBO when drawing a WebView into a layer." into pi-dev
am: 6a1df0d541

Change-Id: Idd4a3432df50e502a84747d240a1940bf3cb6b8c
2018-05-31 20:51:45 -07:00
John Reck
b559512508 Merge "Attempting to fix the black flicker" into pi-dev 2018-06-01 03:05:51 +00:00
Derek Sollenberger
0fba15b2ba Bind correct FBO when drawing a WebView into a layer.
The WebView was unable to draw into either a standard clipped
layer or the "fading edges" unclipped layer. This CL and its
companion test cases ensure that both work with simple and
complex clips.

Bug: 79619253
Bug: 80443556
Bug: 80477645
Test: atest CtsUiRenderingTestCases:.LayerTests
Merged-In: I0e16b724f74415a61cc2a841ccf4a491f293ac94
Change-Id: I4900222975fc841b11828916878fb0ea6d87dcda
2018-06-01 01:08:15 +00:00
John Reck
5b02c629bd Attempting to fix the black flicker
Bug: 79231206
Test: Repro steps from bug

Merged-In: I4c2810c42a7a4358f64584da3ab0cdf1499e71b6
Change-Id: I4c2810c42a7a4358f64584da3ab0cdf1499e71b6
2018-05-31 12:56:28 -07:00
Yu Jia
e57493ab19 cts case
com.android.server.cts.GraphicsStatsValidationTest#testDaveyDrawFrame in
modue CtsIncidentHostTestCases failed

This cts case design 20 frames, every 4 frames include 700ms frame and
150ms frame

When activity launched, first 3 frames need allocate buffer during
dequeue buffer, bug some low-end platform took too long (>6ms), so
it will skip the fourth frame(150ms) and post a new draw callback that will cause cts failed
2018-05-30 13:34:19 +08:00
Stan Iliev
8deb6ac7cd Merge "Make sure frame buffer 0 is bound before calling GL functor" into pi-dev
am: a2cc38e7fb

Change-Id: Iedbd9549e754bb2884f447e3d964b9601e9161e5
2018-05-23 18:36:42 -07:00
TreeHugger Robot
a2cc38e7fb Merge "Make sure frame buffer 0 is bound before calling GL functor" into pi-dev 2018-05-23 22:14:21 +00:00
Stan Iliev
357c63d1e9 Make sure frame buffer 0 is bound before calling GL functor
Make sure view port and frame buffer are set to the correct values
before calling GL functor (WebView) draw.
Improve correctness for stencil clip by doing a second flush that
guarantees the stencil clear will be executed after draw commands.

Bug: 79619253
Test: XFINITY Connect app draws correctly
Change-Id: Ieb3d0d70caf0469b6393e6287f8529cd86519301
2018-05-23 15:29:09 -04:00
Ryan Mitchell
9964297b44 Merge "ResStringPool: Prevenet boot loop from se fix" into pi-dev
am: 8dd9ef190b

Change-Id: I0000c4a3f06e002804aa7172505e07bb57c550c6
2018-05-22 14:16:13 -07:00
Ryan Mitchell
f05f47b2c1 ResStringPool: Prevenet boot loop from se fix
Changes the logs adding in a previous security fix to warnings so
devices with malformed APKs currently on them will not undergo DOS when
they are upgraded to P.

Bug: 79724567
Test: run cts -m CtsAppSecurityHostTestCases \
          -t android.appsecurity.cts.CorruptApkTests

Change-Id: Ied54e4bb14abdaf79da562022c7ea6075187c1f8
2018-05-21 13:59:23 -07:00
Ryan Mitchell
b3da3a9673 Merge "ResXMLTree: Clone DynamicRefTable on creation" into pi-dev
am: fd37ec90b8

Change-Id: I3030d62104142b33dfb9844faa2fcb9840d8ee61
2018-05-21 11:53:56 -07:00
TreeHugger Robot
fd37ec90b8 Merge "ResXMLTree: Clone DynamicRefTable on creation" into pi-dev 2018-05-21 17:59:35 +00:00
Jorim Jaggi
9ac7de096d Merge changes I608d4b61,Ia7900e75 into pi-dev
am: e4a8d4c7e9

Change-Id: Idedbe8e08b17c52d8d9e6b6d83286f66218d41f9
2018-05-18 05:01:44 -07:00
Jorim Jaggi
e4a8d4c7e9 Merge changes I608d4b61,Ia7900e75 into pi-dev
* changes:
  Follow up to Ia7900e753b29187a7a7b81f393666687e8b8e04b
  Apply surface parameters in sync with RenderThread
2018-05-18 11:49:56 +00:00
Adam Lesinski
89794158a1 Change ownership of AAPT2 and libandroidfw
toddke@ is now the new owner of these projects.

Exempt-From-Owner-Approval: setting new owners
Test: none
Change-Id: Ie92b020e0ba063f48ce8a76ebaef768fe0d554f1
Merged-In: Ie92b020e0ba063f48ce8a76ebaef768fe0d554f1
(cherry picked from commit a95e841846)
2018-05-17 22:13:11 -07:00
Leon Scroggins III
6353ff5bb5 Merge "AnimatedImageDrawable: Eliminate unnecessary calls to redraw" into pi-dev
am: a2113aa4ad

Change-Id: Ice3ac92ebd4ae68d1fe9b8ae46f86e320058d169
2018-05-17 13:06:32 -07:00
TreeHugger Robot
a2113aa4ad Merge "AnimatedImageDrawable: Eliminate unnecessary calls to redraw" into pi-dev 2018-05-17 19:54:50 +00:00
Jorim Jaggi
64be98d5d2 Apply surface parameters in sync with RenderThread
Otherwise it could lead to parameters applied in the wrong frame,
leading to jank.

Test: Open notification
Bug: 78611607
Change-Id: Ia7900e753b29187a7a7b81f393666687e8b8e04b
Merged-In: Ia7900e753b29187a7a7b81f393666687e8b8e04b
2018-05-17 01:57:31 +00:00
Leon Scroggins III
4afdd1caa4 AnimatedImageDrawable: Eliminate unnecessary calls to redraw
Bug: 78866720
Test: Manual + systrace; existing CTS

Previously, we set hasAnimations to true when the AnimatedImageDrawable,
so that we would get a call to redraw. But if the image does not need to
show its next frame yet, the redraw was unnecessary.

Instead, add a new field to TreeInfo::Out, representing the delay time
until the image will need to be redrawn - i.e. when the duration of the
current frame has passed. Each call to prepareTree will post at most one
message to redraw, in time for the earliest animated image to be
redrawn. Post the message for one rendered frame ahead of time, so that
when it is time to show the next frame, the image has already gotten the
message to update.

On a screen with a single animated image, this drops the number of calls
to dispatchFrameCallbacks to as infrequent as possible. It is called
only when we need to draw a new frame of the image. On a screen with
multiple animated images, the calls may be redundant, but they will not
be more frequent than they would be without this change.

Switch to nsecs_t and systemTime internally, matching the rest of HWUI.

Remove mDidDraw and related. Its purpose was to prevent advancing the
animation while the image is not being drawn. But it isn't really
necessary. If it's not drawn, onDraw is not called, which is where we
trigger decoding. And onDraw already has a defense against getting too
far ahead - if its timer indicates that it should skip a frame or show
it very briefly, it will back up its timer. More importantly, mDidDraw
caused a bug, when combined with less frequent redraws. If the display
list containing the drawable doesn't need to be redrawn for other
reasons, the drawable's timer never advanced, so its animation stopped.

Fix software drawing. Compute the milliseconds in the future to draw the
next frame, and add that to SystemClock.uptimeMillis() to compute the
time to pass to scheduleSelf.

Change-Id: I13aab49922fa300f73b327be25561d7120c09ec4
2018-05-16 18:51:07 -04:00
Ryan Mitchell
a41e66af58 ResXMLTree: Clone DynamicRefTable on creation
XmlBlocks are cached in ResourcesImpl::loadXmlResourceParser(...) and
when asset manager invalidates itself, the references to the dynamic
reference tables point to garbage. Now, the reference table is cloned
when the XmlBlock is created so invalidation will not affect the
XmlTree.

Bug: 74240254
Test: Tested GoogleMaps on 9.75.7 and saw crashes stop
Change-Id: I932db7a85fddc640c4d6ec327f534b5a1ad6d0b1
2018-05-15 15:08:58 -07:00
Dan Willemsen
d00c851e55 Merge "Convert to Soong" am: acbd94d76f
am: b1005a8a2a

Change-Id: If5cb26e0669f79240d8fee1d40aaa2162d8e611f
2018-05-15 15:06:19 -07:00
Dan Willemsen
4888b1f6f0 Convert to Soong
See build/soong/README.md for more information.

Test: m libframeworks_coretests_jni
Test: m FrameworkCoreTests_install
Test: m libshim_jni
Test: m CtsShimPrivUpgrade
Test: m libfilterfw
Test: m PMTest_Java_dual
Test: m libdefcontainer_jni
Test: m libperftestscore_jni
Test: m libpmtest32 libpmtest64
Test: m libprintspooler_jni
Test: m libsmartcamera_jni
Test: m idmap
Test: m libdrmframework_jni
Test: m libdvr_loader com.google.vr.platform com.google.vr.platform.xml
Test: m libfilterpack_imageproc libfilterpack_base
Test: m libwebviewchromium_loader
Test: m shared_mem_test
Test: m test-touchlag
Change-Id: I868561dd237fa28647896d59049ab9260373ada1
2018-05-14 16:47:02 -07:00
Leon Scroggins
3ea0aae1d1 Merge "Use filtering when drawing nine-patches" into pi-dev
am: b638985cc1

Change-Id: Id7dfab69b931a96d802c0ab43a06fc74267aff5c
2018-05-09 09:54:47 -07:00
Leon Scroggins
b638985cc1 Merge "Use filtering when drawing nine-patches" into pi-dev 2018-05-09 16:38:41 +00:00
Ryan Mitchell
d94160943d Merge "AAPT: Fixed split resource dumping" into pi-dev
am: fb07d82086

Change-Id: I66dedae28679c07e0bfa76cfafba97d563356fcb
2018-05-08 10:28:36 -07:00
Leon Scroggins III
5a663768c4 Use filtering when drawing nine-patches
Bug: 77917978
Test: Look at toggles; CtsUiRenderingTestCases

Prior to this change, the toggles look pixelated due to using a
"nearest" filter instead of a "bilerp".

This matches the behavior of the hwui renderer.

Depends on changes in Skia (Ib7d0abdd51981bddf36ec5c3fd84bb651f405f0f)
to respect the filter quality when drawing to a GPU canvas and to
remove the resulting "bleeding" effect from drawImageLattice.

Change-Id: I59d81a17f351e18574539479a38a580a02e1619b
2018-05-08 17:23:11 +00:00
Ryan Mitchell
fb07d82086 Merge "AAPT: Fixed split resource dumping" into pi-dev 2018-05-08 17:17:17 +00:00
android-build-team Robot
ccb89f9263 Merge "Adding batterystats history to proto dump." into pi-dev
am: 291b944d89

Change-Id: Ie1766ac31bc048eeba13d540c446372ef56c2da6
2018-05-08 08:11:22 -07:00
android-build-team Robot
291b944d89 Merge "Adding batterystats history to proto dump." into pi-dev 2018-05-08 14:58:09 +00:00
Kweku Adams
71a9531806 Adding batterystats history to proto dump.
It will only print out a dump for userdebug or eng builds.

Bug: 77727638
Test: flash device and check output of incident proto and
'dumpsys batterystats -c --history'

Merged-In: Ib74d4c664f23a61e6fc33f700ba6a3c6fad32c74
Change-Id: Ia0c993d1281cc350d93f9c13f5540b349a4bfb84
2018-05-07 17:53:57 -07:00
Ryan Mitchell
30487e0a79 AAPT: Fixed split resource dumping
AAPT would not print resource values for splits passed in with the -I
flag. This fix prints out each split separately with the correct type
specs and values.

Bug: 79195967
Test: aapt dump --values -I base-hdpi.apk resources base-master.apk
Change-Id: I223186136e98180fec4a3d96f92f53407db59e2d
2018-05-07 15:36:44 -07:00
John Reck
d41c17308b Merge "Ensure GL & Gralloc both support FP16 before using it" into pi-dev
am: bf39913bbc

Change-Id: Ic3a72f4684966e04b64101b2798c4ec3c0549549
2018-05-07 13:34:52 -07:00
John Reck
bf39913bbc Merge "Ensure GL & Gralloc both support FP16 before using it" into pi-dev 2018-05-07 20:26:02 +00:00
John Reck
b29c772429 Ensure GL & Gralloc both support FP16 before using it
Change-Id: I3bda750b6011d9a69969fc938a230c2445ee8dae
Merged-In: Id8a53885178d698c7b2fd6fc5ea8d4e36ce2ef15
Fixes: 77973662
Test: builds & CTS passes
2018-05-07 16:49:45 +00:00
Derek Sollenberger
1babd54e4c Support readback of TextureView into 565 and extended sRGB.
am: 2324991a77

Change-Id: If80572b06965089415c32b6ded8b6b1b5fda19b5
2018-05-04 12:00:32 -07:00
Derek Sollenberger
2324991a77 Support readback of TextureView into 565 and extended sRGB.
Bug: 78906699
Test: CtsViewTestCases
Change-Id: I89e8544a883dcb3eb222c164ab57d20e55a073c3
2018-05-04 18:46:52 +00:00
Yi Jin
68a16c4277 Merge "Add a section flag to bypass failure if a specific path can't be found." into pi-dev
am: e09cde0cd9

Change-Id: I01c5a7a2c1ead02f5af0514cf9bf9b83f1682316
2018-05-02 15:10:58 -07:00
Yi Jin
e09cde0cd9 Merge "Add a section flag to bypass failure if a specific path can't be found." into pi-dev 2018-05-02 21:36:23 +00:00
android-build-team Robot
72b1215615 Merge "Invoke create_recording_canvas correctly in macro bench tests" into pi-dev
am: f28901f6c5

Change-Id: I855fec4f3cf126485999a008cec9648967cbf21f
2018-05-02 12:52:01 -07:00
android-build-team Robot
f28901f6c5 Merge "Invoke create_recording_canvas correctly in macro bench tests" into pi-dev 2018-05-02 19:38:43 +00:00