Commit Graph

9222 Commits

Author SHA1 Message Date
Siyamed Sinir
bb80480720 Merge "Use numbering system for configuration selection." 2018-01-23 17:35:59 +00:00
Adam Lesinski
7fb3831136 Revert "Replace AssetManager with AssetManager2 implementation"
This reverts commit b20a0ce59f.
2018-01-23 03:17:26 -08:00
Adam Lesinski
fae57eb4b8 Revert "libandroidfw: Add ApplyStyle and SetConfiguration benchmark"
This reverts commit 62f17129a0.
2018-01-23 03:16:33 -08:00
Adam Lesinski
50706b6ebc Revert "libandroidfw: Improve performance of AssetManager2"
This reverts commit 3921327484.
2018-01-23 03:16:16 -08:00
Adam Lesinski
1f62f7c72e Merge changes from topic "assetmanager-refactor"
* changes:
  libandroidfw: Improve performance of AssetManager2
  libandroidfw: Add ApplyStyle and SetConfiguration benchmark
  Make idiomatic use of ApkAssets and AssetManager
  Replace AssetManager with AssetManager2 implementation
2018-01-23 05:28:11 +00:00
TreeHugger Robot
a9c127593f Merge "Improve layer rendering quality" 2018-01-22 23:52:31 +00:00
Stan Iliev
7e100e912c Improve layer rendering quality
Increase filter quality when rendering a layer into the frame
buffer from kNone_SkFilterQuality to kLow_SkFilterQuality.
This visibly improves the quality if the layer is scaled.
For example the circle shutter button in camera app looks
better in pressed state (there is no jagged edge).

Test: Ran camera app
Bug: 72144993
Change-Id: I138d930a25301a369876d76a2cd322df0324f0f2
2018-01-22 16:10:26 -05:00
Yi Jin
437aa6e8ad Add more information to incident header. Especially add config keys
to check if the report is uploadable.

Move incidentheader.proto to libincident so statds is able to include a lite
proto class for incident header.

Change IncidentReportArgs to add the proto object instead of serialized
bytes to prevent caller gives meaningless data.

Bug: 70241842
Test: push config to statsd and verify incidentd generate the report
with correct header.

Change-Id: If95b655be71047b019b229e5903a08f3c21a1f29
2018-01-21 22:36:01 -08:00
Igor Viarheichyk
7ec28a888c Use numbering system for configuration selection.
Take into account numbering system when selecting a matching
resource configuration. Add numbering system specifier into the
generated BCP 47 language tag.

Test: build and run libandroidfw_tests
Bug: 71873777

Change-Id: I3afda181f36de4b29a7be270b6f7593c2261fd71
2018-01-19 20:25:34 +00:00
Adam Lesinski
3921327484 libandroidfw: Improve performance of AssetManager2
AssetManager2 relied on creating a list of configurations
present in the resource table so as to avoid copying and
converting ResTable_config's from the APK on every
resource retrieval.

ResTable, however, had a better optimization that pruned
the configurations that didn't match the currently set
configuration. This vastly reduced the number of ResTable_configs
to test.

In this CL, AssetManager2 follows suite with this optimization
and only maintains the filtered ResTable_configs, falling back
to the slow path when the configuration is overridden.

Test: mma frameworks/base/libs/androidfw
Test: adb sync system data
Test: adb shell /data/benchmarktest64/libandroidfw_benchmarks/libandroidfw_benchmarks
Change-Id: I42d53f703623cf7c3f7cbcf194f5026ff540faf4
2018-01-18 10:40:10 -08:00
Adam Lesinski
62f17129a0 libandroidfw: Add ApplyStyle and SetConfiguration benchmark
Test: mma frameworks/base/libs/androidfw
Test: adb sync system data
Test: adb shell /data/benchmarktest64/libandroidfw_benchmarks/libandroidfw_benchmarks
Change-Id: I021bc53e85651dcf5fbd4ebaae72d82be1a03252
2018-01-18 10:40:10 -08:00
Leon Scroggins III
671cce2605 Make ImageDecoder return animated Drawables
Bug: 63909536
Bug: 63908092
Test: TODO

