Commit Graph

10191 Commits

Author SHA1 Message Date
TreeHugger Robot
51d6f3d498 Merge "Fix profile gpu bars to use display fps" 2019-03-16 03:05:47 +00:00
John Reck
3c0f563786 Fix profile gpu bars to use display fps
Also adds a 'good' bar at 80% threshold
and a 'bad' bar at 150% threshold (where triple
buffering would start to get iffy)

Fixes: 127371028
Test: eyeball'd it

Change-Id: I109cd293f87f8cb9c8f1e66d49fb8fb2188b0bec
2019-03-15 16:49:25 -07:00
TreeHugger Robot
7e7a8efd5f Merge "Stop double-counting native memory in graphics classes" 2019-03-14 17:03:30 +00:00
Leon Scroggins III
bbdb731275 Stop double-counting native memory in graphics classes
Bug: 121304803
Test: Infeasible

Previously, the NativeAllocationRegistry needed to report how much
native memory was being held onto by the Java class in order to get a
more accurate count of how much memory was in use. But recent changes
allow the system to have an even more accurate view of the native memory
with mallinfo(). Further, the AOSP change
Idccb8b50d26c8c3e93cc34040d784f74dfcdbf51 introduces new APIs that allow
distinguishing between large native malloc allocations, which should
cause more frequent mallinfo() checks, and whose sizes need be available
to ahat etc, and smaller native malloc allocations.

Bitmap and AnimatedImageDrawable use the version for large native malloc
allocations. The rest pass an implied size of 0. Note that many of the
old Registries used somewhat arbitrary sizes, reinforcing the fact that
the new way of keeping track of this is better.

Add Bitmap::pixelStorageType to differentiate between types of memory
that should be accounted for by the Registry.

Update Bitmap::getAllocationByteCount to report the actual size of
ashmem allocation.

Fix a typo in LineBreaker.java, discovered while looking to find
existing callers of Bitmap's constructor.

Change-Id: I57c407258450aeaf08b47df32432466639d9faed
2019-03-14 14:50:46 +00:00
John Reck
e4e16ab3dd Merge "Add a copy of lockClocks.sh from androidx" 2019-03-13 19:18:44 +00:00
John Reck
896804e394 Add a copy of lockClocks.sh from androidx
Test: none
Change-Id: I405b041a2a054a3bb7bb3ed9f449b368330b8d3b
2019-03-13 10:34:02 -07:00
TreeHugger Robot
75f61c5919 Merge "Hide packing structure from public API" 2019-03-12 17:59:44 +00:00
Stan Iliev
902ce2a7fe Cache EGLImage and VkImage used by SurfaceTexture
Reuse EGLImage or VkImage for GraphicBuffer created by
SurfaceTexture. Destroy EGLImage/VkImage, when there is a new
GraphicBuffer or GrContext is about to be destroyed.

Test: Ran Camera lens and other TextureView apps with GL and Vk
Test: Passed TextureView CTS tests
Bug: 123953909
Change-Id: I6ad4aa889060bbb64380d7dbac13676a7339b2f8
2019-03-12 13:23:24 +00:00
TreeHugger Robot
f296a878bf Merge "Copy extension names to an owning container to prevent use-after-free" 2019-03-12 03:58:01 +00:00
Seigo Nonaka
fb1b479314 Hide packing structure from public API
The hyphen edit is packed into 8bit integer in native library, but this
should not be exposed to public API as API council suggested.

This CL includes:
- Removing packing structure from HyphenEdit and move constants from
  Hyphenator to Paint.
- Replace LineBreaker's getLineHyphenEdit with two separate start/end
  function.
- Replace Paint's getHyphenEdit with two separate start/end function.
- StaticLayout still relies on this packing mechanism but no longer need
  to be the same packing structure as in Minikin.

