Commit Graph

10094 Commits

Author SHA1 Message Date
Mike Reed
2e204fc468 don't pass bounds to textblobbuilder
Rely on builder to compute it

Test: make

Change-Id: Ib04b5a79d4e94e269761dd23171ca517e5aebed9
2019-01-29 14:03:49 -05:00
TreeHugger Robot
23e1fa48ef Merge "IWYU" 2019-01-25 21:13:38 +00:00
Mike Reed
0ea09a4f4a IWYU
Trying to land https://skia-review.googlesource.com/c/skia/+/185460

Test: make

Change-Id: Ia1dd2fb6911d3e562e9c68e8ad03136f96b2d7c0
2019-01-25 18:06:21 +00:00
TreeHugger Robot
c49da3914e Merge "Fix GetResourceName for shared libraries" 2019-01-25 17:28:34 +00:00
TreeHugger Robot
d8cf9da7c2 Merge "Store SkFont in android::Paint" 2019-01-25 14:09:11 +00:00
TreeHugger Robot
bdd89dbe2a Merge "Add color space params to webview gl functor" 2019-01-25 13:40:41 +00:00
Ryan Mitchell
741e96ff07 Fix GetResourceName for shared libraries
GetResourceName used GetPAckageById which only works when the compile
time package id is eqal to the runtime package id. This change resolves
resource names correctly using the ruuntime package id.

Bug: 79666085
Test: libandroidfw_tests
Change-Id: Ic60cb2416329c5cb34e925991cd689ca7574b483
2019-01-24 15:45:43 -08:00
Mike Reed
f6d86acb93 Store SkFont in android::Paint
Test: CTS

Change-Id: I974fad5a7a8cf54007f0a30f4fe4ae6eb6e01ae1
2019-01-24 17:18:43 -05:00
Bo Liu
b6da7f634f Add color space params to webview gl functor
Bug: 111436479
Test: Compiles
Change-Id: I6713afbb871a5c7027bac1e0f52ce2a841f38e25
2019-01-24 14:04:58 -08:00
TreeHugger Robot
78a6cb94d6 Merge "Increase ShaderCache max size to accomodate Vulkan pipeline cache" 2019-01-24 21:49:44 +00:00
Stan Iliev
da8a5107d9 Increase ShaderCache max size to accomodate Vulkan pipeline cache
Bug: 123311517
Test: Ran on device
Change-Id: Id7127b391e44fb9661ad4eb847180dc3740abe0f
2019-01-24 14:57:01 -05:00
Derek Sollenberger
48340af06e Merge "Don't assume all FP16 bitmaps are linearly encoded." 2019-01-24 16:32:31 +00:00
Brian Osman
e0cf597556 Remove use of SkColorSpace::Gamut enum
Get the gamut matrix from the color space, compare against sRGB/P3.

Test: Refactoring CL.
Change-Id: I9f5bcae8c1f637919ee9da892266ea882f16208c
2019-01-24 16:05:05 +00:00
TreeHugger Robot
515bd282c5 Merge "Don't create RenderThread for dumpsys gfxinfo" 2019-01-23 21:56:55 +00:00
Derek Sollenberger
6e35e63740 Don't assume all FP16 bitmaps are linearly encoded.
The bitmap.create() function that does not take a colorspace does
not enforce that the bitmap is linearly encoded and as such it is
possible for us to end up with FP16 bitmaps that are sRGB encoded.

Given that we want to remove that restriction (see b/120870651)
we update getColorSpace to report the actual colorSpace of the
underlying bitmap. This pulls a thread that causes a chain of
updates to various classes to ensure proper handling of the native
colorspace.

Bug: 120904891
Test: CtsUiRenderingTestCases
Change-Id: I27780aa603138b0e48f9320c2837bc53e22cdf95
2019-01-23 16:31:52 -05:00
John Reck
ba7e965316 Don't create RenderThread for dumpsys gfxinfo
Change-Id: I4cbad14ad6f952ddec11eb732701909fd75ff137
Fixes: 121129527
Test: guess
2019-01-23 10:33:41 -08:00
John Reck
5cca8f250c Add continuous SKP capture test api
Bug: 122856066
Test: PictureCaptureDemo
Change-Id: Iaf3a4bc1c8a2c18c7dff635c5f1cf726b331f8bf
2019-01-22 13:13:06 -08:00
Tor Norbye
68ea0c3c13 Update signature files to the new format
The new format is described in tools/metalava/FORMAT.md.

