8675 Commits

Author SHA1 Message Date
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
Miao Wang
558e5dac4d Merge "Remove uncessary dependency of libhwui" am: df36be5f17
am: eebd7d7970

Change-Id: I3e7b282340259eaad71569e8a15f5028852852ee
2017-02-07 00:08:05 +00:00
Miao Wang
eebd7d7970 Merge "Remove uncessary dependency of libhwui"
am: df36be5f17

Change-Id: I5ccce1f195a43ff00b9bd7fc350d7ae915c566d7
2017-02-06 22:56:58 +00:00
Sergei Vasilinetc
f77921056d Merge "Clean up deferredLayers only onGpuContextDestroyed." 2017-02-06 21:49:01 +00:00
Miao Wang
6addd61ff8 Remove uncessary dependency of libhwui
- libRS.so is not directly used. It is accessed by libRScpp.so.

Test: mm, and boot-up test on sailfish
Change-Id: I5742d2ee3b34ef09bcb997524408affce1ace8fd
(cherry picked from commit 629fd3d48ba1dbedc6e84e91a26f72fb1fba0e22)
2017-02-06 11:57:31 -08:00
Miao Wang
1d5b9778bb Merge "Remove uncessary dependency of libhwui" 2017-02-06 19:54:42 +00:00
sergeyv
c3f1316961 Clean up deferredLayers only onGpuContextDestroyed.
Test: manual
bug:34919311
Change-Id: I5488b0845ec3922424f5893943e4f42675dfc9fd
2017-02-06 11:45:14 -08:00
TreeHugger Robot
41fed8cc15 Merge "Use new Skia DrawShadow API" 2017-02-06 19:18:47 +00:00
Stan Iliev
30a75debb1 Use new Skia DrawShadow API
Use new Skia DrawShadow API to draw shadows and remove unused code
from HWUI.

Test: Built and ran shadow macrobench tests.
Change-Id: Ief86b03b7348367f8bae8c212d64d5a545eebaeb
2017-02-06 11:36:33 -05:00
Greg Daniel
bccd58cde3 Merge "Have Skia Vulkan backend support wait-for-gpu flag on tests" 2017-02-06 16:21:59 +00:00
Romain Guy
9fe7e16399 Gradients are now an absurd Chimera
As of O, gradients are interpolated in linear space. This unfortunately
affects applications that were expecting a certain behavior for the
alpha ramp. This change attempts to get the best of both world: better
color interpolation (in linear space) and the old alpha interpolation
(in gamma space). This is achieved by applying the electro-optical
transfer function to the alpha channel; an idea so wrong it would
make any graphics programmer worth his salt weep in disgust.

As abhorrent this idea might be to me, it also acts as a faint
beacon of hope admist the unfathomable darkness that is Android's
color management.

And if you allow me another misguided metaphor, this change
represents the flotsam I can cling onto in the hope to one day
reach the bountiful shores of linear blending and accurate color
management. Would this change not fix the distress caused by its
predecessors, I will have no choice but bow my head in shame until
the day I can finally devise an infallible plan.

Bug: 33010587
Test: CtsUiRenderingTestCases
Change-Id: I5397fefd7944413f2c820e613a5cba50579d4dd5
2017-02-03 16:56:46 -08:00
Chris Craik
f6a409067c Add simple gradient and colormatrix benchmarks
Bug: 34809371
Test: manual

Change-Id: I3af38c835c43f7c4a1d2976c7263d37dd1dc7084
2017-02-03 16:25:10 -08:00
Chris Craik
f772c047fa Add ShadowShaderAnimation benchmark DO NOT MERGE
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: I572476bd54e04566851f39027ada7254597b37f8
2017-02-03 11:45:47 -08:00
Greg Daniel
4f70887d34 Have Skia Vulkan backend support wait-for-gpu flag on tests
So trying to mimic what the EglManager does in the fence call.
Technically there are two logical queues I could wait on for the device,
the graphics queue and the present queue. Waiting on the device waits
for both these queues to finish. It wasn't obvious to me if the EGL was
waiting for just graphics work or both queues, so I went for both (by
waiting on device). However, so far every device we've seen in Vulkan
has the present and graphics queue combined on the physical device so
waiting for one or both should really be different.