Bug: 124794844
Test: atest CtsGraphicsTestCases
Test: atest CtsTextTestCases
Change-Id: I8206061f554cf6e119b2b565162f54317eac630a
2019-03-11 16:51:47 -07:00
Roman Kiryanov
74ace839e0 Copy extension names to an owning container to prevent use-after-free
Bug: 127660235
Test: make -j
Change-Id: I3748b7b4b51f99acf59748675223cef02c22bee2
Signed-off-by: Roman Kiryanov <rkir@google.com>
2019-03-11 16:07:20 -07:00
Brian Osman
545f0906e4 Remove unused include of SkToSRGBColorFilter.h
Change-Id: Ib4be68d9ab491fbb4eefc6103096823f9f72a7aa
Test: Just deleting unused include. Code still builds.
2019-03-11 12:34:02 -04:00
Derek Sollenberger
3b049dec9f Merge "Directly manage buffer presentation in Vulkan using AHardwareBuffers." 2019-03-11 12:50:13 +00:00
Aurimas Liutikas
908309feb5 Merge "Clean up attribute apis based on api council feedback." 2019-03-08 22:02:17 +00:00
TreeHugger Robot
5b7a3053a2 Merge "Fix damage tracking for RenderNode drawn twice" 2019-03-08 16:45:45 +00:00
Derek Sollenberger
a19b71a54a Directly manage buffer presentation in Vulkan using AHardwareBuffers.
Instead of relying on Vulkan swapchains this CL enables HWUI to directly
manage the native window.  This allows us to preallocate buffers using
our own strategy as well as having no longer having to jump through an
unecessary translation layer that resulted in code that was hard to
reason about and also introduced inefficiencies.

Bug: 123541940
Bug: 119687951
Test: CtsUiRenderingTestCases and CtsGraphicsTestCases
Change-Id: I7e5930748795e7ca4a998ab2c608c3c9b6363037
2019-03-08 09:25:35 -05:00
John Reck
0b19a7370a Re-enable empty damage drop optimization
Fixes: 113796161
Test: device seemed to behave correctly?
Change-Id: Id43e1eaad29d07c06c1003c0653e5d1ee7084cfe
2019-03-07 17:18:25 -08:00
John Reck
f1aa7909e6 Fix damage tracking for RenderNode drawn twice
Bug: 127866048
Test: CustomRenderer demo
Change-Id: I431a7284b1d0a026e06500a78f41830a268235a5
2019-03-07 17:03:48 -08:00
Aurimas Liutikas
f9dbd5fed6 Clean up attribute apis based on api council feedback.
Bug: 127714248
Test: None
Change-Id: I40596a88e7e446c6a25f2b9074bb88a0a417ed63
2019-03-07 14:23:59 -08:00
TreeHugger Robot
55805af719 Merge "Add receiver info to IncidentdDetails in statsd_config" 2019-03-05 09:15:31 +00:00
Yao Chen
a8e78b9b88 Add receiver info to IncidentdDetails in statsd_config
This can be used for sending a broadcast to an app which incidentd
would share the incident report with.

Test: added unit test in statsd_test

Change-Id: Ieaf5b3b4d67168e2a99ff54e6392c77d8372ed4e
2019-03-04 23:47:27 -08:00
TreeHugger Robot
f57f492b2c Merge "Add some test mappings" 2019-03-05 02:04:37 +00:00
John Reck
70ddefc673 Add some test mappings
Test: none
Change-Id: If8b5b51f28669416bcd15ee9df851a263f838802
2019-03-04 15:55:22 -08:00
Ryan Mitchell
5a95250b5b Merge "Invalidate style stack resids" 2019-03-04 22:21:16 +00:00
Ryan Mitchell
2c4d874d72 Invalidate style stack resids
Style resid stacks should also be invalidated when invalidating
AssetManager caches.