Fixes: 116589402 Switch signature files over to the v2 format
Fixes: 112626813 Drop "synchronized" modifier from the signature format
Fixes: 122358225 Omit overriding methods that only differ in final [...]
Fixes: 73088715 API Review: Need doclava to output nullability
Fixes: 79739773 API Review: Metalava enforcing constants are constant
Exempt-From-Owner-Approval: Large-scale tooling change
Test: make sdk, make update-api, make checkapi
Change-Id: Ia248aece5250e84e47c815c601133b698bf644c2
2019-01-19 12:07:50 -08:00
Greg Daniel
c407678982 Add support for preTransform in Vulkan swapchain.
Test: manual building and running of apps.
Bug: 110985606
Bug: 122662274
Change-Id: Id53aa1ce028b448b1f12558eec78a60e09512166
2019-01-18 18:56:44 +00:00
TreeHugger Robot
e81dba7bf7 Merge "Load correct resources for pointer icon on external screen" 2019-01-18 03:35:31 +00:00
Ryan Mitchell
a117526b4a Merge "Remove RRO policy product_services" 2019-01-18 00:41:31 +00:00
Ryan Mitchell
9853845074 Merge "Add enforcement of idmap policies" 2019-01-18 00:41:11 +00:00
Andrii Kulian
fd8666df52 Load correct resources for pointer icon on external screen
When mouse pointer changes displays, it should also reload the
icon from new resources. Otherwise, if the densities of the
previous and new displays are different, the size of the pointer
sprite will look too small or too large.

- Add getDisplayContext to get the corresponding Context by displayId.
- Cache system pointer icons per display, clear if display removed.
- Fix icon moved to default when not resetting out of task bound.

Bug: 113559891
Test: Enable mouse pointer on default display, move to other screen
Change-Id: Ic42d0ec32d9c979281e13c83b9e8b57134fd4f0d
2019-01-17 10:34:36 +08:00
Aurimas Liutikas
428ddacfa4 Merge "Add source style for each TypedValue." 2019-01-16 21:48:46 +00:00
TreeHugger Robot
7650ea6378 Merge "Remove DropBoxManager::getNextEntry" 2019-01-16 21:26:19 +00:00
Ryan Mitchell
02d9c1e931 Remove RRO policy product_services
Since Q will no longer have a product_services partition, remove instances of
the product_services policy across aapt2, androidfw, and idmap2.

Bug:122745343
Test: aapt2_tests and libandroidfw_tests
Change-Id: I97c223a0bf5a2eab95811e5f738b44af6335e0ea
2019-01-16 11:47:33 -08:00
Mårten Kongstad
d10d06d0b0 Add enforcement of idmap policies
Teaches idmap2 to recognize policy restrictions put on overlayable
resources. If overlayable enforcement is turned on for an overlay, then
any resources defined within the overlayable api of the target will have
policy restrictions imposed on them. All resources without overlayable
definitions will continue to be overlayable without policy restrictions.

Bug: 119390857
Test: atest idmap2 and booting

Co-authored-by: Ryan Mitchell <rtmitchell@google.com>
Change-Id: I7e435648eb6e4a87b0b90a7b2a0c3f33c1516ea6
2019-01-16 11:47:24 -08:00
Hector Dearman
60b3053221 Remove DropBoxManager::getNextEntry
- Remove DropBoxManager::getNextEntry as the method was unused.
- Stop DropBoxManager::Entry inheriting from RefBase.
  This was causing bugs since DropBoxManager constructs Entry
  on the stack (in a non-ref counted context).

Bug: 119655216
Test: make
Change-Id: If0852ab6bcc1a92560132628897977eac16fddea
2019-01-16 18:20:56 +00:00
Derek Sollenberger
caa8cc64c2 Merge "Standardize the surface origin for each HWUI pipeline." 2019-01-16 14:41:06 +00:00
TreeHugger Robot
34495b9fc8 Merge "VkFunctorDrawable implementation" 2019-01-16 01:21:08 +00:00
Aurimas Liutikas
ce7c99c661 Add source style for each TypedValue.
This API will be used by Android Studio layout inspector to
query where a given resource attribute originated from to allow
developers to have an easier way to find what needs to be changed
to affect a given resource attribute.

Test: CTS added in the topic
Bug: 111439551
Change-Id: Ifbb52b39912ed0444030a86164290a1cd4155250
2019-01-15 16:11:23 -08:00
Bo Liu
7b8c1eb302 VkFunctorDrawable implementation
Bug: 115613038
Test: Turning on vulkan with appropriate webview apk does not crash and
sort of works.
Change-Id: If1504da7a35e4bd74a994ab2c2a351e6bc415a18
2019-01-15 15:25:04 -08:00
TreeHugger Robot
82637f5e95 Merge "Invoke Vulkan initialize earlier" 2019-01-15 21:56:21 +00:00
Ryan Mitchell
cf9dd94323 Merge "Add encoding of name and actor overlayable fields" 2019-01-15 19:34:30 +00:00
Winson Chiu
55d9a6042b Merge "Add function to return path for last resolved resource" 2019-01-15 18:38:17 +00:00
Brian Osman
40f4cb5d5e Merge "Switch to skcms-based factories and getters in SkColorSpace" 2019-01-15 15:11:34 +00:00
Nick Kralevich
20f260b639 Merge "CursorWindow.cpp: replace dup() with fcntl(F_DUPFD_CLOEXEC)" am: adf025b1ff am: de408b3cb4
am: 7f74aeed50

