8703 Commits

Author SHA1 Message Date
Mike Reed
b216c21acd underline is now only tracked by android
Change-Id: I189c57dd47ad413b8964d7e5805dfd6d4af11982
2017-02-22 10:49:51 -05:00
TreeHugger Robot
a231eb1410 Merge "Implement getAxes() method." 2017-02-22 09:35:13 +00:00
Mårten Kongstad
21a3d1ad68 OMS: integrate OverlayManagerService into framework
Hand over ownership of overlays to OverlayManagerService.

Changes to a package's overlays are propagated using the activity life
cycle. Affected activities will be recreated as needed. This provides a
well-defined point to modify an application's assets while the
application is paused.

Consolidate how overlays targeting the system and overlays targeting
regular applications are handled. Previously, system overlays were
handled as a special case. Now, everything is handled identically. As a
side effect, the call to idmap --scan during Zygote boot has become
obsolete and is removed.

Information on what overlays to use is recorded in
ApplicationInfo.resourceDirs. The PackageManagerService is responsible
for the creation of ApplicationInfo objects. The OverlayManagerService
is responsible for informing the PackageManagerService in advance about
what resourceDirs to use.

When launching an application, the ApplicationInfo is already populated
with up-to-date information about overlays.

When enabling or disabling an overlay for a running application, the
OverlayManagerService first notifies the PackageManagerService about the
updated resourceDirs. It then tells the ActivityManagerService to push
the new ApplicationInfo object to the application's ActivityThread.
Finally the application requests its ResourcesManager to create new
ResourcesImpl objects based on the updated paths.

Co-authored-by: Martin Wallgren <martin.wallgren@sonymobile.com>
Signed-off-by: Zoran Jovanovic <zoran.jovanovic@sonymobile.com>
Bug: 31052947
Test: run tests from 'OMS: tests for OverlayManagerService'
Change-Id: Idc96dae6fc075d5373aa055bbf50e919136d7353
2017-02-21 14:29:43 -08:00
Fyodor Kupolov
21edf1976c Merge "Check bounds in offsetToPtr" 2017-02-21 22:29:35 +00:00
TreeHugger Robot
f9bd294469 Merge "Overhaul GraphicsStatsService" 2017-02-21 19:23:46 +00:00
John Reck
df1742ed47 Overhaul GraphicsStatsService
* LRU cache of recently-used is dead, replaced
  disk storage
* ASHMEM size is read from native by the system service,
  no longer requires keeping a sizeof() in sync with a
  constant in Java
* Supports dumping in proto format by passing --proto
* Rotates logs on a daily basis
* Keeps a history of the most recent 3 days

Bug: 33705836
Test: Manual. Verified log rotating works by setting it up to
rotate every minute instead of day. Confirmed /data/system/graphicsstats
only has the most recent 3 entries after several minutes

Change-Id: Ib84bafb26c58701cc86f123236de4fff01aaa4aa
2017-02-21 09:49:10 -08:00
Derek Sollenberger
d7df6748f2 Merge "Add developer setting to set the default GPU renderer." 2017-02-21 17:37:38 +00:00
Derek Sollenberger
7c196d4a85 Merge "Disable buffer age swap behavior for SkiaGL on Adreno gpus" 2017-02-21 17:37:38 +00:00
TreeHugger Robot
28f99293f7 Merge "Fix Rgba16fTests@testTransferFunctionsShader test" 2017-02-18 02:59:33 +00:00
Romain Guy
dd6f1a7084 Fix Rgba16fTests@testTransferFunctionsShader test
RGBA16F bitmaps used as an SkBitmapShader would not set the hasLinearTexture
flag in the program description, causing a shader to be generated without
the proper opto-electronic transfer function.

Bug: 35482305
Test: bit -t CtsUiRenderingTestCases:android.uirendering.cts.testclasses.Rgba16fTests
Change-Id: I23354f8189a6b27b677eac9df82677e91282a31d
2017-02-17 17:09:21 -08:00
Adam Lesinski
edb88a2b94 Merge "Add ResTable_sparseTypeEntry support" 2017-02-18 00:39:18 +00:00
TreeHugger Robot
a5e8f6cb8f Merge "AssetManager2: Various fixes" 2017-02-17 23:27:58 +00:00
Fyodor Kupolov
45e2e95c2f Check bounds in offsetToPtr
Check whether specified offset belongs to mData.
Also added a default argument bufferSize to check the end offset.

Size of the ashmem descriptor can be modified between
ashmem_get_size_region call and mmap. createFromParcel method was updated
to check ashmem size again immediately after memory is mapped.

Test: manual - using the test app from the bug
Bug: 34128677
Change-Id: I3ecd1616a870ce20941ce9b20a1843d2b4295750
2017-02-16 09:50:00 -08:00
Adam Lesinski
c8f71aa67e Add ResTable_sparseTypeEntry support
Benchmarks on bullhead-userdebug show that there is a negligent
performance impact when using sparse entries on a 30% loaded
sparse type of 1000 resources.

