diff options
author | 2017-08-30 10:02:10 -0400 | |
---|---|---|
committer | 2017-08-30 15:27:42 +0000 | |
commit | f9810666bd40db8fb1650e6c727c1a83b8090136 (patch) | |
tree | 0d346bbb44d61c7da4c53655620e890f60758ffc /tests/TestConfigParsing.cpp | |
parent | e750391c349ff1fa1c179fbf2f5af27fb4405cef (diff) |
Threaded generation of software paths
Re-land of: https://skia-review.googlesource.com/36560
All information needed by the thread is captured by the prepare
callback object, the lambda captures a pointer to that, and does the
mask render. Once it's done, it signals the semaphore (also owned by the
callback). The callback defers the semaphore wait even longer (into the
ASAP upload), so the odds of waiting for the thread are REALLY low.
Also did a bunch of cleanup along the way, and put in some trace markers
so we can monitor how well this is working.
Traces of a GM that includes GPU and SW path rendering (path-reverse):
Original:
https://screenshot.googleplex.com/f5BG3901tQg.png
Threaded, with wait in the callback (notice pre flush callback blocking):
https://screenshot.googleplex.com/htOSZFE2s04.png
Current version, with wait deferred to ASAP upload function:
https://screenshot.googleplex.com/GHjD0U3C34q.png
Bug: skia:
Change-Id: Idb92f385590749f41328a9aec65b2a93f4775079
Reviewed-on: https://skia-review.googlesource.com/40775
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Diffstat (limited to 'tests/TestConfigParsing.cpp')
-rw-r--r-- | tests/TestConfigParsing.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/TestConfigParsing.cpp b/tests/TestConfigParsing.cpp index e24c019dc8..8e2276c51a 100644 --- a/tests/TestConfigParsing.cpp +++ b/tests/TestConfigParsing.cpp @@ -121,7 +121,8 @@ DEF_TEST(ParseConfigs_DefaultConfigs, reporter) { "mock", "mtl", "gl4444", - "gl565" + "gl565", + "gltestthreading" }); SkCommandLineConfigArray configs; @@ -254,6 +255,8 @@ DEF_TEST(ParseConfigs_DefaultConfigs, reporter) { REPORTER_ASSERT(reporter, configs[29]->asConfigGpu()->getColorSpace() == srgbColorSpace.get()); REPORTER_ASSERT(reporter, configs[30]->asConfigGpu()); REPORTER_ASSERT(reporter, configs[30]->asConfigGpu()->getSamples() == 4); + REPORTER_ASSERT(reporter, configs[47]->asConfigGpu()); + REPORTER_ASSERT(reporter, configs[47]->asConfigGpu()->getTestThreading()); #ifdef SK_VULKAN REPORTER_ASSERT(reporter, configs[31]->asConfigGpu()); #endif |