Change-Id: I20f72f6de160a38d3b6067e685c396e6a27e2dc7
2019-01-15 03:31:12 -08:00
Nick Kralevich
7f74aeed50 Merge "CursorWindow.cpp: replace dup() with fcntl(F_DUPFD_CLOEXEC)" am: adf025b1ff
am: de408b3cb4

Change-Id: I2efa1736d545230283bf4d5ffaca209638723945
2019-01-15 03:19:36 -08:00
TreeHugger Robot
4831523575 Merge "Put HWUI & Webview color space in a struct" 2019-01-15 08:13:49 +00:00
Brian Osman
be8fac26d7 Switch to skcms-based factories and getters in SkColorSpace
Test: Mechanical substitution, still builds.
Change-Id: I877e4edd61e81279830ffbbcfea18d721abf6943
2019-01-15 03:17:09 +00:00
Chih-Hung Hsieh
bc80706599 Merge "Fix/suppress androidfw google-explicit-constructor warnings" am: 392f0052c2 am: 99a3d72b98
am: cd06f9ee04

Change-Id: I0340acdbd6530f9bd9f67333974bcc65ff97e0e5
2019-01-14 14:58:22 -08:00
Winson
2f3669b767 Add function to return path for last resolved resource
After an AssetManager.FindEntry call is made, either directly or from any of the resource entry calls, a stack of the steps taken to resolve the resource is saved. Those steps can be retrieved as a log later on by calling AssetManager.GetLastResourceResolution, which returns a formatted string of the resource ID/name and path taken, including the configs and package names of each step.

Logging and the saving of the steps to memory can be enabled/disabled with the @hide .setResourceResolutionLoggingEnabled() method on AssetManager.

Bug: 122374289

Test: cases for single and multi ApkAssets loaded
Test: case for no resolution made
Test: made test app to display log on device
Test: added debugging call to source and ran through on-device apps

Change-Id: I6a32b8d4020c3f8510032ff7f431510089fff43f
2019-01-14 14:52:00 -08:00
Chris Blume
1a2bdc8c65 Put HWUI & Webview color space in a struct
The color space parameters are currently separate members. This was
making passing color space parameters to functions a bit messy.

This CL puts the color space parameters into their own struct which can
be cleanly passed to functions.

Test: Builds locally
Change-Id: I3709b88dbdedb9616d4905ee973c3099f95b3ca7
2019-01-14 14:48:46 -08:00
Chih-Hung Hsieh
cd06f9ee04 Merge "Fix/suppress androidfw google-explicit-constructor warnings" am: 392f0052c2
am: 99a3d72b98

Change-Id: Icb12400292dae8ed091f1a55eb2f0a7e50e84667
2019-01-14 14:16:59 -08:00
Nick Kralevich
e104df9483 CursorWindow.cpp: replace dup() with fcntl(F_DUPFD_CLOEXEC)
Replace calls to dup() with fcntl(F_DUPFD_CLOEXEC). The only difference
between the two is that O_CLOEXEC is set on the newly duped file
descriptor. This helps address file descriptor leaks crossing an exec()
boundary.

Test: compiles and boots
Bug: 120983106
Change-Id: Icc2ff2f7f398905aa8283c8797898114d34a9829
2019-01-14 14:05:06 -08:00
TreeHugger Robot
a25b2edeb8 Merge "Store VkPipelineCache to ShaderCache" 2019-01-14 21:56:35 +00:00
Treehugger Robot
392f0052c2 Merge "Fix/suppress androidfw google-explicit-constructor warnings" 2019-01-14 20:21:49 +00:00
Derek Sollenberger
25833d29ac Standardize the surface origin for each HWUI pipeline.
OpenGL prefers a bottom-left origin while Vulkan prefers the
top-left. Prior to this change we were inconsistent in Vulkan by
creating layers with a bottom-left origin which was different from
the primary buffer.

Test: CtsUiRenderingTestCases
Change-Id: Icfeed4085021cae941aeab58720406e3b3e37923
2019-01-14 13:55:55 -05:00
Stan Iliev
14211aaf9e Store VkPipelineCache to ShaderCache
Store vulkan pipeline cache in ShaderCache. Avoid writing to disk
unless pipeline cache size has changed or there was a new shader
compilation.

Test: Ran app startup test. Ran Calc app.
Bug: 122659224
Change-Id: Ie54ea8f0ee9c87387c310b369b2350310e20fa13
2019-01-14 12:29:30 -05:00
Ryan Mitchell
ef5673a4c4 Add encoding of name and actor overlayable fields
Encode the actor and name attributes of <overlayable> elements in the
overlayable chunks. Two chunks cannot have the same name.

Bug: 110869880
Bug: 119390855
Test: aapt2_tests and libandroidfw_tests
Change-Id: I0ed95efef640b3927046b6155d1840f0d96030dd
2019-01-11 14:45:09 -08:00