If ImageDecoder.decodeDrawable is called with an animated image Source
(currently GIF or WebP), return an object of a new (hidden) Drawable
subclass. The new Drawable animates, and it implements Animatable (TODO:
implement Animatable2) so users have some control over the animation.

In addition to the normal features of Drawable, this new one supports
many of the features of ImageDecoder, including scaling, cropping and
PostProcess, which enables circle masks/rounded corners and other
arbitrary after-effects. It does *not* support decoding directly to a
Hardware Bitmap, since it cycles through frames and reuses the same
bitmap memory. But it could be made to use shared memory (TODO?).

TODO: Use a better number for the native allocation registry
TODO: Use the RenderThread to drive the animation, and remove decoding
on the UI thread.
TODO: Add support for modifying the loop count

Android.bp:
- build new AnimatedImageDrawable.cpp

AndroidRuntime.cpp:
- register new native methods

AnimatedImageDrawable.java
AnimatedImageDrawable.cpp:
- new Drawable that handles animated images

Canvas.h, SkiaCanvas.h/.cpp
- New virtual method and implementation for drawing SkAnimatedImages

RecordingCanvas.h/.cpp
- Stub implementation of drawing SkAnimatedImages

ImageDecoder.h/cpp
- Allow code sharing with AnimatedImageDrawable.cpp
  - postProcess
  - access the ImageDecoder struct

Depends on https://skia-review.googlesource.com/c/skia/+/94660 in Skia.

Change-Id: Ie2ec98d9c52deda4d439c6ef8e5dea2861bb93a3
2018-01-17 17:06:57 -05:00
TreeHugger Robot
600ebac26b Merge "Create an empty stub for Vulkan readback" 2018-01-12 21:03:24 +00:00
Stan Iliev
a31973fe3a Create an empty stub for Vulkan readback
Create a stub for Vulkan readback. This avoids crashing,
because OpenGL readback does not work for Vulkan.

Test: Ran calc and gmail apps with skiavk pipeline.
Change-Id: I11cddde0a1efae1aa549e7a47d01051ec975f470
2018-01-12 11:50:29 -05:00
Sami Kyostila
682a4e75f8 Merge "base: Convert libs/services/Android.mk into a blueprint" 2018-01-12 11:03:23 +00:00
Stan Iliev
c6c96dd86d Improve correctness of SkiaCanvas::drawLayoutOnPath
Align glyph to a tangent touching SkPath in the midle of the
symbol. Previously wrong tangent crossing the path at the
beginning of the glyph was used.

Test: Ran the test app attached to the bug
Bug: 71525360
Change-Id: I310394d11e185de314f66a6b332f804188e42ed9
2018-01-11 14:44:51 -05:00
Sami Kyostila
4389e6bc2d base: Convert libs/services/Android.mk into a blueprint
Convert libs/services/Android.mk into a blueprint module so it can be
linked by other blueprint modules.

Test: mmm frameworks/base
Change-Id: I7acf9aa084d262a5aba5a58e45d9647e15c6dffb
2018-01-11 11:53:15 +00:00
Adam Lesinski
b20a0ce59f Replace AssetManager with AssetManager2 implementation
Test: Existing CTS tests pass
Test: make libandroidfw_tests
Change-Id: I858f7e1d909c08273b096601136e3f28e15eb5d4
2018-01-09 16:28:58 -08:00
TreeHugger Robot
d53121899c Merge "Remove error log messages when skia shader cache is disabled" 2018-01-09 23:05:48 +00:00
Stan Iliev
ba72f9a288 Remove error log messages when skia shader cache is disabled
Ideally processes with a render thread, would turn on shader
caching, but system_server is an exception.

Test: checked logcat for ShaderCache not initialized messages
Bug: 71718344
Change-Id: I5d4df6ae912a6fec3f019c9c831a1177937ea53b
2018-01-09 15:59:35 -05:00
Yi Jin
3c034c987e Implement a new type of section which reads from logd and dumps proto.
And implement a file section which reads from event-log-tags for
decoding binary logs.

