3699 Commits

Author SHA1 Message Date
Chris Craik
9138948df9 Merge "Always flush renderstate in DeferredLayerUpdater::apply" 2017-02-15 19:10:08 +00: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
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
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
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
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
Romain Guy
91a8ec0145 Don't print shader source
Bug: 32984164
Test: compile & run
Change-Id: If632e49b773ca44d4e09e3acb5979f4df15a8d77
2017-02-08 07:45:11 -08:00
Chris Craik
08c9ca5228 Merge "Add ShadowShaderAnimation benchmark" 2017-02-08 14:23:34 +00: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
Sergei Vasilinetc
f77921056d Merge "Clean up deferredLayers only onGpuContextDestroyed." 2017-02-06 21:49:01 +00: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
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
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
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
TreeHugger Robot
cf45c85297 Merge "Introduce set/getFontVariationSettings." 2017-01-31 05:46:27 +00:00
TreeHugger Robot
5d6facc89d Merge "Don't count hw bitmap's textures in TextureCache" 2017-01-31 00:51:56 +00:00
sergeyv
3e9999bd86 Explicitly destroy Layer in DeferredLayerUpdater on destroyHardwareResources()
Change-Id: I0987104eabda9a2a302b9e765213aad48f93aea4
Test: refactoring CL. Existing tests still pass
bug:33753499
2017-01-30 16:42:41 -08:00
sergeyv
00783be809 Don't count hw bitmap's textures in TextureCache
Test: refactoring CL.
bug: 34751775
Change-Id: I0f7c8338817329a5c75cec4e8b944779587d7b7f
2017-01-30 15:13:07 -08:00