Test: Manual ran macrobench in skiavk and more realistic values compared
to not waiting for gpu.

Change-Id: I17cde70c677a9ad1b6bf9bc9ca4fd5f8f3b807e3
2017-02-03 10:28:52 -05:00
Sergei Vasilinetc
16e211832e Merge "Check if layer is created in detachSurfaceTexture" 2017-02-03 01:08:26 +00:00
Adam Lesinski
dc5cd8b323 Merge "AssetManager2: Add other support methods" 2017-02-02 21:48:14 +00:00
sergeyv
db92bb71d0 Check if layer is created in detachSurfaceTexture
Test: manual
bug:34937475
Change-Id: Iaab7a341917456b40427efd2746d33ddd88514d1
2017-02-02 12:57:30 -08:00
Sergei Vasilinetc
f2ca8e030c Merge "Hardware bitmaps: Destroy texture ID generated for the copy" 2017-02-02 07:27:14 +00:00
sergeyv
9f4a82f569 Hardware bitmaps: Destroy texture ID generated for the copy
Test: manual
bug:34807359
Change-Id: Idb1ef2a2efcb3cf7fb96e2a1f0554a06e7cd0fc2
2017-02-01 17:50:27 -08:00
Sergei Vasilinetc
0e177d32ed Merge "Explicitly destroy Layer in DeferredLayerUpdater on destroyHardwareResources()" 2017-02-01 22:52:21 +00:00
Sergei Vasilinetc
2cf7b1f142 Merge "Properly clear textures for Hardware Bitmaps" 2017-02-01 22:48:06 +00:00
sergeyv
83809fec68 Properly clear textures for Hardware Bitmaps
Test: manual  (Description in the bug)
bug:34858530
Change-Id: I13eb89077c43ca28436509a7af5b7c11374446c4
2017-02-01 12:44:28 -08:00
TreeHugger Robot
e916e1741a Merge "Fix incorrect comments" 2017-02-01 20:14:04 +00:00
Romain Guy
91627f6170 Fix incorrect comments
Bug: 33010587
Test: comment only
Change-Id: Icdfa79bac50545bb73f4c40727fe51780ef4a56d
2017-02-01 09:59:02 -08:00
Miao Wang
629fd3d48b Remove uncessary dependency of libhwui
- libRS.so is not directly used. It is accessed by libRScpp.so.

Test: mm, and boot-up test on sailfish
Change-Id: I5742d2ee3b34ef09bcb997524408affce1ace8fd
2017-01-31 17:26:52 -08:00
Adam Lesinski
0c40524953 AssetManager2: Add other support methods
- Add GetResourceConfigurations()
- Add GetResourceLocales()
- Add ResolveReference()
- Add stub for GetResourceId()
- Change LoadedArsc and ApkAssets factory method to return const

Test: make libandroidfw_tests
Change-Id: Ia797dc9381a523b1a3e7029048a413e544730379
2017-01-31 16:20:29 -08:00
TreeHugger Robot
5703a0e429 Merge "LoadedArsc: Support feature splits." 2017-01-31 23:35:42 +00:00
TreeHugger Robot
65626b663a Merge "Add UiBench jank and macrobench tests for saveLayer performance" 2017-01-31 22:05:22 +00:00
Stan Iliev
010b6a58c7 Add UiBench jank and macrobench tests for saveLayer performance
Create 2 jank tests and 1 macrobench that measure saveLayer
performance:
- Fling a ListView, which has a vertical fading edge.
- Draw a canvas with 20 saveLayer/restore interleaved with other
drawText and drawRect ops.

Test: built and ran UiBench jank and macrobench tests.
Change-Id: I5a50feb7431d597c92c7a49031505d41f397d175
2017-01-31 15:13:08 -05:00