Bug: 70936599
Test: atest incidentd_test && atest incident_helper_test and flush on
device and test log sections and event_log_tag_map
Change-Id: Ib3d35e317f355de69f01ded012482486e9a43da6
2018-01-06 20:33:14 -08:00
Stan Iliev
ec08381261 Refactor TestUtils::drawUtf8ToCanvas usage in macrobench tests
Set text encoding inside TestUtils::drawUtf8ToCanvas and use
TestUtils::drawUtf8ToCanvas instead Canvas::drawText.
This CL is a follow-up of ag/3287411.

Test: Ran macrobench tests
Change-Id: I1b2f014d17f26ccc8fbdae9cfeea4ac25fd4c51f
2018-01-03 15:30:37 +00:00
Ivan Lozano
0e603f03e6 Merge "Fix doFadingAnimationLocked in sanitized builds." 2017-12-21 18:29:00 +00:00
Adam Lesinski
c243f23e25 Merge "IDMAP: Warn when RROs overlay non-overlayable resources" 2017-12-20 00:50:58 +00:00
Adam Lesinski
5c693f2b82 Merge "AAPT2: Propagate SPEC_OVERLAYABLE flag to final APK" 2017-12-19 22:42:53 +00:00
Ivan Lozano
7ee0dba095 Fix doFadingAnimationLocked in sanitized builds.
The loop as constructed causes i to overflow twice when i = 0 on integer
overflow sanitized builds.

 runtime error: unsigned integer overflow: 0 - 1 cannot be represented
 in type 'size_t' (aka 'unsigned long')

 runtime error: unsigned integer overflow: 18446744073709551615 + 1
 cannot be represented in type 'size_t' (aka 'unsigned long')

This refactors the loop to avoid the overflows.

Bug: 30969751
Test: Compiles, device boots, enabled pointer location overlay.
Change-Id: I844bb3b84b1f536c50d06fb489fcc22590d4aa98
2017-12-19 08:17:31 -08:00
TreeHugger Robot
81bfe137d0 Merge "Remove IIncidentReportCompleted and gmscore WW module would listen to android.intent.action.DROPBOX_ENTRY_ADDED and look up incident tag then upload the report." 2017-12-19 02:30:28 +00:00
Adam Lesinski
a9743826bd IDMAP: Warn when RROs overlay non-overlayable resources
First pass at getting overlays to respect which resources should be
overlaid. First step is to call it out but not enforce.

Bug: 64980941
Test: manual (inspect the warnings at boot)
Change-Id: I40baee1110d4bc1e54e7f2f9d3b73ffabb067f90
2017-12-18 17:25:27 -08:00
Elliott Hughes
d2cafca090 Merge "Private API became public..." am: eb44ebbfcd am: 85fc4d6dd6
am: 746a738276

Change-Id: Ifb1fd8dc812d160cd998ba23371e0cfff0c43adb
2017-12-19 00:50:31 +00:00
Adam Lesinski
71be70507d AAPT2: Propagate SPEC_OVERLAYABLE flag to final APK
Resources can be marked as overlayable, which means they can
be overlaid by runtime resource overlays.

This change propagates this state to the final resource table that
is installed on device.

Future work:
- Have the idmap tool respect the overlayable state and ignore
  entries that overlay anything else.

Bug: 64980941
Test: make aapt2_tests
Change-Id: Id45b1e141a281be2ee32a4ac3096fcf1114d523b
2017-12-18 14:16:02 -08:00
John Reck
0e89ca2088 Log daveys
Bug: 70339576
Test: Checked that it logged with a lower threshold
Change-Id: I271f8af2a3ee63769edc71291b70f19512974d78
2017-12-15 17:00:58 -08:00
Elliott Hughes
7c2107b1fa Private API became public...
...but is now automatically called by the Context constructor.

Bug: N/A
Test: builds
Change-Id: Ic78bc4561adfec5047ed45589b8b936c506bd2b2
2017-12-15 16:24:25 -08:00
Yi Jin
26ac0306ad Remove IIncidentReportCompleted and gmscore WW module would
listen to android.intent.action.DROPBOX_ENTRY_ADDED and look up
incident tag then upload the report.

Bug: 69860192
Test: N/A
Change-Id: I7f60ad631e8b3243e209aba9408f18bf0bfd4750
2017-12-15 15:35:34 -08:00
Elliott Hughes
ceb1fa2284 Minimal reformat to match internal master.
Internal master SHA 1bcacfdcab reformats
this entire project. To be able to update google-benchmark I need to
make a small change to this file. This is the minimal change that avoids
merge conflicts.

