9510 Commits

Author SHA1 Message Date
Mårten Kongstad
2503a49b96 libandroidfw: introduce ExecuteBinary (POSIX only)
Introduce a wrapper around fork and exec.

Test: make libandroidfw_tests
Change-Id: Iff0de5319bb6bb101a3fbef6413dfb4e77198f11
2018-10-04 03:45:32 +00:00
Chih-Hung Hsieh
fc81626ba6 Add noexcept to move constructors and assignment operators.
Bug: 116614593
Test: build with WITH_TIDY=1
Change-Id: Ic3993d88eb3066aef402d74c4d543c56a1dfd5c3
2018-10-01 20:23:02 +00:00
Treehugger Robot
903dad812e Merge "Don't run comparisons on non-jank frames" 2018-09-19 23:28:55 +00:00
John Reck
50be3b8378 Don't run comparisons on non-jank frames
Unclear why mSwapDeadline doesn't already
account for this, but the handling of vsync
phase offsets may be throwing things off a bit.

For now just do the simple fix.

Bug: 109894489
Test: builds, patch was verified by reporter
Change-Id: I5a6f25ceac4986d366293fe7b5e3af64a326114c
2018-09-14 11:25:58 -07:00
Treehugger Robot
b848ce8e20 Merge "ByteBucketArray.h: fix typo" 2018-09-12 22:26:22 +00:00
Mårten Kongstad
cb54cd2dac ByteBucketArray.h: fix typo
Bug: 78815803
Test: builds, boots
Change-Id: I93d7ce5255911797d6afdb05caf0cf7dbfdc22b9
2018-09-11 14:24:40 +02:00
Stan Iliev
cccd03859c Don't apply filter in readback, when there is no scaling
Fix check for scaling in SkiaOpenGLReadback: old code was not
taking into account that matrix rotation swaps width/height.

Test: Passed PixelCopyTest#testWindowProducerCopyToRGBA16F
Bug: 110097060
Bug: 111776948
Change-Id: I0d26416fa72a026bc376417773d5a73548b1f1a5
Merged-In: I0d26416fa72a026bc376417773d5a73548b1f1a5
(cherry picked from commit d50edd004b60bec3f1d36066725129276b4a53ec)
(cherry picked from commit ee7b63aa646c937e326ac5f39f07f724020533bb)
2018-08-29 15:03:08 +08:00
Stan Iliev
421449a4a6 Fix TextureView.getBitmap with scale layer transform
Fix TextureView.getBitmap to capture content only from the layer.

Bug: 111401911
Test: A new test TextureViewTest.testTransformScale is passing
Change-Id: I2b9cee17fc48de7b12ed03d5b4f173ce5445dbfe
Merged-In: I2b9cee17fc48de7b12ed03d5b4f173ce5445dbfe
(cherry-picked from ff129aefe2b68c5dc6fe51a9b1d34f98750d4973)
(cherry picked from commit 9675537555913a6aa7c25a71a6b854a083e22ede)
2018-08-29 14:54:53 +08:00
Greg Kaiser
174b50fa50 TreeInfo: Make ~ErrorHandler() virtual
ErrorHandler has a pure virtual function, so we also make its
destructor virtual, to assure any children classes will get
properly destructed.

Test: TreeHugger
Change-Id: Ie072511b450d507f8764b0888d232ffac8f6d6f5
2018-08-24 06:10:18 -07:00
Greg Kaiser
a95435b836 RenderThread: Make ~IFrameCallback() virtual
IFrameCallback has a pure virtual method, but its destructor was
non-virtual.  While CanvasContext, which inherits from
IFrameCallback, declares its own destructor virtual, this is not
sufficient when accessing via an IFrameCallback pointer.

We fix this by making the base destructor virtual.

Test: Treehugger
Change-Id: I6424f90c16caea417b5f80b60d76a7ca7c7ef97c
2018-08-23 17:07:56 -07:00
John Reck
af3e763358 Merge "Disable LTO on -eng"
am: 1918b39942

Change-Id: I925182b722d7bf6b1bb63c298a8ec9e345f0c4ac
2018-07-11 14:48:50 -07:00
John Reck
2729418128 Disable LTO on -eng
Speeds up incremental compile of one cpp file change
from over a minute to around 15 seconds

Bug: 111277863
Test: touch a .cpp file in hwui & mmm
Change-Id: I946ecad411a7a59f87ed9e1eeb146d6f57bd038a
2018-07-11 18:24:58 +00:00
Haibo Huang
9fada2364f Merge "Remove CSV support"
am: 0faecf7b89

Change-Id: I02e8b74299afda2642567e3fcf9a41653cb7b888
2018-07-09 14:41:03 -07:00
Haibo Huang
783d76ec31 Remove CSV support
CSV is deprecated upstream. See:
7b8d0249d8

Test: m checkbuild
Change-Id: I4b85535d4296c6f0d1f0eec95b40c065b3143134
2018-07-06 16:55:27 -07:00
Sundong Ahn
35d6bafc57 Merge "Build com.android.future.usb.accessory with java_sdk_library"
am: 10cfc61774

Change-Id: Ie6abdaa1c9f58ada60da5514bbd1ed261d09fd0b
2018-06-28 20:38:09 -07:00
Treehugger Robot
10cfc61774 Merge "Build com.android.future.usb.accessory with java_sdk_library" 2018-06-29 02:51:43 +00:00
Josh Gao
1c300861d2 Fix memory leak in RenderThread::dumpGraphicsMemory.
This would have been a double-close of fd, except we just leak the
FILE* instead.

Test: treehugger
Change-Id: I519366fbcf0eb6f03f79c22abfa2b1b1b493a70a
2018-06-26 12:37:42 -07:00
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 8472ac67fd1d815022874f5addace0c4334ae9f6)
(cherry picked from commit 8dc7f8275e5ba9004d219d7d7d990e91fc702095)
2018-06-20 22:52:35 +00:00
Sundong Ahn
9794d2a5b9 Build com.android.future.usb.accessory with java_sdk_library
com.android.future.usb.accessory is built with java_sdk_library and api
files are added by running "make update-api".

Bug:77577799
Test: make -j
Test: make checkapi
Test: adb shell cmd package list libraries |\
      grep com.android.future.usb.accessory
      And check the com.android.future.usb.accessory library

Change-Id: I21c635c06ab809b3d1b34b2a8de055fa20d9b066
2018-06-19 10:22:30 +09:00
Neil Fuller
7dbefdcb92 resolve merge conflicts of 26119befba89e1d656e6c2237f15e2b3a74865fd 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 a95e841846c3add37cab0ca228e1e1a4eb0a1455)
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