485 Commits

Author SHA1 Message Date
Robert Phillips
3c01a07fff Update RenderNodeDrawableTests to new onNewImageSnapshot API
Test: does it compiles

Change-Id: I55e3d7e2e59bfde88357fd455fe567d07c8a26b7
2017-03-23 12:29:39 -04:00
Robert Phillips
d9770c3c6c Update SkiaPipelineTests.cpp to use new onNewImageSnapshot signature
Test: code compiles & test continues to succeed

https://skia-review.googlesource.com/c/9882/ (Remove budgeted parameter 
from SkSurface::makeImageSnapshot (take 2)) seems to have stuck so this 
should be safe to land.

Change-Id: I9e6fdcc8debe7964e9522f7acd8829b54bc90986
2017-03-21 15:33:33 +00:00
TreeHugger Robot
2c64d5739b Merge "Modify VectorDrawable to scale path through canvas matrix" 2017-03-21 13:29:24 +00:00
Stan Iliev
cc29a5dde1 Modify VectorDrawable to scale path through canvas matrix
Apply the path matrix to the canvas instead of creating a new path.
Delete logic that scales the stroke, because this is done through
the matrix as well. Merge/delete some functions.

Bug: 36392701
Test: CTS graphics tests pass with minor changes in 6 golden images.
Quick settings and settings app drawables are OK. Vector icon app
draws identical paths.
Change-Id: If623bc0a535fad95a2839f79bd997c016bcd9d4d
2017-03-20 11:49:51 -04:00
Mike Reed
871cd2dd60 use SkVertices::Builder in drawBitmapLattice
override new virtual onDrawVerticesObject

Test:  CtsGraphicsTestCases

Change-Id: I38e3ee0aa2a1ee9c11474c2c5d648ee5fca20d78
2017-03-20 08:40:12 -04:00
TreeHugger Robot
9b0a5d1919 Merge "use _deprecated suffix for deprecated clipops" 2017-03-13 19:19:34 +00:00
Mike Reed
a0a74d5f8e use _deprecated suffix for deprecated clipops
Allows skia to remove legacy flag for older names
- SK_SUPPORT_EXOTIC_CLIPOPS
- SK_SUPPORT_LEGACY_CLIPOP_EXOTIC_NAMES

Test: CtsGraphicsTestCases

Change-Id: I78478d94d059641a9381579cae6d28f9f0685ad1
2017-03-13 17:38:16 +00:00
Stan Iliev
7d73fc2303 Add a new macrobench to test layer resize
Create a new HWUI macrobench to test hardware layer resize code path.

Test: Executed the new test on bullhead device with "adb shell
/data/benchmarktest64/hwuimacro hwlayersize --onscreen --wait-for-gpu -c
1000".

Change-Id: I9ed411d76ac3d51339a69add8ab1843c3256994a
2017-03-13 10:16:08 -04:00
Mathias Agopian
2bd7d98fe8 fallout from getting rid of IGraphicBufferAlloc
Test: compiled & run
Bug: cleanup
Change-Id: I1590105d3abef985c2ae7c1a03cdf5fd2ec4bef9
2017-03-08 23:12:06 +00:00
Chris Craik
3cad2c33ee Merge "Workaround arc textures drawing outside of bounds" 2017-03-07 17:53:22 +00:00
Chris Craik
49b403dc9c Workaround arc textures drawing outside of bounds
Fixes: 34077513
Test: hwui unit tests passing

This fixes an issue where drawArc operations would cause artifacts by
drawing outside of the clip / screen damage area. We now more
conservatively clip drawArc operations specifically, as they tend to
draw into the outer parts of their path textures more than other
operations.