Bug: N/A
Test: builds
Change-Id: If3568a0f59a7c007858435953e127167f5862825
2017-12-15 10:37:01 -08:00
Joe Onorato
c9f1a9e3dd Merge "Fix how we build the statsd protos." 2017-12-14 05:33:33 +00:00
Joe Onorato
62c220b20b Fix how we build the statsd protos.
This lets us include frameworks protos, and use the constants
and messages from them.

Change-Id: I609d6e524f780e6a5beea543a68561bede47813e
Test: make
2017-12-13 18:26:45 -08:00
TreeHugger Robot
7129b1ef83 Merge "SkPixelSerialize is deprecated (and unneeded in this case)" 2017-12-13 20:50:13 +00:00
Dan Albert
3fe9d790df Merge "Include what we use." am: b0efcc1f68 am: afa15b0846
am: 83a1241e5a

Change-Id: I829bad9fe74620b40599eeba745743679e04eba6
2017-12-13 20:18:57 +00:00
Treehugger Robot
b0efcc1f68 Merge "Include what we use." 2017-12-13 19:38:38 +00:00
Mike Reed
ebf96fbed7 SkPixelSerialize is deprecated (and unneeded in this case)
Test: make

Change-Id: Icc421586de82a516cb5e32b60949315d1108a9a3
2017-12-13 13:44:13 -05:00
Rob Herring
4ee4d20908 renderthread: relax error handling for wide gamut EGL configs
It is valid to advertise EGL_EXT_pixel_format_float, but not have a
the requested EGL config. Instead of aborting, fallback to the default
behavior.

Change-Id: I6c602233b627dc2070364434fece57d3d0aab435
Cc: Romain Guy <romainguy@google.com>
Signed-off-by: Rob Herring <robh@kernel.org>
2017-12-13 14:30:21 +00:00
Rob Herring
74883abde3 renderthread: relax error handling for wide gamut EGL configs
It is valid to advertise EGL_EXT_pixel_format_float, but not have a
the requested EGL config. Instead of aborting, fallback to the default
behavior.

Change-Id: I6c602233b627dc2070364434fece57d3d0aab435
Cc: Romain Guy <romainguy@google.com>
Signed-off-by: Rob Herring <robh@kernel.org>
2017-12-12 16:41:27 -08:00
Dan Albert
9b6a62f94c Include what we use.
Test: mma
Bug: None
Change-Id: I9458aedad9a84f1660d3a2b08717b111dc8e3b74
Exempt-From-Owner-Approval: trivial cleanup
2017-12-12 16:08:11 -08:00
TreeHugger Robot
6295c422a2 Merge "Update graphics stats to use long version codes." 2017-12-12 04:20:46 +00:00
Dianne Hackborn
73453e49d5 Update graphics stats to use long version codes.
Bug: 64459786
Test: manual
Change-Id: Iab84727e0ac486f505c10aacdb5ec8871aaf121e
2017-12-11 16:30:36 -08:00
Stan Iliev
e12d7315dd Enable fast drawing for solid color nine patch rectangles
Pass a hint to Skia, about which lattice rectangles are solid
color rectangles.

Bug: 69796044
Test: Measured ninepatch performance using sample app from the bug
Change-Id: Ib07b1b64c78ab16195f9af88a989d28682084565
2017-12-11 18:22:17 +00:00
Greg Daniel
1f397705eb Merge "Update GrContext creation calls to use sk_sp" 2017-12-11 18:03:36 +00:00
Greg Daniel
660d6eca99 Update GrContext creation calls to use sk_sp
Test: manual testing

Change-Id: I68d8706ffa7bc7c6622ea0b8c45d7297a131f6bf
2017-12-11 09:39:16 -05:00
TreeHugger Robot
7ccbd94cbf Merge "Turn on PGO for hwui" 2017-12-08 23:19:39 +00:00
TreeHugger Robot
e8b7642ff4 Merge "Optimize Outline::setRoundRect" 2017-12-08 18:35:02 +00:00