Benchmark                                             Time           CPU Iterations
-----------------------------------------------------------------------------------
BM_SparseEntryGetResourceSparseLarge                255 ns        254 ns    2751408
BM_SparseEntryGetResourceNotSparseLarge             254 ns        254 ns    2756534

Bug: 27381711
Test: make libandroidfw_tests aapt2_tests
Change-Id: I051ea22f2f6b2bc3696e446adc9e2a34be18009f
2017-02-15 12:40:02 -08:00
Chris Craik
9138948df9 Merge "Always flush renderstate in DeferredLayerUpdater::apply" 2017-02-15 19:10:08 +00:00
Adam Lesinski
d1ecd7af68 AssetManager2: Various fixes
- Use FileMaps to open Assets (prevents closing of ApkAssets underlying
zip)
- Implement OpenDir and List methods
- Fix issue where DynamicRefTable wasn't properly constructed

Test: make libandroidfw_tests
Change-Id: Ib21a84e1114d028120744aa3bc1c6eb9d9399fa8
2017-02-15 10:50:23 -08:00
Chris Craik
2f1aaf7e24 updateTexImage before bitmap readback of DeferredLayerUpdaters
Bug: 34206215
Test: hwui unit tests passing

Change-Id: I4360c0d94a831b4d2ebfd4020e4241658bfa190a
2017-02-15 17:22:26 +00:00
Chris Craik
09df887c90 Always flush renderstate in DeferredLayerUpdater::apply
Bug: 34206215
Test: hwui unit tests passing, manual test of TextureView video playback

Always flush renderstate to the GlLayer's texture, regardless of
whether updateTexImage has ever been called.

Change-Id: I3974dce9d90633a0299e6bc4259b76c622717c90
2017-02-15 17:22:22 +00:00
Matt Sarett
b77c94a96a Disable buffer age swap behavior for SkiaGL on Adreno gpus
Test: Verified that this fixes rendering bugs.

BUG:31957043
Change-Id: I3e5bca73eae2d917906658f76d8c432dbb248d89
2017-02-14 14:39:00 -05:00
Derek Sollenberger
4badfe6d3b Add developer setting to set the default GPU renderer.
Test: manual on-device testing
Bug: 35345959
Change-Id: I1d846f922a048dd215caf053b10aaa909bdbc74d
2017-02-14 12:03:02 -05:00
TreeHugger Robot
ab582b762a Merge "Replace bitmap shaders with image shaders in test code" 2017-02-14 14:21:38 +00:00
Derek Sollenberger
7183b6908b Merge "Deprecate Canvas save/saveLayer flags." 2017-02-14 13:31:21 +00:00
Sergey Vasilinets
2eaae562fe Merge "DeferredLayerUpdater: clean up Layer lifecycle" 2017-02-14 01:28:26 +00:00
sergeyv
00eb43dbc0 DeferredLayerUpdater: clean up Layer lifecycle
Test: refactoring CL, all existent tests should pass
bug:34919311
Change-Id: Ib2889667a5ab8a2aaba443458782bc163467f0ea
2017-02-13 14:41:20 -08:00
Matt Sarett
c54b76e97d Replace bitmap shaders with image shaders in test code
Test: Verified that unit tests still pass.

Change-Id: I67d8046e49b9469e73caa9fe2a44ef2602c95d59
2017-02-13 17:01:59 -05:00
Seigo Nonaka
7a18b79961 Implement getAxes() method.
getAxes() is necessary for calling hb_font_set_variations.

