skia2/tools
Brian Osman 767f444feb SkRuntimeEffect SkSL has a new signature for main()
There is no more 'inout half4 color'. Effects return their output color.
If an effect wants the input color, it must use the (already existing)
approach of sampling a nullptr input shader.

The change is guarded for Chromium (so we can update their runtime color
filters in skia_renderer.cc).

For the GPU backend, FPs can now override usesExplicitReturn to indicate
that their emitCode will generate a return statement. If that's true,
then writeProcessorFunction doesn't inject the automatic return of the
output color, and emitFragProc will *always* wrap that FP in a helper
function, even as a top-level FP. GrSkSLFP opts in to this behavior, so
that the user-supplied return becomes the actual return in the FP's
emitCode.

Adapting the skvm code to this wasn't too bad: It looks fragile (what
happens if there are multiple returns?), but that's not really possible
today, without varying control flow.

Bug: skia:10613

Change-Id: I205b81fd87dd32bab30b6d6d5fc78853485da036
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310756
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-08-25 13:36:28 +00:00
..
android [minor] mark scripts as executable 2019-11-21 17:06:27 +00:00
calmbench [minor] mark scripts as executable 2019-11-21 17:06:27 +00:00
copyright Fix pylint check in presubmit 2018-06-22 14:38:28 +00:00
debugger Add origin visualization, add support for Concat44 2020-08-20 17:49:32 +00:00
doxygen Remove more references to "master" 2020-07-28 13:06:07 +00:00
fiddle Update more example code to GrDirectContext/GrRecordingContext pair 2020-08-13 19:30:12 +00:00
flags Update SkTQSort to use half-open ranges. 2020-07-14 22:13:59 +00:00
fm add a global may-we-JIT flag 2020-08-05 16:35:45 +00:00
fonts SkCustomTypefaceBuilder to set SkFontStyle 2020-08-19 00:09:55 +00:00
gdb Update gdb bitmap viewer. 2018-06-20 21:24:27 +00:00
gpu Revert "Remove ARC from Metal backend" 2020-08-24 17:16:54 +00:00
infra [infra] Use "mod download" and "install", not "get" in chrome_release_branch 2019-12-06 11:16:41 +00:00
lottie-web-perf HTML typo egde => edge 2020-06-19 15:12:06 +00:00
lottiecap HTML typo egde => edge 2020-06-19 15:12:06 +00:00
lua Enable ClangTidy check readability-redundant-smartptr-get. 2020-08-16 15:56:48 +00:00
malisc Extend --writeShaders to output SPIR-V 2019-04-15 14:04:18 +00:00
mdbviz Reland "Merge GrOpList and GrRTOpList and rename to GrOpsTask." 2019-08-22 20:52:09 +00:00
perf-canvaskit-puppeteer Add more perf tests and other minor improvemnts 2020-08-10 15:23:53 +00:00
rebaseline [minor] mark scripts as executable 2019-11-21 17:06:27 +00:00
sk_app Set input usage flag on all internally created vk RTs. 2020-08-21 22:22:50 +00:00
skdiff Revert "Remove custom SkSort algorithms." 2020-07-14 00:25:05 +00:00
skiaserve Enable ClangTidy check llvm-namespace-comment. 2020-08-06 19:07:52 +00:00
skottie_ios_app Update iOS Skottie App for GrContext changes 2020-08-14 12:55:56 +00:00
skottie-wasm-perf HTML typo egde => edge 2020-06-19 15:12:06 +00:00
skp Change URL in skia_css3gradients_desktop.py 2020-06-18 15:36:18 +00:00
skpbench Update final set of tools to take GrDirectContext 2020-07-06 12:48:03 +00:00
skqp Enable ClangTidy check llvm-namespace-comment. 2020-08-06 19:07:52 +00:00
skui Enable ClangTidy check llvm-namespace-comment. 2020-08-06 19:07:52 +00:00
svg [minor] mark scripts as executable 2019-11-21 17:06:27 +00:00
timer Adapt GrRectBlur for cases with rect W/H less than six sigma. 2019-09-10 14:39:07 +00:00
trace Remove SkTMin and SkTMax 2020-02-07 18:40:09 +00:00
viewer SkRuntimeEffect SkSL has a new signature for main() 2020-08-25 13:36:28 +00:00
__init__.py
abandon_gerrit_cls.py Add wrapper script to call tool to bulk abandon Gerrit CLs 2020-03-11 18:50:57 +00:00
add_codereview_message.py Remove trailing whitespace. 2017-10-09 21:20:34 +00:00
AndroidSkDebugToStdOut.cpp rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
AutoreleasePool.h Reland "Added AutoreleasePool for managing pool memory in testing apps." 2019-05-31 15:40:01 +00:00
AutoreleasePool.mm Reland "Added AutoreleasePool for managing pool memory in testing apps." 2019-05-31 15:40:01 +00:00
BigPathBench.inc Factor out VisualBench timing code into a helper class 2015-10-05 07:23:30 -07:00
blob_cache_sim.cpp SkRemoteGlyphCache Add tracing to diff canvas 2019-10-24 17:09:31 +00:00
build_command_buffer.py Improvements to build_command_buffer.py 2016-11-04 10:54:54 -07:00
BUILD_simulator.py Fix Google3 fonts. Use fontconfig rather than custom_directory_factory. Add Google3 font caching. 2015-12-01 11:12:05 -08:00
build_workaround_header.py Add CheckGeneratedFiles recipe check for gpu workarounds 2018-04-25 19:26:27 +00:00
check-headers-self-sufficient rm SkPreConfig.h and SkPostConfig.h 2020-02-06 19:16:43 +00:00
chrome_fuzz.cpp rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
chrome_release_branch [infra] Add chrome_release_branch script 2019-04-16 19:46:10 +00:00
chrome_release_branch.bat [infra] Add chrome_release_branch script 2019-04-16 19:46:10 +00:00
chrome_release_branch.py [infra] chrome_release_branch: maintain the last 3 branches 2020-05-13 18:13:13 +00:00
clang-tidy.sh don't run clang-tidy on third_party 2020-03-30 15:26:32 +00:00
compare_codereview.py Further tweak compare_codereview.py. 2014-03-25 18:02:17 +00:00
convert-to-nia.cpp Add convert-to-nia command-line program 2020-05-28 15:08:08 +00:00
cpu_modules.cpp Particle cleanup: split SkParticleBinding out of SkParticleEffect 2019-08-30 15:32:38 +00:00
CrashHandler.cpp SKQP Build for Fuchsia SDK 2019-11-18 12:34:28 +00:00
CrashHandler.h rewrite ambiguous comment 2015-02-10 07:47:31 -08:00
DDLPromiseImageHelper.cpp Enable ClangTidy check performance-unnecessary-copy-initialization. 2020-08-07 22:20:36 +00:00
DDLPromiseImageHelper.h Enable ClangTidy check readability-const-return-type. 2020-08-07 17:42:38 +00:00
DDLTileHelper.cpp Handle invalid DDLRecorder case 2020-08-13 18:20:12 +00:00
DDLTileHelper.h Retract GrContext.h from headers 2020-07-13 20:03:58 +00:00
doxygen_footer.txt
dump_record.cpp densify dump_record 2020-08-19 13:35:09 +00:00
embed_resources.py Tweak scripts to fix CK builds with python 3 2020-06-29 12:59:05 +00:00
find_run_binary.py [minor] mark scripts as executable 2019-11-21 17:06:27 +00:00
fix_pythonpath.py [minor] mark scripts as executable 2019-11-21 17:06:27 +00:00
force_older_glibc_math.h roll cast toolchain 2019-08-15 20:02:18 +00:00
gcov_shim add a way to get code coverage 2013-09-13 19:32:43 +00:00
get_current_monitor_profile.cpp rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
get_images_from_skps.cpp rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
git-sync-deps tools/git-sync-deps works with either python 2020-01-10 16:30:11 +00:00
HashAndEncode.cpp support 16161616 in fm 2020-07-17 20:35:33 +00:00
HashAndEncode.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
hello-opencl.cpp run all available OpenCL devices 2019-02-11 21:29:33 +00:00
image_diff_metric.cpp pdf-comparison and image_diff_metric tools 2019-09-19 21:18:28 +00:00
imgcvt.cpp Move skcms.h to include/third_party/skcms 2019-04-29 15:02:45 +00:00
install_dependencies.sh Add harfbuzz to tools/install_dependencies.sh 2019-05-03 23:52:09 +00:00
ios_utils.h Fix bugs with fence sync API on iOS devices 2017-10-10 19:05:13 +00:00
ios_utils.m rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
jsondiff.py Fix pylint check in presubmit 2018-06-22 14:38:28 +00:00
list_gms.cpp gm: GMFactory returns a unique_ptr<> 2019-08-12 19:02:40 +00:00
list_gpu_unit_tests.cpp rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
LsanSuppressions.cpp stifle leaks in terminator_CreateDevice() 2020-04-08 15:28:48 +00:00
merge_static_libs.py Remove trailing whitespace. 2017-10-09 21:20:34 +00:00
milestone.py SkPDF: milestone in metadata, also SkMilestone.h 2016-03-29 09:09:29 -07:00
mirror-dev.sh Update mirror-dev for *-dev:amd64 packages. 2017-11-09 22:44:57 +00:00
misc_utils.py Whitespace fixes for Python tools 2014-06-25 08:40:58 -07:00
OverwriteLine.h eliminate SK_BUILD_FOR_WIN32 2018-01-26 19:52:04 +00:00
parse_llvm_coverage.py Walk through files in parse_llvm_coverage.py instead of using 'git ls-files' 2016-04-18 04:18:56 -07:00
pathops_sorter.htm fix pathops bug 8380 2018-12-21 19:15:54 +00:00
pathops_visualizer.htm fix pathops bug 8380 2018-12-21 19:15:54 +00:00
ProcStats.cpp Add heap usage of SkSL::Compiler to nanobench output 2020-07-09 00:05:28 +00:00
ProcStats.h Add heap usage of SkSL::Compiler to nanobench output 2020-07-09 00:05:28 +00:00
public_headers_warnings_check.cpp GN: add public headers warnings check. 2016-11-16 19:27:29 +00:00
random_parse_path.cpp rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
random_parse_path.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
reformat-json.py add reformat-json.py script 2013-07-19 15:45:22 +00:00
Registry.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
remote_demo.cpp Enable ClangTidy check readability-redundant-smartptr-get. 2020-08-16 15:56:48 +00:00
ResourceFactory.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
Resources.cpp rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
Resources.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
retrieve_from_googlesource.py [minor] mark scripts as executable 2019-11-21 17:06:27 +00:00
rewrite_includes.py renable SkM44.h checks 2020-02-26 14:54:55 +00:00
sanitize_source_files.py Clean up more references to GYP. 2017-02-06 17:55:35 +00:00
skhello.cpp rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkMetaData.cpp Move fontmgr_bounds labels to tight bounds 2020-08-24 15:02:44 +00:00
SkMetaData.h Move fontmgr_bounds labels to tight bounds 2020-08-24 15:02:44 +00:00
skottie2movie.cpp Use ContextInfo::directContext() in skottie2movie.cpp 2020-07-07 12:39:22 +00:00
skp_parser.cpp Remove an uncessary and unused parameter for partially generating the JSON command list 2019-12-13 19:30:03 +00:00
skpinfo.cpp rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkSharingProc.cpp Reland "Deserialize MultiPictureDocument based SKP files (with image sharing proc) in wasm debugger." 2019-06-21 15:49:21 +00:00
SkSharingProc.h Reland "Deserialize MultiPictureDocument based SKP files (with image sharing proc) in wasm debugger." 2019-06-21 15:49:21 +00:00
SkVMBuilders.cpp remove i16x2 ops 2020-04-13 19:08:11 +00:00
SkVMBuilders.h remove i16x2 ops 2020-04-13 19:08:11 +00:00
Stats.h Update SkTQSort to use half-open ranges. 2020-07-14 22:13:59 +00:00
test_all.py skimage, die die die 2014-12-15 12:47:52 -08:00
test_pdfs.py
ToolUtils.cpp use pathbuilder 2020-08-17 22:05:00 +00:00
ToolUtils.h SkCustomTypefaceBuilder to set SkFontStyle 2020-08-19 00:09:55 +00:00
UrlDataManager.cpp begin refactoring SkTDynamicHash and SkTMultiMap 2020-03-16 14:06:30 +00:00
UrlDataManager.h Enable ClangTidy check readability-redundant-smartptr-get. 2020-08-16 15:56:48 +00:00
using_skia_and_harfbuzz.cpp Fix clang 12 Wsuggest-override and Wsuggest-destructor-override 2020-07-22 01:11:36 +00:00
valgrind.supp Add another make_get_error_with_random_oom valgrind suppression 2020-06-24 22:15:33 +00:00
win_dbghelp.cpp Remove "dummy" to comply with Android's inclusive language guidance 2020-07-31 19:11:23 +00:00
win_dbghelp.h eliminate SK_BUILD_FOR_WIN32 2018-01-26 19:52:04 +00:00
win_lcid.cpp Move SkTSearch.h into src. 2019-05-15 14:15:07 +00:00
xsan.supp rename tools/xsan.blacklist 2020-07-24 18:12:31 +00:00