A more long term fix would involve alignment between draw operation
sizing (in terms of what's resolved in a BakedOpState), and
PathTexture sizing (which currently conservatively expands beyond
stroked op bounds).

Change-Id: I5aff39cc04382323b457b159974032f5f371251a
2017-03-06 13:51:44 -08:00
Derek Sollenberger
792fb3252f Use SkPaint.nothingToDraw instead of PaintUtils helper.
The PaintUtils helper is now shared between all pipelines and was
missing a quick reject test for drawLoopers which are used in
view.setShadowLayer and supported in the Skia pipelines.

Bug: 35809097
Test: added hwui unit test and verified in DocumentsUI app
Change-Id: I3c4a988f1c42b7f421f78ac3659af1daee910ea2
2017-03-03 14:24:58 -05:00
TreeHugger Robot
4f357c0812 Merge "Fix potential use-after-free in LayerUpdateQueue" 2017-03-02 23:16:27 +00:00
John Reck
fc29f7acd1 Fix potential use-after-free in LayerUpdateQueue
Change-Id: I090af2191576175b165a9db574a80123c16f0778
Fixes: 26548204
Test: Builds & hwui unit tests pass
2017-03-02 13:30:15 -08:00
Derek Sollenberger
ea1fe9b9d6 Update SkiaDisplayList to use the modified SkLiteDL
SkLiteDL is no longer refcounted or a subclass of SkDrawable.

Test: on device testing in SkiaGL mode
Change-Id: I9ad53d764a26ab382d80d54908325962f2075802
2017-03-02 15:28:19 -05:00
Derek Sollenberger
dfe0647f6c Fix unit test that failed due to incorrect refactor.
Test: hwui unit tests
Change-Id: I88b962718086ff1ca3df1999b2040fb1007b6f33
2017-02-23 14:30:18 -05:00
Derek Sollenberger
f77ca08721 Fix HWUI tests to use android-only SkPaint flags
Test: compile only
Change-Id: Ia3a5710d4ae13d68e5b2655a8b135dae8ffeb513
2017-02-23 10:03:04 -05: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
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
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
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
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
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
Chris Craik
f6a409067c Add simple gradient and colormatrix benchmarks
Bug: 34809371
Test: manual

Change-Id: I3af38c835c43f7c4a1d2976c7263d37dd1dc7084
2017-02-03 16:25:10 -08:00
Sergei Vasilinetc
0e177d32ed Merge "Explicitly destroy Layer in DeferredLayerUpdater on destroyHardwareResources()" 2017-02-01 22:52:21 +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
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
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
John Reck
3afd63778e Switch how destroyHardwareResources works
destroyHardwareResources will now only force-destroy
the specific node it was called on, which are only
ever the root nodes. Rely on onRemovedFromTree()
to clean up resources for all other nodes.

Bug: 34736819

Test: RenderNode.multiTreeValidity passes, manually
verified fixes b/34736819

Change-Id: I1c275ad6a98b63bf50f265602f09bffe3e1f169b
2017-01-30 13:29:26 -08:00
John Reck
2de950d5a8 Overhaul RenderNode's DisplayList management
* Move mValid to native
* Have destroyHardwareResources destroy everything
* Remove flaky mParentCount checks in setStaging
* All tree updates have an internal observer to
  ensure onRemovedFromTree() is a reliable signal
* onRemovedFromTree() immediately releases resources
  to avoid displaylist "leaks"

Test: Unit tests for validity added & pass, manually
verified that b/34072929 doesn't repro

Bug: 34072929

Change-Id: I856534b4ed1b7f009fc4b7cd13209b97fa42a71c
2017-01-25 12:24:40 -08:00
TreeHugger Robot
f54c76399a Merge "use new clipbounds api" 2017-01-25 16:40:37 +00:00
Mike Reed
5e43898231 use new clipbounds api
Allows us to remove SK_SUPPORT_LEGACY_GETCLIPBOUNDS flag

Change-Id: I7c6665b4eb67c58fe747c07b8b87d58fe9b10120
2017-01-25 13:26:41 +00:00
Matt Sarett
02b0d40547 Merge "Fix renderOverdraw() test" 2017-01-24 22:49:43 +00:00
TreeHugger Robot
4f2a40ac9f Merge "Revert "Workaround libmemunreachable lockup"" 2017-01-24 19:49:55 +00:00
John Reck
efa38e38fb Revert "Workaround libmemunreachable lockup"
This reverts commit 553ae6ab071b1db5e783c8c02f9311b4969729f6.

Change-Id: I593b78f7073d84a5e16372849d27e943af65694c
Fixes: 34586922
2017-01-24 18:13:03 +00:00
Matt Sarett
341480bef5 Fix renderOverdraw() test
I'm not sure why this test was modifies, but this
restores the test to the original version, which passes.

Test: Passes unit test

BUG:34467659

Change-Id: I6699cf13d4b69301d57fa0cec9b24093e8263ba7
2017-01-24 09:05:39 -05:00
TreeHugger Robot
2ba96eced0 Merge "Add tests for b/34598346" 2017-01-23 23:46:00 +00:00
John Reck
47aa8d1477 Add tests for b/34598346
Test: unit test passes
Bug: 34598346
Change-Id: I7e5144aa875e42487718059cc06b86e32db28702
2017-01-23 14:07:53 -08:00
TreeHugger Robot
65e8f0adf3 Merge "Workaround libmemunreachable lockup" 2017-01-23 21:16:55 +00:00
John Reck
553ae6ab07 Workaround libmemunreachable lockup
Bug: 34586922
Test: hwui_unit_tests completes
Change-Id: Ia55f7bc49faf8a32624e2f16e2477eb12a261b07
2017-01-23 11:06:46 -08:00
Stan Iliev
c1db0e0ff7 Remove all calls to SkCanvas::getClipStack from HWUI unit tests
Refactor HWUI unit tests to not invoke SkCanvas::getClipStack,
because this Skia API is going to be deprecated.

Test: Build and ran sailfish-eng. Ran HWUI unit tests.
Change-Id: Iac277aa26fbe9e2a0860cde2dd43732ed1c4c4e3
2017-01-23 13:47:35 -05:00
Greg Daniel
57b8eb3da0 Merge "Update hwui_unit_tests to support running with Vulkan backend." 2017-01-18 16:13:04 +00:00
Greg Daniel
98c78dad19 Update hwui_unit_tests to support running with Vulkan backend.
Added Macros for RENDERTHREAD_TESTS which run these tests using specific backends.
RENDERTHREAD_TESTS - Runs OpenGL, SkiaGL, and SkiaVulkan
RENDERTHREAD_SKIA_TESTS - Runs SkiaGL and SkiaVulkan
RENDERTHREAD_OPENGL_TESTS - Runs OpenGL

Test: manual running of hwui_unit_tests

Change-Id: Ia7420ee7a38803a15e2d58394d14b38cae8208d3
2017-01-18 09:12:31 -05:00
Mark Salyzyn
173215d1b2 resolve merge conflicts of ec7e2a164c37 to master
Test: compile
Bug: 26552300
Bug: 31289077
Change-Id: I49c6e41b79061e2b3c0352e3ac8fa5ebb152b6f5
2017-01-12 08:28:30 -08:00
Mark Salyzyn
6dacea63d9 Merge "Replace cutils/log.h and log/logger.h with android/log.h or log/log.h (part deux)" am: 2225a0640b
am: d1740f0f5b

Change-Id: I78430cd21cf1186ccc2b48ee4ee8a9b07decde5e
2017-01-12 15:46:20 +00:00