Bug:117176857
Test: manual
Change-Id: I28224597adf4b0af8326bd788eab289e4ba60418
2019-03-04 17:50:11 +00:00
TreeHugger Robot
2e1966e946 Merge "Add ability to change context priority of RT Vulkan queues" 2019-02-28 20:53:04 +00:00
Stan Iliev
7e733366fc Add ability to change context priority of RT Vulkan queues
Test: Pixel 3 does not support VK_EXT_GLOBAL_PRIORITY_EXTENSION_NAME
Bug: 126595186
Change-Id: I4b2e9c6d5f92665fd2274d0aabf4b012a7a29f46
2019-02-28 13:16:36 -05:00
TreeHugger Robot
82fd15cbaa Merge "Add ANDROID_LOG to supress android specific logs" 2019-02-28 10:13:36 +00:00
Ryan Mitchell
2fe2347e1e Add ANDROID_LOG to supress android specific logs
AAPT2 uses AssetManager2 as the implmentation of its symbol table.
When generating the the R.java, AAPT2 adds information about styleables
in the comments. If the first symbol table checked by the delegate is an
AssetManager2 symbol table and it does not contain the styleable
attribute being searched for, a bogus error is printed and the resource
is found in a later symbol table.

Bug: 126596328
Test: m -j Settings && diffed generated java files
Change-Id: If86a9d62fd72317525dffa862be1267621f93afd
2019-02-27 15:08:53 -08:00
Leon Scroggins
e2791fc1b1 Merge "Revert "Enable CCPR in Ganesh"" 2019-02-27 20:38:45 +00:00
TreeHugger Robot
803db6cf27 Merge "Fix mouse pointer not getting enlarged" 2019-02-27 07:45:17 +00:00
TreeHugger Robot
1f24ccf2f6 Merge changes from topic "display_policy"
* changes:
  DisplayEventDispatcher: add DISPLAY_EVENT_CONFIG_CHANGED
  SurfaceControl: add setAllowedDisplayConfigs
2019-02-27 00:01:45 +00:00
TreeHugger Robot
4fecb6af1a Merge "Allow outline for projected backward nodes to be a path" 2019-02-26 15:17:36 +00:00
Arthur Hung
350896b596 Fix mouse pointer not getting enlarged
When show taps enabled, the presentation would be
PRESENTATION_SPOT for drawing the spots. That would
ignore loadPointerIcon when reload resources.

Always load default icon when reload resources.

Bug: 115395392
Test: Enable show taps and use mouse,
      enabled large mouse pointer manually.

Change-Id: I74f2bf33c9046e8eaba7d284ca16366da6e3d221
2019-02-26 16:43:53 +08:00
Ady Abraham
a5a21f70e1 DisplayEventDispatcher: add DISPLAY_EVENT_CONFIG_CHANGED
Add a new event for display configuration change. This event
will be sent by SF anytime it changes the display config.

Test: Generate DISPLAY_EVENT_CONFIG_CHANGED and observe the log
Bug: 122905403
Change-Id: Ifa473a34d7b313501e5e4e8a67186fb82754fdcd
2019-02-22 17:54:06 -08:00
Stan Iliev
8b7cc51c3a Allow outline for projected backward nodes to be a path
Outlines are limited to rect and round rect, with exception of
outlines clipping RippleDrawable (backward projected node).

Test: Ran test app
Bug: 27343928
Bug: 121359065
Change-Id: I40dd4801f7c0b400350e0aeff275a2ac10241cbe
2019-02-22 10:16:43 -05:00
Christopher Dalton
3fcb697963 Revert "Enable CCPR in Ganesh"
This reverts commit 131654943d.

Reason for revert: b/124049413 

Change-Id: Iba0cf734ba8d6a16a1ee2930b162760e59a76444
2019-02-21 20:09:22 +00:00
Ryan Mitchell
a55dc2ed6b Fix long paths on Windows
util::mkdirs iteratively creates each directory of a specified path. For
windows, Calling mkdir on only the drive letter or on the extended path
prefix (\?\\) will result in an error. Start after the long path prefix
and the drive letter.

This also changes AAPT2 to use AssetMaanager2 to retrieve symbols from
the symbol table. AssetManager2's zip library uses _wopen to open
windows files.

