Go to file
John Stiles 26f9850a5a Add as<StatementSubclass> to downcast Statements more safely.
The as<T>() function asserts that the Statement is of the correct kind
before performing the downcast, and is also generally easier to read
as function calls flow naturally from left-to-right, and C-style casts
don't.

This CL updates several Statement downcasts in SkSL to the as<T>
syntax, but is not intended to exhaustively replace them all (although
that would be ideal). In places where we SkASSERTed the expression's
fKind immediately before a cast, the assert has been removed because it
would be redundant with the behavior of as<T>().

Change-Id: If92a1740d49c7670ded80cdbbfde67a7d5f73740
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/311216
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-08-18 14:39:07 +00:00
animations first cut at a checkbox 2009-10-21 19:41:10 +00:00
bench Enable ClangTidy check readability-redundant-smartptr-get. 2020-08-16 15:56:48 +00:00
bin bin/try: automatically set 'git cl issue' when not found 2020-06-25 17:44:01 +00:00
build/fuchsia [fuchsia] Fix fidlc command. 2020-06-10 03:29:24 +00:00
build_overrides Use Dawn's BUILD.gn instead of defining another one for Skia. 2020-04-13 23:26:31 +00:00
client_utils/android Enable ClangTidy check modernize-make-unique. 2020-08-03 17:53:52 +00:00
demos.skia.org Add path rendering performance demo to demos.skia.org 2020-08-11 19:57:08 +00:00
dm Enable ClangTidy check readability-redundant-smartptr-get. 2020-08-16 15:56:48 +00:00
docker Fix swiftshader Dockerfile. 2020-07-20 17:17:53 +00:00
docs/examples Update more example code to GrDirectContext/GrRecordingContext pair 2020-08-13 19:30:12 +00:00
example Clean up GrContext references in the src/gpu 2020-07-16 14:14:08 +00:00
experimental Enable ClangTidy check readability-redundant-smartptr-get. 2020-08-16 15:56:48 +00:00
fuzz Enable ClangTidy check readability-redundant-smartptr-get. 2020-08-16 15:56:48 +00:00
gm use pathbuilder 2020-08-17 22:05:00 +00:00
gn Reland "move conditions for JIT into SkVM.h" 2020-08-14 18:05:45 +00:00
include Enhance assert to dump more information 2020-08-18 13:53:25 +00:00
infra [infra] Update go to 1.15 2020-08-17 18:07:57 +00:00
modules Fix constness of ExternalValue* inside ExternalValueReference. 2020-08-18 13:44:05 +00:00
platform_tools Add android:exported values to all SkQP activities. 2020-08-17 13:33:09 +00:00
resources Reland "Add an SkImageGenerator that uses NDK APIs" 2020-08-05 18:55:30 +00:00
samplecode Componentize SkAudioPlayer 2020-08-14 13:46:06 +00:00
site Describe the Skia 'onMethodName' pattern. 2020-08-14 14:21:28 +00:00
specs Fix CanvasKit generated documentation to work with emscripten 1.39.16. 2020-05-27 12:23:32 +00:00
src Add as<StatementSubclass> to downcast Statements more safely. 2020-08-18 14:39:07 +00:00
tests Fix constness of ExternalValue* inside ExternalValueReference. 2020-08-18 13:44:05 +00:00
third_party Switch Skia's libjpeg-turbo used for testing to Chromium version 2020-08-18 14:08:15 +00:00
tools use pathbuilder 2020-08-17 22:05:00 +00:00
.clang-format Disable BinPackParameters in .clang-format 2020-03-27 14:32:40 +00:00
.clang-tidy Enable ClangTidy check readability-redundant-smartptr-get. 2020-08-16 15:56:48 +00:00
.gitignore [infra] Update recipe dependencies 2020-08-03 11:34:57 +00:00
.gn Basic standalone GN configs. 2016-07-21 12:25:45 -07:00
AUTHORS GCC: fix unknown attribute warnings for no_sanitize 2020-07-06 13:52:22 +00:00
BUILD.gn Drop support for Wuffs v0.2 2020-08-17 14:42:09 +00:00
codereview.settings Make uploading to Gerrit the default for Skia 2016-11-09 19:07:56 +00:00
CONTRIBUTING Fix references to https://sites.google.com/site/skiadocs/. 2015-02-03 13:12:54 -02:00
CQ_COMMITTERS Moved committer list to chrome-infra-auth and deleted it from the repo 2015-09-02 13:37:54 -07:00
DEPS Switch Skia's libjpeg-turbo used for testing to Chromium version 2020-08-18 14:08:15 +00:00
go.mod Update Go Deps 2020-07-25 05:33:32 +00:00
go.sum Update Go Deps 2020-07-25 05:33:32 +00:00
LICENSE LICENSE file: clean up 2019-11-22 21:59:03 +00:00
OWNERS add OWNERS file 2017-12-01 19:50:19 +00:00
PRESUBMIT.py PRESUBMIT: Don't check formatting of deleted files 2020-04-08 10:36:09 +00:00
public.bzl Reland "Add an SkImageGenerator that uses NDK APIs" 2020-08-05 18:55:30 +00:00
README Fix references to https://sites.google.com/site/skiadocs/. 2015-02-03 13:12:54 -02:00
README.chromium Update README.chromium. 2015-06-11 13:19:24 -07:00
RELEASE_NOTES.txt Add platform image encoder for using NDK APIs 2020-08-13 15:21:41 +00:00
whitespace.txt Whitespace change to re-trigger Mac/iOS tests 2020-02-23 20:55:01 +00:00

Skia is a complete 2D graphic library for drawing Text, Geometries, and Images.

See full details, and build instructions, at https://skia.org.