Test: None
Change-Id: Iec4759189b0653aa483ba85682d10b2b81beaab8
2017-02-13 18:33:28 +09:00
Yuqian Li
9969111d9c Implement SkiaCanvasProxy::onDrawArc
Test: UiRendering CTS SweepTests with picture mode turned on and
drawBitmapMesh turned off (it's not implemented yet).

This should fix BUG:34306056, and part of BUG:34871089 (the drawArc part
of SweepTests in picture mode).

BUG:34306056
BUG:34871089

Change-Id: I8fdcf72ddb4a0bfccedfd7e4e374a1ec5df17d75
(cherry picked from commit 538b6359cf81b14322141089161f20291295d6d3)
2017-02-11 01:47:12 +00:00
TreeHugger Robot
395f2bbd62 Merge "Implement "dump displaylist" button for skia pipelines" 2017-02-10 23:10:58 +00:00
Matt Sarett
89ddb1f164 Update framework to use new SkColorSpace API
Test: This compiles with SK_USE_LEGACY_NAMED_COLOR_SPACE
turned off.

Change-Id: Ie573f59e0aa475bab06b38589db3c6158ad82c5a
2017-02-10 13:32:09 -05:00
Po-Chien Hsueh
6bfdfe67b3 Merge "Remove build flag ANDROID_ENABLE_RENDERSCRIPT" 2017-02-10 03:41:08 +00:00
Stan Iliev
d217237045 Implement "dump displaylist" button for skia pipelines
Implement "dump displaylist" button in hierarchyviewer for skia
pipelines.

Test: ran hierarchyviewer for all pipelines.
bug: 34819877
Change-Id: Ifeb578260f636cb67268f9f9259e7318bf7de453
2017-02-09 17:09:03 -05:00
Derek Sollenberger
b8201195df Deprecate Canvas save/saveLayer flags.
Test: compile
Bug: 14650725
Change-Id: I6424ac46bae0a7a87c4b7743e81319945dfdd087
2017-02-09 13:18:25 -05:00
TreeHugger Robot
024d22fdb7 Merge "AAPT2: Fix pseudolocalization to respect <xliff:g>" 2017-02-09 16:17:18 +00:00
Po-Chien Hsueh
c5ae595e6f Remove build flag ANDROID_ENABLE_RENDERSCRIPT
remove this flag and consider renderscript is always enabled

Bug: 34693640
Test: compile
Change-Id: I22464e1d64f2a55a60ba9f8ab1510f2811605552
2017-02-09 15:00:09 +08:00
TreeHugger Robot
77aee7128d Merge "Don't print shader source" 2017-02-08 18:00:26 +00:00
TreeHugger Robot
3238f730bd Merge "Fix deadlock in render thread when Bitmap.prepareToDraw is invoked" 2017-02-08 17:39:36 +00:00
TreeHugger Robot
42c401adbd Merge "AssetManager2: Add GetResourceId" 2017-02-08 16:50:33 +00:00
Romain Guy
91a8ec0145 Don't print shader source
Bug: 32984164
Test: compile & run
Change-Id: If632e49b773ca44d4e09e3acb5979f4df15a8d77
2017-02-08 07:45:11 -08:00
Adam Lesinski
7542162cb1 AAPT2: Fix pseudolocalization to respect <xliff:g>
The XLIFF 'g' tag specifies content that should NOT be translated.
AAPT2's pseudolocalization process should respect it.

Bug:34064599
Test: make libandroidfw_tests
Change-Id: Ice437d7f0ff246730ee04896fd035e2d846148fb
2017-02-08 06:23:45 -08:00
Chris Craik
08c9ca5228 Merge "Add ShadowShaderAnimation benchmark" 2017-02-08 14:23:34 +00:00
Adam Lesinski
929d6517df AssetManager2: Add GetResourceId
Add ability to lookup a resource by name.

Test: make libandroidfw_tests
Change-Id: I262ba5ce4c9892458226fbdb44cf21f9877fb92d
2017-02-08 06:04:52 -08:00
TreeHugger Robot
c03fdb3e3f Merge "Fix capturing systrace while hwuimacro is running" 2017-02-08 10:24:28 +00:00
TreeHugger Robot
c270de85cc Merge "Apply transfer function when rendering with linear textures" 2017-02-08 10:06:03 +00:00
Romain Guy
636afc1877 Apply transfer function when rendering with linear textures
RGBA16F bitmaps are always encoded in linear space, which means we must
apply the opto-electronic transfer function before we can render them
in the framebuffer.

Since our linear bitmaps are assumed to be scRGB, values can be negative.
The OETF is a slightly modified sRGB OETF:

sign(x) * OETF_sRGB(abs(x))

This effectively mirrors the OETF over the negative domain.

This CL also removes the "optimized" shader generation path. With
current compilers, the optimized path doesn't do anything of value
and makes ProgramCache difficult to maintain. Shader compilers inline
everything and are really good at folding expressions and removing
unused code.

Bug: 32984164
Test: CtsUiRenderingTestCases
Change-Id: Ieb458ad53574e3a8959aa6bccbbd2d1fe203cbc5
2017-02-07 22:30:34 +00:00
John Reck
e10971d903 Fix capturing systrace while hwuimacro is running
Test: manual; ran hwuimacro -c 10000 and started a systrace
while it was running. verified trace tags showed up as
expected

Change-Id: Iedc20c6825e77b76ad79660512b627201f61969f
2017-02-07 15:31:03 -05:00
Chris Craik
0091181f32 Add ShadowShaderAnimation benchmark
Bug: 34809371
Test: manual

New benchmark uses several levels of overdraw from just shadows to benchmark
shadow shader performance.

Tessellation workload is minimal, due to simple rect caster shape.

Change-Id: I760961e6d48d44ca61f4e8ebca5760175af34953
2017-02-07 19:49:22 +00:00
Chris Craik
49ddb3d558 Merge "Add simple gradient and colormatrix benchmarks" 2017-02-07 19:48:35 +00:00
TreeHugger Robot
3f57d7f7eb Merge "Gradients are now an absurd Chimera" 2017-02-07 19:27:02 +00:00
Stan Iliev
6983bc40d7 Fix deadlock in render thread when Bitmap.prepareToDraw is invoked
Fix a deadlock with Skia pipelines, caused by calling
Bitmap::getSkBitmap from render thread.

Test: built and booted an image. Ran recent apps activity.
bug: 35060578
bug: 34926691
Change-Id: Iaf7957b955d938b722b153d72ad832ae5d50e86f
2017-02-07 09:18:17 -05:00
Miao Wang
ffa46b2053 Merge "Remove uncessary dependency of libhwui" am: df36be5f17 am: eebd7d7970
am: 558e5dac4d

Change-Id: I99b2fded709c63c71fd9d9f02020a986e3025fa6
2017-02-07 00:12:49 +00:00