Bug:123251200
Test: aapt2_tests.exe
Change-Id: I26169d83b22d441485de3c49d63a6c4ed710e292
2019-02-20 09:46:00 -08:00
Stan Iliev
898123b6a3 Start RenderThread earlier to preload Vulkan/EGL drivers
This CL should fix application startup regression for Vulkan
detected by "Hermetic Startup: EmptyActivity" test.
EGL drivers are loaded in a temp thread to leave more time
in RenderThread for other work. Loading EGL drivers
on the RenderThread may cause a perf regression.

Test: Ran cold-dropcache-test test.
Bug: 122659224
Bug: 123361175
Change-Id: I8ca818e98fac196a41d079be15594caca5cb1bab
2019-02-20 02:10:52 +00:00
John Reck
700079e817 Fix RenderThread setForLooper
RenderThread doesn't use ThreadBase::threadLoop
so it also needs to explicitly Looper::setForLooper

Fixes: 124467483
Test: hwuiunit
Change-Id: I3703b5d3dbbbaa68e88fc23756dfccacfce863cb
2019-02-19 10:38:50 -08:00
Winson Chiu
6c0dbe1371 Merge "Signature policy for overlayable items" 2019-02-15 20:50:04 +00:00
TreeHugger Robot
826e270caa Merge "Add more alert details to incidentd header." 2019-02-15 19:53:22 +00:00
John Reck
8a7428020c Merge "Add missing Looper::setForThread" 2019-02-15 17:26:24 +00:00
John Reck
352e9f0b7a Add missing Looper::setForThread
Unlike the Java Looper the native one requires manually
setting of the looper for a particular thread.

So... do that.

Fixes: 124467483
Test: really good guess
Change-Id: Iac9b4a052e79228aea5760262996729d8dadb1b8
2019-02-14 16:26:08 -08:00
Winson
b2d7f5343d Signature policy for overlayable items
Add encoding/decoding of new policy for overlays. Signature enforces
that an overlay package is signed with the same key as the actor of
the target resource, so that an overlay can be installed by the user
as a normal app but restricted to those built by the author of the
actor (which can be the same as the target).

This also enforces that a valid policy is specified.

This doesn't implement the actors nor the signature check.

Bug: 119402606

Test: ResourceParserTest ParseOverlayablePolicy
Test: ProtoSerializerTest SerializeAndDeserializeOverlayable
Test: aapt2_tests

Change-Id: I8495ad790c2ebd51759bc6eba81149680c209475
2019-02-14 10:07:13 -08:00
Yao Chen
4ce07298e0 Add more alert details to incidentd header.
+ Add metric_id, dimension, metric_value in the incident report header
  to make it easier to identify an anomaly.
+ In case there is a uid in the dimension, put the its package info in the header too

Test: statsd_test && tested locally with a config

Change-Id: I762a1a4b0563fb3104e0d32b616b4a2367485e48
2019-02-13 17:21:42 -08:00
TreeHugger Robot
a99c4f30ee Merge "Support showTouches on multi-display (2/2)" 2019-02-14 00:54:22 +00:00
TreeHugger Robot
cb26eb117b Merge "Decouple VulkanManager from RenderThread" 2019-02-13 23:33:17 +00:00
Stan Iliev
981afe773a Decouple VulkanManager from RenderThread
This CL allows for more than one VulkanManager to exist.
VulkanManager ctor are public allowing for classes other
than RenderThread to instantiate it.
Secondary VulkanManager can be used to render on a thread
other than RT.

Test: Ran HWUI unit tests and several apps
Change-Id: Ibfd76c86ff67e01617a500902bba7431b928f5c0
2019-02-13 15:55:45 -05:00
Arthur Hung
d25699a122 Support showTouches on multi-display (2/2)
Currently the PointerController would be associated with the top most
freeform or external display if enable desktop mode.
But for presenting spots when enable showTouches from develop options,
they should be shown on the corresponding display where user touched.

Also changed Vector to std::vector.

Test: atest inputflinger_tests
Test: Use device support multi-display and touch screen (like mojave).
      Enable showTaps from develop options and check if show tap spots.
Bug: 120815589

Change-Id: I0854fa97813aabf005dccb8ec6fbda10106126e9
2019-02-13 16:23:22 +08:00