[includes] Enforce IWYU on sksl code

PS1 regenerates the Bazel files. Use it as the base change when
    comparing patchsets.

IWYU seems to do a good job of working with MyFile.cpp and
MyFile.h, but if there is just a MyHeader.h, it doesn't always
seem to throw errors if the includes aren't correct. This was
observed with include/sksl/DSL.h This might be due to the fact
that headers are not compiled on their own, so they are never
sent directly to the IWYU binary.

This change sets enforce_iwyu_on_package() on the all sksl
packages and then fixes the includes until all those checks
are happy. There were a few files that needed fixes outside
of the sksl folder. Examples include:
 - src/gpu/effects/GrConvexPolyEffect.cpp
 - tests/SkSLDSLTest.cpp

To really enforce this, we need to add a CI/CQ job that runs
bazel build //example:hello_world_gl --config=clang \
  --sandbox_base=/dev/shm --features skia_enforce_iwyu

If that failed, a dev could make the changes described in
the logs and/or run the command locally to see those
prescribed fixes.

I had to add several entries to toolchain/IWYU_mapping.imp
in order to fix some private includes and other atypical
choices. I tried adding a rule there to allow inclusion of
SkTypes.h to make sure defines like SK_SUPPORT_GPU, but
could not get it to work for all cases, so I deferred to
using the IWYU pragma: keep (e.g. SkSLPipelineStageCodeGenerator.h)

Change-Id: I4c3e536d8e69ff7ff2d26fe61a525a6c2e80db06
Bug: skia:13052
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/522256
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
This commit is contained in:
Kevin Lubick 2022-03-18 16:40:58 -04:00
parent dd3a6894f4
commit 08ece0c9a0
154 changed files with 1859 additions and 559 deletions

View File

@ -22,10 +22,9 @@ known_good_builds:
bazelisk build //:skia_core --config=clang --sandbox_base=/dev/shm
bazelisk build //src/sksl/lex:sksllex --config=clang --sandbox_base=/dev/shm
bazelisk build //tools/skdiff --config=clang --sandbox_base=/dev/shm
bazelisk build //example:hello_world_gl --config=clang --sandbox_base=/dev/shm
# Test the enforcement of include what you use
bazelisk build //experimental/bazel_test/... --config=clang --sandbox_base=/dev/shm \
bazelisk build //example:hello_world_gl --config=clang --sandbox_base=/dev/shm \
--features skia_enforce_iwyu
# Both with and without a GPU backend should be error free (i.e. IWYU should let us
# conditionally import things.

View File

@ -126,6 +126,7 @@ generated_cc_atom(
":PaintParams_hdr",
"//include/private:SkUniquePaintParamsID_hdr",
"//src/core:SkBlenderBase_hdr",
"//src/core:SkKeyContext_hdr",
"//src/core:SkPipelineData_hdr",
"//src/core:SkShaderCodeDictionary_hdr",
],
@ -150,6 +151,7 @@ generated_cc_atom(
"//experimental/graphite/include:TextureInfo_hdr",
"//experimental/graphite/src/mtl:MtlTrampoline_hdr",
"//include/core:SkPathTypes_hdr",
"//src/core:SkKeyContext_hdr",
"//src/core:SkKeyHelpers_hdr",
"//src/core:SkShaderCodeDictionary_hdr",
],
@ -204,6 +206,7 @@ generated_cc_atom(
":Gpu_hdr",
":Log_hdr",
":RecorderPriv_hdr",
":Renderer_hdr",
":ResourceProvider_hdr",
":TextureProxy_hdr",
":Texture_hdr",
@ -222,6 +225,7 @@ generated_cc_atom(
"//src/core:SkMatrixPriv_hdr",
"//src/core:SkPaintPriv_hdr",
"//src/core:SkSpecialImage_hdr",
"//src/core:SkStroke_hdr",
],
)
@ -231,6 +235,7 @@ generated_cc_atom(
visibility = ["//:__subpackages__"],
deps = [
":DrawTypes_hdr",
":ResourceTypes_hdr",
"//include/core:SkRefCnt_hdr",
"//src/gpu:BufferWriter_hdr",
],
@ -938,6 +943,7 @@ generated_cc_atom(
":UploadTask_hdr",
"//experimental/graphite/include:Recorder_hdr",
"//src/core:SkConvertPixels_hdr",
"//src/core:SkTraceEvent_hdr",
],
)

View File

@ -14,7 +14,10 @@ generated_cc_atom(
"//include/core:SkRect_hdr",
"//src/core:SkUniformData_hdr",
"//src/gpu:BufferWriter_hdr",
"//src/gpu/tessellate:AffineMatrix_hdr",
"//src/gpu/tessellate:MiddleOutPolygonTriangulator_hdr",
"//src/gpu/tessellate:PatchWriter_hdr",
"//src/gpu/tessellate:PathCurveTessellator_hdr",
"//src/gpu/tessellate:PathTessellator_hdr",
],
)

View File

@ -3843,6 +3843,7 @@ generated_cc_atom(
deps = [
":gm_hdr",
"//include/effects:SkRuntimeEffect_hdr",
"//include/sksl:DSL_hdr",
"//src/core:SkCanvasPriv_hdr",
"//src/gpu:SurfaceFillContext_hdr",
"//src/gpu/glsl:GrGLSLFragmentShaderBuilder_hdr",

View File

@ -7,6 +7,7 @@
#include "gm/gm.h"
#include "include/effects/SkRuntimeEffect.h"
#include "include/sksl/DSL.h"
#include "src/core/SkCanvasPriv.h"
#include "src/gpu/SurfaceFillContext.h"
#include "src/gpu/glsl/GrGLSLFragmentShaderBuilder.h"

View File

@ -141,7 +141,6 @@ generated_cc_atom(
visibility = ["//:__subpackages__"],
deps = [
":SkAlphaType_hdr",
":SkImageInfo_hdr",
":SkScalar_hdr",
":SkTypes_hdr",
],
@ -355,7 +354,6 @@ generated_cc_atom(
hdrs = ["SkImageEncoder.h"],
visibility = ["//:__subpackages__"],
deps = [
":SkBitmap_hdr",
":SkData_hdr",
":SkEncodedImageFormat_hdr",
":SkPixmap_hdr",

View File

@ -312,6 +312,7 @@ generated_cc_atom(
deps = [
":SkSLString_hdr",
":SkTArray_hdr",
"//include/sksl:SkSLPosition_hdr",
"//src/sksl:SkSLLexer_hdr",
"//src/sksl:SkSLModifiersPool_hdr",
"//src/sksl:SkSLPool_hdr",
@ -329,7 +330,10 @@ generated_cc_atom(
name = "SkSLModifiers_hdr",
hdrs = ["SkSLModifiers.h"],
visibility = ["//:__subpackages__"],
deps = [":SkSLLayout_hdr"],
deps = [
":SkSLLayout_hdr",
"//include/sksl:SkSLPosition_hdr",
],
)
generated_cc_atom(
@ -366,7 +370,10 @@ generated_cc_atom(
name = "SkSLString_hdr",
hdrs = ["SkSLString.h"],
visibility = ["//:__subpackages__"],
deps = [":SkSLDefines_hdr"],
deps = [
":SkSLDefines_hdr",
"//include/core:SkTypes_hdr",
],
)
generated_cc_atom(

View File

@ -8,8 +8,9 @@
#ifndef SKSL_STRING
#define SKSL_STRING
#include "include/core/SkTypes.h"
#include "include/private/SkSLDefines.h"
#include <cstring>
#include <stdarg.h>
#include <string>
#include <string_view>

View File

@ -1,13 +1,15 @@
load("//bazel:macros.bzl", "generated_cc_atom")
load("//bazel:macros.bzl", "enforce_iwyu_on_package", "generated_cc_atom")
enforce_iwyu_on_package()
generated_cc_atom(
name = "DSLBlock_hdr",
hdrs = ["DSLBlock.h"],
visibility = ["//:__subpackages__"],
deps = [
":DSLExpression_hdr",
":DSLStatement_hdr",
"//include/private:SkSLDefines_hdr",
"//include/private:SkTArray_hdr",
],
)
@ -18,7 +20,9 @@ generated_cc_atom(
deps = [
":DSLExpression_hdr",
":DSLStatement_hdr",
":SkSLPosition_hdr",
"//include/private:SkSLDefines_hdr",
"//include/private:SkTArray_hdr",
],
)
@ -27,15 +31,13 @@ generated_cc_atom(
hdrs = ["DSLCore.h"],
visibility = ["//:__subpackages__"],
deps = [
":DSLBlock_hdr",
":DSLCase_hdr",
":DSLExpression_hdr",
":DSLFunction_hdr",
":DSLModifiers_hdr",
":DSLStatement_hdr",
":DSLType_hdr",
":DSLVar_hdr",
":DSLWrapper_hdr",
":SkSLErrorReporter_hdr",
":SkSLPosition_hdr",
"//include/private:SkSLDefines_hdr",
"//include/private:SkSLProgramKind_hdr",
"//include/private:SkTArray_hdr",
],
@ -46,9 +48,7 @@ generated_cc_atom(
hdrs = ["DSLExpression.h"],
visibility = ["//:__subpackages__"],
deps = [
":DSLWrapper_hdr",
":SkSLErrorReporter_hdr",
"//include/core:SkTypes_hdr",
":SkSLPosition_hdr",
"//include/private:SkTArray_hdr",
],
)
@ -60,9 +60,13 @@ generated_cc_atom(
deps = [
":DSLBlock_hdr",
":DSLExpression_hdr",
":DSLModifiers_hdr",
":DSLStatement_hdr",
":DSLType_hdr",
":DSLVar_hdr",
":DSLWrapper_hdr",
":SkSLPosition_hdr",
"//include/private:SkSLDefines_hdr",
"//include/private:SkTArray_hdr",
],
)
@ -71,7 +75,7 @@ generated_cc_atom(
hdrs = ["DSLLayout.h"],
visibility = ["//:__subpackages__"],
deps = [
":SkSLErrorReporter_hdr",
":SkSLPosition_hdr",
"//include/private:SkSLLayout_hdr",
],
)
@ -92,7 +96,7 @@ generated_cc_atom(
hdrs = ["DSLRuntimeEffects.h"],
visibility = ["//:__subpackages__"],
deps = [
":DSL_hdr",
"//include/core:SkRefCnt_hdr",
"//include/effects:SkRuntimeEffect_hdr",
],
)
@ -102,8 +106,7 @@ generated_cc_atom(
hdrs = ["DSLStatement.h"],
visibility = ["//:__subpackages__"],
deps = [
":SkSLErrorReporter_hdr",
"//include/core:SkString_hdr",
":SkSLPosition_hdr",
"//include/core:SkTypes_hdr",
"//include/private:SkSLStatement_hdr",
],
@ -115,7 +118,7 @@ generated_cc_atom(
visibility = ["//:__subpackages__"],
deps = [
":DSLExpression_hdr",
"//include/private:SkSLString_hdr",
":SkSLPosition_hdr",
],
)
@ -126,8 +129,8 @@ generated_cc_atom(
deps = [
":DSLExpression_hdr",
":DSLModifiers_hdr",
":SkSLPosition_hdr",
"//include/core:SkSpan_hdr",
"//include/private:SkSLString_hdr",
],
)
@ -139,6 +142,7 @@ generated_cc_atom(
":DSLExpression_hdr",
":DSLModifiers_hdr",
":DSLType_hdr",
":SkSLPosition_hdr",
],
)
@ -152,17 +156,20 @@ generated_cc_atom(
name = "DSL_hdr",
hdrs = ["DSL.h"],
visibility = ["//:__subpackages__"],
deps = [":DSLCore_hdr"],
deps = [
":DSLBlock_hdr",
":DSLCore_hdr",
":DSLExpression_hdr",
":DSLFunction_hdr",
":DSLType_hdr",
],
)
generated_cc_atom(
name = "SkSLErrorReporter_hdr",
hdrs = ["SkSLErrorReporter.h"],
visibility = ["//:__subpackages__"],
deps = [
"//include/core:SkTypes_hdr",
"//include/private:SkSLString_hdr",
],
deps = ["//include/core:SkTypes_hdr"],
)
generated_cc_atom(
@ -171,3 +178,10 @@ generated_cc_atom(
visibility = ["//:__subpackages__"],
deps = ["//include/core:SkRefCnt_hdr"],
)
generated_cc_atom(
name = "SkSLPosition_hdr",
hdrs = ["SkSLPosition.h"],
visibility = ["//:__subpackages__"],
deps = ["//include/core:SkTypes_hdr"],
)

View File

@ -8,7 +8,11 @@
#ifndef SKSL_DSL
#define SKSL_DSL
#include "include/sksl/DSLBlock.h"
#include "include/sksl/DSLCore.h"
#include "include/sksl/DSLExpression.h"
#include "include/sksl/DSLFunction.h"
#include "include/sksl/DSLType.h"
namespace SkSL {

View File

@ -9,10 +9,11 @@
#define SKSL_DSL_BLOCK
#include "include/private/SkSLDefines.h"
#include "include/sksl/DSLExpression.h"
#include "include/private/SkTArray.h"
#include "include/sksl/DSLStatement.h"
#include <memory>
#include <utility>
namespace SkSL {

View File

@ -9,15 +9,15 @@
#define SKSL_DSL_CASE
#include "include/private/SkSLDefines.h"
#include "include/private/SkTArray.h"
#include "include/sksl/DSLExpression.h"
#include "include/sksl/DSLStatement.h"
#include "include/sksl/SkSLPosition.h"
#include <memory>
#include <utility>
namespace SkSL {
class Statement;
namespace dsl {
class DSLCase {

View File

@ -8,26 +8,32 @@
#ifndef SKSL_DSL_CORE
#define SKSL_DSL_CORE
#include "include/private/SkSLDefines.h"
#include "include/private/SkSLProgramKind.h"
#include "include/private/SkTArray.h"
#include "include/sksl/DSLBlock.h"
#include "include/sksl/DSLCase.h"
#include "include/sksl/DSLExpression.h"
#include "include/sksl/DSLFunction.h"
#include "include/sksl/DSLModifiers.h"
#include "include/sksl/DSLStatement.h"
#include "include/sksl/DSLType.h"
#include "include/sksl/DSLVar.h"
#include "include/sksl/DSLWrapper.h"
#include "include/sksl/SkSLErrorReporter.h"
#include "include/sksl/SkSLPosition.h"
#include <memory>
#include <string>
#include <string_view>
#include <utility>
namespace SkSL {
class Compiler;
class ErrorReporter;
struct Program;
struct ProgramSettings;
namespace dsl {
class DSLField;
// When users import the DSL namespace via `using namespace SkSL::dsl`, we want the SwizzleComponent
// Type enum to come into scope as well, so `Swizzle(var, X, Y, ONE)` can work as expected.
// `namespace SkSL::SwizzleComponent` contains only an `enum Type`; this `using namespace` directive

View File

@ -8,10 +8,7 @@
#ifndef SKSL_DSL_EXPRESSION
#define SKSL_DSL_EXPRESSION
#include "include/core/SkTypes.h"
#include "include/private/SkSLDefines.h"
#include "include/private/SkTArray.h"
#include "include/sksl/DSLWrapper.h"
#include "include/sksl/SkSLPosition.h"
#include <cstdint>
@ -27,14 +24,14 @@
namespace SkSL {
class Expression;
class Type;
class ExpressionArray;
namespace dsl {
class DSLPossibleExpression;
class DSLStatement;
class DSLType;
class DSLVarBase;
template <typename T> class DSLWrapper;
/**
* Represents an expression such as 'cos(x)' or 'a + b'.

View File

@ -8,21 +8,26 @@
#ifndef SKSL_DSL_FUNCTION
#define SKSL_DSL_FUNCTION
#include "include/private/SkSLDefines.h"
#include "include/private/SkTArray.h"
#include "include/sksl/DSLBlock.h"
#include "include/sksl/DSLExpression.h"
#include "include/sksl/DSLModifiers.h"
#include "include/sksl/DSLStatement.h"
#include "include/sksl/DSLType.h"
#include "include/sksl/DSLVar.h"
#include "include/sksl/DSLWrapper.h"
#include "include/sksl/SkSLPosition.h"
#include <string_view>
#include <utility>
namespace SkSL {
class Block;
class FunctionDeclaration;
class Variable;
namespace dsl {
class DSLType;
template <typename T> class DSLWrapper;
class DSLFunction {
public:

View File

@ -8,8 +8,6 @@
#ifndef SKSL_DSL_LAYOUT
#define SKSL_DSL_LAYOUT
#include "include/sksl/DSLLayout.h"
#include "include/private/SkSLLayout.h"
#include "include/sksl/SkSLPosition.h"

View File

@ -8,8 +8,8 @@
#ifndef SKSL_DSL_RUNTIME_EFFECTS
#define SKSL_DSL_RUNTIME_EFFECTS
#include "include/core/SkRefCnt.h"
#include "include/effects/SkRuntimeEffect.h"
#include "include/sksl/DSL.h"
namespace SkSL {

View File

@ -8,19 +8,16 @@
#ifndef SKSL_DSL_STATEMENT
#define SKSL_DSL_STATEMENT
#include "include/core/SkString.h"
#include "include/core/SkTypes.h"
#include "include/private/SkSLStatement.h"
#include "include/sksl/SkSLErrorReporter.h"
#include "include/sksl/SkSLPosition.h"
#include <memory>
class GrGLSLShaderBuilder;
#include <utility>
namespace SkSL {
class Expression;
class Statement;
namespace dsl {
@ -28,7 +25,6 @@ class DSLBlock;
class DSLExpression;
class DSLPossibleExpression;
class DSLPossibleStatement;
class DSLVar;
class DSLStatement {
public:

View File

@ -8,8 +8,8 @@
#ifndef SKSL_DSL_SYMBOLS
#define SKSL_DSL_SYMBOLS
#include "include/private/SkSLString.h"
#include "include/sksl/DSLExpression.h"
#include "include/sksl/SkSLPosition.h"
#include <memory>
#include <string_view>
@ -20,7 +20,7 @@ class SymbolTable;
namespace dsl {
class DSLVar;
class DSLVarBase;
// This header provides methods for manually managing symbol tables in DSL code. They should not be
// used by normal hand-written DSL code, where we rely on C++ to manage symbols, but are instead

View File

@ -9,11 +9,13 @@
#define SKSL_DSL_TYPE
#include "include/core/SkSpan.h"
#include "include/private/SkSLString.h"
#include "include/sksl/DSLExpression.h"
#include "include/sksl/DSLModifiers.h"
#include "include/sksl/SkSLPosition.h"
#include <cstdint>
#include <string_view>
#include <utility>
namespace SkSL {
@ -22,7 +24,6 @@ class Type;
namespace dsl {
class DSLExpression;
class DSLField;
class DSLVarBase;

View File

@ -11,12 +11,20 @@
#include "include/sksl/DSLExpression.h"
#include "include/sksl/DSLModifiers.h"
#include "include/sksl/DSLType.h"
#include "include/sksl/SkSLPosition.h"
#include <stdint.h>
#include <memory>
#include <string_view>
#include <utility>
namespace SkSL {
class Expression;
class ExpressionArray;
class IRGenerator;
class SPIRVCodeGenerator;
class Statement;
class Variable;
enum class VariableStorage : int8_t;

View File

@ -9,7 +9,6 @@
#define SKSL_ERROR_REPORTER
#include "include/core/SkTypes.h"
#include "include/private/SkSLString.h"
#include <string>
#include <string_view>

View File

@ -9,8 +9,7 @@
#define SKSL_POSITION
#include "include/core/SkTypes.h"
#include <cinttypes>
#include <string>
#include <string_view>
#ifndef __has_builtin
#define __has_builtin(x) 0

View File

@ -23,6 +23,7 @@ generated_cc_atom(
visibility = ["//:__subpackages__"],
deps = [
"//include/core:SkColor_hdr",
"//include/core:SkPaint_hdr",
"//include/core:SkPoint_hdr",
"//include/core:SkRefCnt_hdr",
"//include/core:SkTypeface_hdr",

View File

@ -3369,6 +3369,7 @@ generated_cc_atom(
"//include/core:SkStream_hdr",
"//include/core:SkTypeface_hdr",
"//include/private:SkTo_hdr",
"//include/private/chromium:GrSlug_hdr",
],
)
@ -3438,6 +3439,7 @@ generated_cc_atom(
":SkFontPriv_hdr",
":SkPaintPriv_hdr",
":SkPictureData_hdr",
":SkPictureFlat_hdr",
":SkPicturePlayback_hdr",
":SkPictureRecord_hdr",
":SkReadBuffer_hdr",
@ -3449,6 +3451,7 @@ generated_cc_atom(
"//include/core:SkTextBlob_hdr",
"//include/core:SkTypes_hdr",
"//include/private:SkTDArray_hdr",
"//include/private/chromium:GrSlug_hdr",
"//src/utils:SkPatchUtils_hdr",
],
)
@ -3494,6 +3497,7 @@ generated_cc_atom(
"//include/core:SkRSXform_hdr",
"//include/core:SkTextBlob_hdr",
"//include/private:SkTo_hdr",
"//include/private/chromium:GrSlug_hdr",
"//src/image:SkImage_Base_hdr",
"//src/utils:SkPatchUtils_hdr",
],
@ -3536,6 +3540,7 @@ generated_cc_atom(
"//include/core:SkPicture_hdr",
"//include/core:SkSerialProcs_hdr",
"//include/private:SkTo_hdr",
"//include/private/chromium:GrSlug_hdr",
],
)
@ -3952,6 +3957,7 @@ generated_cc_atom(
":SkRecordedDrawable_hdr",
"//include/core:SkMatrix_hdr",
"//include/core:SkPictureRecorder_hdr",
"//include/private/chromium:GrSlug_hdr",
],
)
@ -5576,6 +5582,7 @@ generated_cc_atom(
deps = [
"//experimental/graphite/include:Context_hdr",
"//include/core:SkBlendMode_hdr",
"//include/core:SkSamplingOptions_hdr",
"//include/core:SkShader_hdr",
"//include/core:SkTileMode_hdr",
"//include/private:SkColorData_hdr",
@ -5588,12 +5595,15 @@ generated_cc_atom(
visibility = ["//:__subpackages__"],
deps = [
":SkDebugUtils_hdr",
":SkKeyContext_hdr",
":SkKeyHelpers_hdr",
":SkPaintParamsKey_hdr",
":SkPipelineData_hdr",
":SkShaderCodeDictionary_hdr",
":SkUniform_hdr",
"//experimental/graphite/src:TextureProxy_hdr",
"//experimental/graphite/src:UniformManager_hdr",
"//src/gpu:Blend_hdr",
"//src/shaders:SkShaderBase_hdr",
],
)
@ -5692,7 +5702,10 @@ generated_cc_atom(
visibility = ["//:__subpackages__"],
deps = [
":SkUniformData_hdr",
"//experimental/graphite/src:TextureProxy_hdr",
"//include/core:SkRefCnt_hdr",
"//include/core:SkSamplingOptions_hdr",
"//include/core:SkTileMode_hdr",
"//include/private:SkColorData_hdr",
"//src/gpu:Blend_hdr",
],
@ -5707,3 +5720,22 @@ generated_cc_atom(
":SkPipelineData_hdr",
],
)
generated_cc_atom(
name = "SkKeyContext_hdr",
hdrs = ["SkKeyContext.h"],
visibility = ["//:__subpackages__"],
deps = ["//include/gpu:GrTypes_hdr"],
)
generated_cc_atom(
name = "SkKeyContext_src",
srcs = ["SkKeyContext.cpp"],
visibility = ["//:__subpackages__"],
deps = [
":SkKeyContext_hdr",
"//experimental/graphite/src:RecorderPriv_hdr",
"//experimental/graphite/src:ResourceProvider_hdr",
"//include/gpu:GrRecordingContext_hdr",
],
)

View File

@ -3508,13 +3508,6 @@ generated_cc_atom(
],
)
generated_cc_atom(
name = "SkRenderEngineAbortf_hdr",
hdrs = ["SkRenderEngineAbortf.h"],
visibility = ["//:__subpackages__"],
deps = ["//include/core:SkTypes_hdr"],
)
generated_cc_atom(
name = "Swizzle_hdr",
hdrs = ["Swizzle.h"],

View File

@ -139,6 +139,7 @@ generated_cc_atom(
visibility = ["//:__subpackages__"],
deps = [
":GrConvexPolyEffect_hdr",
"//include/sksl:DSL_hdr",
"//src/core:SkPathPriv_hdr",
"//src/gpu:KeyBuilder_hdr",
"//src/gpu/glsl:GrGLSLFragmentShaderBuilder_hdr",
@ -277,6 +278,7 @@ generated_cc_atom(
deps = [
":GrGaussianConvolutionFragmentProcessor_hdr",
":GrTextureEffect_hdr",
"//include/sksl:DSL_hdr",
"//src/core:SkGpuBlurUtils_hdr",
"//src/gpu:GrTextureProxy_hdr",
"//src/gpu:GrTexture_hdr",

View File

@ -7,6 +7,7 @@
#include "src/gpu/effects/GrConvexPolyEffect.h"
#include "include/sksl/DSL.h"
#include "src/core/SkPathPriv.h"
#include "src/gpu/KeyBuilder.h"
#include "src/gpu/glsl/GrGLSLFragmentShaderBuilder.h"

View File

@ -7,6 +7,7 @@
#include "src/gpu/effects/GrGaussianConvolutionFragmentProcessor.h"
#include "include/sksl/DSL.h"
#include "src/core/SkGpuBlurUtils.h"
#include "src/gpu/GrTexture.h"
#include "src/gpu/GrTextureProxy.h"

View File

@ -277,7 +277,6 @@ generated_cc_atom(
"//src/gpu:GrSurfaceProxyPriv_hdr",
"//src/gpu:GrTexture_hdr",
"//src/gpu:GrUtil_hdr",
"//src/gpu:SkRenderEngineAbortf_hdr",
"//src/gpu/gl/builders:GrGLShaderStringBuilder_hdr",
"//src/sksl:SkSLCompiler_hdr",
"//src/utils:SkJSONWriter_hdr",

View File

@ -5,6 +5,7 @@ generated_cc_atom(
hdrs = ["GrGLProgramBuilder.h"],
visibility = ["//:__subpackages__"],
deps = [
"//include/gpu:GrContextOptions_hdr",
"//src/gpu:GrPipeline_hdr",
"//src/gpu/gl:GrGLProgramDataManager_hdr",
"//src/gpu/gl:GrGLProgram_hdr",

View File

@ -8,6 +8,7 @@
#ifndef GrGLProgramBuilder_DEFINED
#define GrGLProgramBuilder_DEFINED
#include "include/gpu/GrContextOptions.h"
#include "src/gpu/GrPipeline.h"
#include "src/gpu/gl/GrGLProgram.h"
#include "src/gpu/gl/GrGLProgramDataManager.h"

View File

@ -81,6 +81,7 @@ generated_cc_atom(
deps = [
":GrGLSLProgramBuilder_hdr",
":GrGLSLVarying_hdr",
"//include/sksl:DSL_hdr",
"//src/gpu:GrCaps_hdr",
"//src/gpu:GrFragmentProcessor_hdr",
"//src/gpu:GrGeometryProcessor_hdr",

View File

@ -9,6 +9,7 @@
#include <memory>
#include "include/sksl/DSL.h"
#include "src/gpu/GrCaps.h"
#include "src/gpu/GrFragmentProcessor.h"
#include "src/gpu/GrGeometryProcessor.h"

View File

@ -121,6 +121,7 @@ generated_cc_atom(
deps = [
":GrMtlUniformHandler_hdr",
":GrMtlVaryingHandler_hdr",
"//include/gpu:GrContextOptions_hdr",
"//src/gpu:GrPipeline_hdr",
"//src/gpu/glsl:GrGLSLProgramBuilder_hdr",
"//src/sksl:SkSLCompiler_hdr",
@ -272,6 +273,7 @@ generated_cc_atom(
visibility = ["//:__subpackages__"],
deps = [
"//include/gpu:GrBackendSurface_hdr",
"//include/gpu:GrContextOptions_hdr",
"//include/private:GrMtlTypesPriv_hdr",
"//include/private:GrTypesPriv_hdr",
"//src/sksl/ir:SkSLProgram_hdr",

View File

@ -8,6 +8,7 @@
#ifndef GrMtlPipelineStateBuilder_DEFINED
#define GrMtlPipelineStateBuilder_DEFINED
#include "include/gpu/GrContextOptions.h"
#include "src/gpu/GrPipeline.h"
#include "src/gpu/glsl/GrGLSLProgramBuilder.h"
#include "src/gpu/mtl/GrMtlUniformHandler.h"

View File

@ -11,6 +11,7 @@
#import <Metal/Metal.h>
#include "include/gpu/GrBackendSurface.h"
#include "include/gpu/GrContextOptions.h"
#include "include/private/GrMtlTypesPriv.h"
#include "include/private/GrTypesPriv.h"
#include "src/sksl/ir/SkSLProgram.h"

View File

@ -96,6 +96,7 @@ generated_cc_atom(
"//include/private:SkShadowFlags_hdr",
"//include/private:SkTo_hdr",
"//include/private/chromium:GrSlug_hdr",
"//include/private/chromium:SkChromeRemoteGlyphCache_hdr",
"//src/core:SkCanvasPriv_hdr",
"//src/core:SkClipStack_hdr",
"//src/core:SkCustomMeshPriv_hdr",

View File

@ -75,6 +75,7 @@ generated_cc_atom(
":GrVkUniformHandler_hdr",
":GrVkUtil_hdr",
"//include/gpu:GrBackendSurface_hdr",
"//include/gpu:GrContextOptions_hdr",
"//include/gpu/vk:GrVkBackendContext_hdr",
"//include/gpu/vk:GrVkExtensions_hdr",
"//src/core:SkCompressedDataUtils_hdr",

View File

@ -10,6 +10,7 @@
#include <memory>
#include "include/gpu/GrBackendSurface.h"
#include "include/gpu/GrContextOptions.h"
#include "include/gpu/vk/GrVkBackendContext.h"
#include "include/gpu/vk/GrVkExtensions.h"
#include "src/core/SkCompressedDataUtils.h"

View File

@ -239,6 +239,14 @@ generated_cc_atom(
visibility = ["//:__subpackages__"],
deps = [
":SkImage_Base_hdr",
"//experimental/graphite/include:GraphiteTypes_hdr",
"//experimental/graphite/include:Recorder_hdr",
"//experimental/graphite/src:Buffer_hdr",
"//experimental/graphite/src:Caps_hdr",
"//experimental/graphite/src:CommandBuffer_hdr",
"//experimental/graphite/src:RecorderPriv_hdr",
"//experimental/graphite/src:TextureProxyView_hdr",
"//experimental/graphite/src:UploadTask_hdr",
"//include/core:SkBitmap_hdr",
"//include/core:SkCanvas_hdr",
"//include/core:SkData_hdr",
@ -386,7 +394,6 @@ generated_cc_atom(
"//src/gpu:GrRecordingContextPriv_hdr",
"//src/gpu:GrRenderTarget_hdr",
"//src/gpu:GrTexture_hdr",
"//src/gpu:SkRenderEngineAbortf_hdr",
],
)

View File

@ -169,11 +169,13 @@ generated_cc_atom(
":SkEmptyShader_hdr",
":SkImageShader_hdr",
":SkTransformShader_hdr",
"//experimental/graphite/src:Image_Graphite_hdr",
"//include/private:SkImageInfoPriv_hdr",
"//src/core:SkArenaAlloc_hdr",
"//src/core:SkColorSpacePriv_hdr",
"//src/core:SkColorSpaceXformSteps_hdr",
"//src/core:SkImagePriv_hdr",
"//src/core:SkKeyContext_hdr",
"//src/core:SkKeyHelpers_hdr",
"//src/core:SkMatrixPriv_hdr",
"//src/core:SkMatrixProvider_hdr",

View File

@ -1,4 +1,6 @@
load("//bazel:macros.bzl", "generated_cc_atom")
load("//bazel:macros.bzl", "enforce_iwyu_on_package", "generated_cc_atom")
enforce_iwyu_on_package()
filegroup(
name = "txts",
@ -31,6 +33,7 @@ cc_library(
":SkSLOperators_src",
":SkSLOutputStream_src",
":SkSLPool_src",
":SkSLPosition_src",
":SkSLRehydrator_src",
":SkSLSampleUsage_src",
":SkSLSharedCompiler_src",
@ -123,11 +126,7 @@ generated_cc_atom(
name = "SkSLAnalysis_hdr",
hdrs = ["SkSLAnalysis.h"],
visibility = ["//:__subpackages__"],
deps = [
"//include/core:SkSpan_hdr",
"//include/private:SkSLDefines_hdr",
"//include/private:SkSLSampleUsage_hdr",
],
deps = ["//include/private:SkSLSampleUsage_hdr"],
)
generated_cc_atom(
@ -136,53 +135,51 @@ generated_cc_atom(
visibility = ["//:__subpackages__"],
deps = [
":SkSLAnalysis_hdr",
":SkSLBuiltinTypes_hdr",
":SkSLCompiler_hdr",
":SkSLConstantFolder_hdr",
"//include/private:SkFloatingPoint_hdr",
":SkSLContext_hdr",
"//include/core:SkSpan_hdr",
"//include/core:SkTypes_hdr",
"//include/private:SkSLDefines_hdr",
"//include/private:SkSLLayout_hdr",
"//include/private:SkSLModifiers_hdr",
"//include/private:SkSLProgramElement_hdr",
"//include/private:SkSLSampleUsage_hdr",
"//include/private:SkSLStatement_hdr",
"//include/private:SkTArray_hdr",
"//include/private:SkTHash_hdr",
"//include/sksl:SkSLErrorReporter_hdr",
"//src/core:SkSafeMath_hdr",
"//include/sksl:SkSLPosition_hdr",
"//src/sksl/analysis:SkSLProgramVisitor_hdr",
"//src/sksl/ir:SkSLBinaryExpression_hdr",
"//src/sksl/ir:SkSLBlock_hdr",
"//src/sksl/ir:SkSLBreakStatement_hdr",
"//src/sksl/ir:SkSLChildCall_hdr",
"//src/sksl/ir:SkSLConstructorDiagonalMatrix_hdr",
"//src/sksl/ir:SkSLConstructorMatrixResize_hdr",
"//src/sksl/ir:SkSLConstructor_hdr",
"//src/sksl/ir:SkSLContinueStatement_hdr",
"//src/sksl/ir:SkSLDiscardStatement_hdr",
"//src/sksl/ir:SkSLDoStatement_hdr",
"//src/sksl/ir:SkSLExpressionStatement_hdr",
"//src/sksl/ir:SkSLExpression_hdr",
"//src/sksl/ir:SkSLExtension_hdr",
"//src/sksl/ir:SkSLExternalFunctionCall_hdr",
"//src/sksl/ir:SkSLExternalFunctionReference_hdr",
"//src/sksl/ir:SkSLFieldAccess_hdr",
"//src/sksl/ir:SkSLForStatement_hdr",
"//src/sksl/ir:SkSLFunctionCall_hdr",
"//src/sksl/ir:SkSLFunctionDeclaration_hdr",
"//src/sksl/ir:SkSLFunctionDefinition_hdr",
"//src/sksl/ir:SkSLFunctionReference_hdr",
"//src/sksl/ir:SkSLIfStatement_hdr",
"//src/sksl/ir:SkSLIndexExpression_hdr",
"//src/sksl/ir:SkSLInlineMarker_hdr",
"//src/sksl/ir:SkSLInterfaceBlock_hdr",
"//src/sksl/ir:SkSLLiteral_hdr",
"//src/sksl/ir:SkSLNop_hdr",
"//src/sksl/ir:SkSLPostfixExpression_hdr",
"//src/sksl/ir:SkSLPrefixExpression_hdr",
"//src/sksl/ir:SkSLProgram_hdr",
"//src/sksl/ir:SkSLReturnStatement_hdr",
"//src/sksl/ir:SkSLSetting_hdr",
"//src/sksl/ir:SkSLSwitchCase_hdr",
"//src/sksl/ir:SkSLSwitchStatement_hdr",
"//src/sksl/ir:SkSLSwizzle_hdr",
"//src/sksl/ir:SkSLTernaryExpression_hdr",
"//src/sksl/ir:SkSLTypeReference_hdr",
"//src/sksl/ir:SkSLType_hdr",
"//src/sksl/ir:SkSLVarDeclarations_hdr",
"//src/sksl/ir:SkSLVariableReference_hdr",
"//src/sksl/ir:SkSLVariable_hdr",
"//src/sksl/transform:SkSLProgramWriter_hdr",
],
)
@ -202,8 +199,6 @@ generated_cc_atom(
":SkSLBuiltinTypes_hdr",
":SkSLCompiler_hdr",
":spirv_hdr",
"//include/private:SkSLModifiers_hdr",
"//src/sksl/ir:SkSLExpression_hdr",
],
)
@ -212,14 +207,18 @@ generated_cc_atom(
hdrs = ["SkSLCompiler.h"],
visibility = ["//:__subpackages__"],
deps = [
":SkSLAnalysis_hdr",
":SkSLContext_hdr",
":SkSLInliner_hdr",
":SkSLMangler_hdr",
":SkSLModifiersPool_hdr",
":SkSLParsedModule_hdr",
"//include/core:SkSize_hdr",
"//src/gpu:GrShaderVar_hdr",
"//include/core:SkTypes_hdr",
"//include/private:SkSLDefines_hdr",
"//include/private:SkSLProgramElement_hdr",
"//include/private:SkSLProgramKind_hdr",
"//include/sksl:SkSLErrorReporter_hdr",
"//include/sksl:SkSLPosition_hdr",
"//src/sksl/ir:SkSLProgram_hdr",
"//src/sksl/ir:SkSLSymbolTable_hdr",
],
)
@ -229,44 +228,47 @@ generated_cc_atom(
textual_hdrs = [":txts"],
visibility = ["//:__subpackages__"],
deps = [
":SkSLAnalysis_hdr",
":SkSLBuiltinMap_hdr",
":SkSLBuiltinTypes_hdr",
":SkSLCompiler_hdr",
":SkSLConstantFolder_hdr",
":SkSLContext_hdr",
":SkSLDSLParser_hdr",
":SkSLOperators_hdr",
":SkSLOutputStream_hdr",
":SkSLProgramSettings_hdr",
":SkSLRehydrator_hdr",
":SkSLStringStream_hdr",
":SkSLThreadContext_hdr",
"//include/gpu:GrContextOptions_hdr",
":SkSLUtil_hdr",
"//include/private:SkSLLayout_hdr",
"//include/private:SkSLModifiers_hdr",
"//include/private:SkSLStatement_hdr",
"//include/private:SkSLSymbol_hdr",
"//include/sksl:DSLCore_hdr",
"//include/sksl:DSLModifiers_hdr",
"//include/sksl:DSLType_hdr",
"//src/core:SkTraceEvent_hdr",
"//src/gpu:GrShaderCaps_hdr",
"//src/sksl/codegen:SkSLGLSLCodeGenerator_hdr",
"//src/sksl/codegen:SkSLMetalCodeGenerator_hdr",
"//src/sksl/codegen:SkSLSPIRVCodeGenerator_hdr",
"//src/sksl/codegen:SkSLSPIRVtoHLSL_hdr",
"//src/sksl/dsl/priv:DSLWriter_hdr",
"//src/sksl/dsl/priv:DSL_priv_hdr",
"//src/sksl/ir:SkSLExpressionStatement_hdr",
"//src/sksl/ir:SkSLExpression_hdr",
"//src/sksl/ir:SkSLExternalFunctionReference_hdr",
"//src/sksl/ir:SkSLExternalFunction_hdr",
"//src/sksl/ir:SkSLFieldAccess_hdr",
"//src/sksl/ir:SkSLField_hdr",
"//src/sksl/ir:SkSLFunctionCall_hdr",
"//src/sksl/ir:SkSLFunctionDeclaration_hdr",
"//src/sksl/ir:SkSLFunctionDefinition_hdr",
"//src/sksl/ir:SkSLFunctionReference_hdr",
"//src/sksl/ir:SkSLInterfaceBlock_hdr",
"//src/sksl/ir:SkSLLiteral_hdr",
"//src/sksl/ir:SkSLModifiersDeclaration_hdr",
"//src/sksl/ir:SkSLNop_hdr",
"//src/sksl/ir:SkSLSymbolTable_hdr",
"//src/sksl/ir:SkSLTernaryExpression_hdr",
"//src/sksl/ir:SkSLTypeReference_hdr",
"//src/sksl/ir:SkSLType_hdr",
"//src/sksl/ir:SkSLUnresolvedFunction_hdr",
"//src/sksl/ir:SkSLVarDeclarations_hdr",
"//src/sksl/transform:SkSLProgramWriter_hdr",
"//src/sksl/ir:SkSLVariableReference_hdr",
"//src/sksl/ir:SkSLVariable_hdr",
"//src/sksl/transform:SkSLTransform_hdr",
"//src/utils:SkBitSet_hdr",
],
)
@ -288,9 +290,11 @@ generated_cc_atom(
":SkSLAnalysis_hdr",
":SkSLConstantFolder_hdr",
":SkSLContext_hdr",
":SkSLProgramSettings_hdr",
":SkSLLexer_hdr",
"//include/core:SkTypes_hdr",
"//include/private:SkSLModifiers_hdr",
"//include/sksl:SkSLErrorReporter_hdr",
"//src/sksl/ir:SkSLBinaryExpression_hdr",
"//include/sksl:SkSLPosition_hdr",
"//src/sksl/ir:SkSLConstructorCompound_hdr",
"//src/sksl/ir:SkSLConstructorSplat_hdr",
"//src/sksl/ir:SkSLConstructor_hdr",
@ -307,11 +311,7 @@ generated_cc_atom(
name = "SkSLContext_hdr",
hdrs = ["SkSLContext.h"],
visibility = ["//:__subpackages__"],
deps = [
":SkSLBuiltinTypes_hdr",
":SkSLUtil_hdr",
"//src/sksl/ir:SkSLType_hdr",
],
deps = [":SkSLBuiltinTypes_hdr"],
)
generated_cc_atom(
@ -321,35 +321,61 @@ generated_cc_atom(
deps = [
":SkSLContext_hdr",
":SkSLPool_hdr",
"//include/core:SkTypes_hdr",
],
)
generated_cc_atom(
name = "SkSLDSLParser_hdr",
hdrs = ["SkSLDSLParser.h"],
enforce_iwyu = True,
visibility = ["//:__subpackages__"],
deps = [
":SkSLCompiler_hdr",
":SkSLLexer_hdr",
":SkSLProgramSettings_hdr",
"//include/core:SkTypes_hdr",
"//include/private:SkSLDefines_hdr",
"//include/private:SkSLProgramKind_hdr",
"//include/private:SkTArray_hdr",
"//include/private:SkTHash_hdr",
"//include/sksl:DSLSymbols_hdr",
"//include/sksl:DSL_hdr",
"//src/sksl/ir:SkSLProgram_hdr",
"//include/sksl:DSLCore_hdr",
"//include/sksl:DSLExpression_hdr",
"//include/sksl:DSLLayout_hdr",
"//include/sksl:DSLModifiers_hdr",
"//include/sksl:DSLStatement_hdr",
"//include/sksl:DSLType_hdr",
"//include/sksl:SkSLErrorReporter_hdr",
"//include/sksl:SkSLPosition_hdr",
],
)
generated_cc_atom(
name = "SkSLDSLParser_src",
srcs = ["SkSLDSLParser.cpp"],
enforce_iwyu = True,
visibility = ["//:__subpackages__"],
deps = [
":SkSLCompiler_hdr",
":SkSLConstantFolder_hdr",
":SkSLDSLParser_hdr",
":SkSLParsedModule_hdr",
":SkSLThreadContext_hdr",
"//include/core:SkSpan_hdr",
"//include/private:SkSLModifiers_hdr",
"//include/private:SkSLProgramElement_hdr",
"//include/private:SkSLString_hdr",
"//include/sksl:DSLBlock_hdr",
"//include/sksl:DSLCase_hdr",
"//include/sksl:DSLFunction_hdr",
"//include/sksl:DSLSymbols_hdr",
"//include/sksl:DSLVar_hdr",
"//include/sksl:DSLWrapper_hdr",
"//include/sksl:DSL_hdr",
"//src/sksl/dsl/priv:DSLWriter_hdr",
"//src/sksl/dsl/priv:DSL_priv_hdr",
"//src/sksl/ir:SkSLExpression_hdr",
"//src/sksl/ir:SkSLProgram_hdr",
],
)
@ -358,12 +384,8 @@ generated_cc_atom(
hdrs = ["SkSLDehydrator.h"],
visibility = ["//:__subpackages__"],
deps = [
":SkSLOutputStream_hdr",
":SkSLStringStream_hdr",
"//include/core:SkSpan_hdr",
"//include/private:SkSLModifiers_hdr",
"//include/private:SkSLSymbol_hdr",
"//include/private:SkTFitsIn_hdr",
"//include/core:SkTypes_hdr",
"//include/private:SkTHash_hdr",
],
)
@ -374,12 +396,20 @@ generated_cc_atom(
visibility = ["//:__subpackages__"],
deps = [
":SkSLDehydrator_hdr",
":SkSLOperators_hdr",
":SkSLOutputStream_hdr",
":SkSLProgramSettings_hdr",
":SkSLRehydrator_hdr",
"//include/core:SkSpan_hdr",
"//include/private:SkSLDefines_hdr",
"//include/private:SkSLLayout_hdr",
"//include/private:SkSLModifiers_hdr",
"//include/private:SkSLProgramElement_hdr",
"//include/private:SkSLStatement_hdr",
"//include/private:SkSLSymbol_hdr",
"//include/private:SkTArray_hdr",
"//src/sksl/ir:SkSLBinaryExpression_hdr",
"//src/sksl/ir:SkSLBreakStatement_hdr",
"//src/sksl/ir:SkSLBlock_hdr",
"//src/sksl/ir:SkSLConstructorArrayCast_hdr",
"//src/sksl/ir:SkSLConstructorArray_hdr",
"//src/sksl/ir:SkSLConstructorCompoundCast_hdr",
@ -389,11 +419,9 @@ generated_cc_atom(
"//src/sksl/ir:SkSLConstructorScalarCast_hdr",
"//src/sksl/ir:SkSLConstructorSplat_hdr",
"//src/sksl/ir:SkSLConstructorStruct_hdr",
"//src/sksl/ir:SkSLConstructor_hdr",
"//src/sksl/ir:SkSLContinueStatement_hdr",
"//src/sksl/ir:SkSLDiscardStatement_hdr",
"//src/sksl/ir:SkSLDoStatement_hdr",
"//src/sksl/ir:SkSLExpressionStatement_hdr",
"//src/sksl/ir:SkSLExpression_hdr",
"//src/sksl/ir:SkSLFieldAccess_hdr",
"//src/sksl/ir:SkSLField_hdr",
"//src/sksl/ir:SkSLForStatement_hdr",
@ -408,6 +436,7 @@ generated_cc_atom(
"//src/sksl/ir:SkSLLiteral_hdr",
"//src/sksl/ir:SkSLPostfixExpression_hdr",
"//src/sksl/ir:SkSLPrefixExpression_hdr",
"//src/sksl/ir:SkSLProgram_hdr",
"//src/sksl/ir:SkSLReturnStatement_hdr",
"//src/sksl/ir:SkSLSetting_hdr",
"//src/sksl/ir:SkSLStructDefinition_hdr",
@ -416,8 +445,10 @@ generated_cc_atom(
"//src/sksl/ir:SkSLSwizzle_hdr",
"//src/sksl/ir:SkSLSymbolTable_hdr",
"//src/sksl/ir:SkSLTernaryExpression_hdr",
"//src/sksl/ir:SkSLType_hdr",
"//src/sksl/ir:SkSLUnresolvedFunction_hdr",
"//src/sksl/ir:SkSLVarDeclarations_hdr",
"//src/sksl/ir:SkSLVariableReference_hdr",
"//src/sksl/ir:SkSLVariable_hdr",
],
)
@ -430,7 +461,7 @@ generated_cc_atom(
":SkSLCompiler_hdr",
"//include/private:SkStringView_hdr",
"//include/sksl:SkSLErrorReporter_hdr",
"//src/sksl/dsl/priv:DSLWriter_hdr",
"//include/sksl:SkSLPosition_hdr",
],
)
@ -455,10 +486,12 @@ generated_cc_atom(
hdrs = ["SkSLInliner.h"],
visibility = ["//:__subpackages__"],
deps = [
":SkSLMangler_hdr",
":SkSLContext_hdr",
":SkSLProgramSettings_hdr",
"//include/private:SkTHash_hdr",
"//src/sksl/ir:SkSLBlock_hdr",
"//src/sksl/ir:SkSLExpression_hdr",
"//src/sksl/ir:SkSLProgram_hdr",
"//src/sksl/ir:SkSLVariableReference_hdr",
],
)
@ -467,11 +500,22 @@ generated_cc_atom(
srcs = ["SkSLInliner.cpp"],
visibility = ["//:__subpackages__"],
deps = [
":SkSLAnalysis_hdr",
":SkSLInliner_hdr",
"//include/private:SkSLLayout_hdr",
":SkSLLexer_hdr",
":SkSLMangler_hdr",
":SkSLOperators_hdr",
"//include/core:SkSpan_hdr",
"//include/core:SkTypes_hdr",
"//include/private:SkSLDefines_hdr",
"//include/private:SkSLModifiers_hdr",
"//include/private:SkSLProgramElement_hdr",
"//include/private:SkSLStatement_hdr",
"//include/private:SkTArray_hdr",
"//include/sksl:SkSLErrorReporter_hdr",
"//include/sksl:SkSLPosition_hdr",
"//src/sksl/analysis:SkSLProgramVisitor_hdr",
"//src/sksl/ir:SkSLBinaryExpression_hdr",
"//src/sksl/ir:SkSLBreakStatement_hdr",
"//src/sksl/ir:SkSLChildCall_hdr",
"//src/sksl/ir:SkSLConstructorArrayCast_hdr",
"//src/sksl/ir:SkSLConstructorArray_hdr",
@ -483,34 +527,28 @@ generated_cc_atom(
"//src/sksl/ir:SkSLConstructorSplat_hdr",
"//src/sksl/ir:SkSLConstructorStruct_hdr",
"//src/sksl/ir:SkSLConstructor_hdr",
"//src/sksl/ir:SkSLContinueStatement_hdr",
"//src/sksl/ir:SkSLDiscardStatement_hdr",
"//src/sksl/ir:SkSLDoStatement_hdr",
"//src/sksl/ir:SkSLExpressionStatement_hdr",
"//src/sksl/ir:SkSLExternalFunctionCall_hdr",
"//src/sksl/ir:SkSLExternalFunctionReference_hdr",
"//src/sksl/ir:SkSLFieldAccess_hdr",
"//src/sksl/ir:SkSLField_hdr",
"//src/sksl/ir:SkSLForStatement_hdr",
"//src/sksl/ir:SkSLFunctionCall_hdr",
"//src/sksl/ir:SkSLFunctionDeclaration_hdr",
"//src/sksl/ir:SkSLFunctionDefinition_hdr",
"//src/sksl/ir:SkSLFunctionReference_hdr",
"//src/sksl/ir:SkSLIfStatement_hdr",
"//src/sksl/ir:SkSLIndexExpression_hdr",
"//src/sksl/ir:SkSLInlineMarker_hdr",
"//src/sksl/ir:SkSLInterfaceBlock_hdr",
"//src/sksl/ir:SkSLLiteral_hdr",
"//src/sksl/ir:SkSLNop_hdr",
"//src/sksl/ir:SkSLPostfixExpression_hdr",
"//src/sksl/ir:SkSLPrefixExpression_hdr",
"//src/sksl/ir:SkSLReturnStatement_hdr",
"//src/sksl/ir:SkSLSetting_hdr",
"//src/sksl/ir:SkSLSwitchCase_hdr",
"//src/sksl/ir:SkSLSwitchStatement_hdr",
"//src/sksl/ir:SkSLSwizzle_hdr",
"//src/sksl/ir:SkSLSymbolTable_hdr",
"//src/sksl/ir:SkSLTernaryExpression_hdr",
"//src/sksl/ir:SkSLUnresolvedFunction_hdr",
"//src/sksl/ir:SkSLType_hdr",
"//src/sksl/ir:SkSLVarDeclarations_hdr",
"//src/sksl/ir:SkSLVariableReference_hdr",
"//src/sksl/ir:SkSLVariable_hdr",
@ -567,7 +605,6 @@ generated_cc_atom(
name = "SkSLMangler_hdr",
hdrs = ["SkSLMangler.h"],
visibility = ["//:__subpackages__"],
deps = ["//include/private:SkSLString_hdr"],
)
generated_cc_atom(
@ -576,6 +613,8 @@ generated_cc_atom(
visibility = ["//:__subpackages__"],
deps = [
":SkSLMangler_hdr",
"//include/core:SkTypes_hdr",
"//include/private:SkSLString_hdr",
"//include/private:SkStringView_hdr",
"//src/sksl/ir:SkSLSymbolTable_hdr",
],
@ -611,7 +650,7 @@ generated_cc_atom(
visibility = ["//:__subpackages__"],
deps = [
":SkSLLexer_hdr",
"//include/private:SkSLDefines_hdr",
"//include/core:SkTypes_hdr",
],
)
@ -620,6 +659,7 @@ generated_cc_atom(
srcs = ["SkSLOperators.cpp"],
visibility = ["//:__subpackages__"],
deps = [
":SkSLBuiltinTypes_hdr",
":SkSLContext_hdr",
":SkSLOperators_hdr",
":SkSLProgramSettings_hdr",
@ -633,10 +673,7 @@ generated_cc_atom(
name = "SkSLOutputStream_hdr",
hdrs = ["SkSLOutputStream.h"],
visibility = ["//:__subpackages__"],
deps = [
"//include/private:SkSLDefines_hdr",
"//include/private:SkSLString_hdr",
],
deps = ["//include/core:SkTypes_hdr"],
)
generated_cc_atom(
@ -665,7 +702,8 @@ generated_cc_atom(
visibility = ["//:__subpackages__"],
deps = [
":SkSLPool_hdr",
"//include/private:SkSLDefines_hdr",
"//include/core:SkTypes_hdr",
"//src/gpu:GrMemoryPool_hdr",
],
)
@ -685,10 +723,12 @@ generated_cc_atom(
visibility = ["//:__subpackages__"],
deps = [
":SkSLContext_hdr",
"//include/core:SkTypes_hdr",
"//include/private:SkSLDefines_hdr",
"//include/private:SkSLLayout_hdr",
"//include/private:SkSLModifiers_hdr",
"//include/private:SkSLSymbol_hdr",
"//src/sksl/ir:SkSLProgram_hdr",
"//src/sksl/ir:SkSLSymbolTable_hdr",
],
)
@ -699,13 +739,22 @@ generated_cc_atom(
deps = [
":SkSLAnalysis_hdr",
":SkSLCompiler_hdr",
":SkSLLexer_hdr",
":SkSLModifiersPool_hdr",
":SkSLParsedModule_hdr",
":SkSLPool_hdr",
":SkSLProgramSettings_hdr",
":SkSLRehydrator_hdr",
":SkSLThreadContext_hdr",
"//include/private:SkSLModifiers_hdr",
"//include/private:SkSLProgramElement_hdr",
"//include/private:SkSLProgramKind_hdr",
"//include/private:SkSLStatement_hdr",
"//include/private:SkTArray_hdr",
"//include/sksl:DSLCore_hdr",
"//include/sksl:SkSLPosition_hdr",
"//src/sksl/ir:SkSLBinaryExpression_hdr",
"//src/sksl/ir:SkSLBlock_hdr",
"//src/sksl/ir:SkSLBreakStatement_hdr",
"//src/sksl/ir:SkSLConstructorArrayCast_hdr",
"//src/sksl/ir:SkSLConstructorArray_hdr",
@ -716,7 +765,6 @@ generated_cc_atom(
"//src/sksl/ir:SkSLConstructorScalarCast_hdr",
"//src/sksl/ir:SkSLConstructorSplat_hdr",
"//src/sksl/ir:SkSLConstructorStruct_hdr",
"//src/sksl/ir:SkSLConstructor_hdr",
"//src/sksl/ir:SkSLContinueStatement_hdr",
"//src/sksl/ir:SkSLDiscardStatement_hdr",
"//src/sksl/ir:SkSLDoStatement_hdr",
@ -737,6 +785,7 @@ generated_cc_atom(
"//src/sksl/ir:SkSLNop_hdr",
"//src/sksl/ir:SkSLPostfixExpression_hdr",
"//src/sksl/ir:SkSLPrefixExpression_hdr",
"//src/sksl/ir:SkSLProgram_hdr",
"//src/sksl/ir:SkSLReturnStatement_hdr",
"//src/sksl/ir:SkSLSetting_hdr",
"//src/sksl/ir:SkSLStructDefinition_hdr",
@ -748,6 +797,7 @@ generated_cc_atom(
"//src/sksl/ir:SkSLType_hdr",
"//src/sksl/ir:SkSLUnresolvedFunction_hdr",
"//src/sksl/ir:SkSLVarDeclarations_hdr",
"//src/sksl/ir:SkSLVariableReference_hdr",
"//src/sksl/ir:SkSLVariable_hdr",
],
)
@ -782,8 +832,14 @@ generated_cc_atom(
hdrs = ["SkSLThreadContext.h"],
visibility = ["//:__subpackages__"],
deps = [
":SkSLContext_hdr",
":SkSLMangler_hdr",
"//include/private:SkSLModifiers_hdr",
":SkSLProgramSettings_hdr",
"//include/core:SkTypes_hdr",
"//include/private:SkSLDefines_hdr",
"//include/private:SkSLProgramKind_hdr",
"//include/sksl:SkSLErrorReporter_hdr",
"//include/sksl:SkSLPosition_hdr",
"//src/gpu:GrFragmentProcessor_hdr",
"//src/sksl/ir:SkSLProgram_hdr",
],
@ -796,10 +852,16 @@ generated_cc_atom(
deps = [
":SkSLBuiltinMap_hdr",
":SkSLCompiler_hdr",
":SkSLModifiersPool_hdr",
":SkSLParsedModule_hdr",
":SkSLPool_hdr",
":SkSLThreadContext_hdr",
":SkSLUtil_hdr",
"//include/private:SkSLProgramElement_hdr",
"//include/sksl:DSLSymbols_hdr",
"//src/gpu/glsl:GrGLSLFragmentShaderBuilder_hdr",
"//src/sksl/ir:SkSLExternalFunction_hdr",
"//src/sksl/ir:SkSLSymbolTable_hdr",
],
)
@ -809,11 +871,7 @@ generated_cc_atom(
visibility = ["//:__subpackages__"],
deps = [
":SkSLGLSL_hdr",
":SkSLLexer_hdr",
"//include/core:SkTypes_hdr",
"//include/gpu:GrContextOptions_hdr",
"//include/private:GrTypesPriv_hdr",
"//include/private:SkSLDefines_hdr",
"//src/core:SkSLTypeShared_hdr",
],
)
@ -823,7 +881,9 @@ generated_cc_atom(
srcs = ["SkSLUtil.cpp"],
visibility = ["//:__subpackages__"],
deps = [
":SkSLBuiltinTypes_hdr",
":SkSLContext_hdr",
":SkSLOutputStream_hdr",
":SkSLStringStream_hdr",
":SkSLUtil_hdr",
"//src/gpu:GrShaderCaps_hdr",
@ -842,7 +902,7 @@ generated_cc_atom(
hdrs = ["SkSLBuiltinMap.h"],
visibility = ["//:__subpackages__"],
deps = [
"//include/private:SkSLString_hdr",
"//include/private:SkSLProgramElement_hdr",
"//include/private:SkTHash_hdr",
],
)
@ -853,8 +913,8 @@ generated_cc_atom(
visibility = ["//:__subpackages__"],
deps = [
":SkSLBuiltinMap_hdr",
"//include/core:SkTypes_hdr",
"//include/private:SkSLProgramElement_hdr",
"//include/private:SkSLString_hdr",
],
)
@ -863,7 +923,7 @@ generated_cc_atom(
hdrs = ["SkSLSharedCompiler.h"],
visibility = ["//:__subpackages__"],
deps = [
":SkSLCompiler_hdr",
"//include/core:SkTypes_hdr",
"//include/private:SkMutex_hdr",
],
)
@ -872,5 +932,19 @@ generated_cc_atom(
name = "SkSLSharedCompiler_src",
srcs = ["SkSLSharedCompiler.cpp"],
visibility = ["//:__subpackages__"],
deps = [":SkSLSharedCompiler_hdr"],
deps = [
":SkSLCompiler_hdr",
":SkSLSharedCompiler_hdr",
":SkSLUtil_hdr",
],
)
generated_cc_atom(
name = "SkSLPosition_src",
srcs = ["SkSLPosition.cpp"],
visibility = ["//:__subpackages__"],
deps = [
":SkSLThreadContext_hdr",
"//include/sksl:SkSLPosition_hdr",
],
)

View File

@ -7,60 +7,56 @@
#include "src/sksl/SkSLAnalysis.h"
#include "include/private/SkFloatingPoint.h"
#include "include/core/SkSpan.h"
#include "include/core/SkTypes.h"
#include "include/private/SkSLDefines.h"
#include "include/private/SkSLLayout.h"
#include "include/private/SkSLModifiers.h"
#include "include/private/SkSLProgramElement.h"
#include "include/private/SkSLSampleUsage.h"
#include "include/private/SkSLStatement.h"
#include "include/private/SkTArray.h"
#include "include/private/SkTHash.h"
#include "include/sksl/SkSLErrorReporter.h"
#include "src/core/SkSafeMath.h"
#include "include/sksl/SkSLPosition.h"
#include "src/sksl/SkSLBuiltinTypes.h"
#include "src/sksl/SkSLCompiler.h"
#include "src/sksl/SkSLConstantFolder.h"
#include "src/sksl/SkSLContext.h"
#include "src/sksl/analysis/SkSLProgramVisitor.h"
#include "src/sksl/ir/SkSLExpression.h"
#include "src/sksl/ir/SkSLProgram.h"
#include "src/sksl/transform/SkSLProgramWriter.h"
// ProgramElements
#include "src/sksl/ir/SkSLExtension.h"
#include "src/sksl/ir/SkSLFunctionDefinition.h"
#include "src/sksl/ir/SkSLInterfaceBlock.h"
#include "src/sksl/ir/SkSLVarDeclarations.h"
// Statements
#include "src/sksl/ir/SkSLBlock.h"
#include "src/sksl/ir/SkSLBreakStatement.h"
#include "src/sksl/ir/SkSLContinueStatement.h"
#include "src/sksl/ir/SkSLDiscardStatement.h"
#include "src/sksl/ir/SkSLDoStatement.h"
#include "src/sksl/ir/SkSLExpressionStatement.h"
#include "src/sksl/ir/SkSLForStatement.h"
#include "src/sksl/ir/SkSLIfStatement.h"
#include "src/sksl/ir/SkSLNop.h"
#include "src/sksl/ir/SkSLReturnStatement.h"
#include "src/sksl/ir/SkSLSwitchStatement.h"
// Expressions
#include "src/sksl/ir/SkSLBinaryExpression.h"
#include "src/sksl/ir/SkSLBlock.h"
#include "src/sksl/ir/SkSLChildCall.h"
#include "src/sksl/ir/SkSLConstructor.h"
#include "src/sksl/ir/SkSLConstructorDiagonalMatrix.h"
#include "src/sksl/ir/SkSLConstructorMatrixResize.h"
#include "src/sksl/ir/SkSLDoStatement.h"
#include "src/sksl/ir/SkSLExpression.h"
#include "src/sksl/ir/SkSLExpressionStatement.h"
#include "src/sksl/ir/SkSLExternalFunctionCall.h"
#include "src/sksl/ir/SkSLExternalFunctionReference.h"
#include "src/sksl/ir/SkSLFieldAccess.h"
#include "src/sksl/ir/SkSLForStatement.h"
#include "src/sksl/ir/SkSLFunctionCall.h"
#include "src/sksl/ir/SkSLFunctionReference.h"
#include "src/sksl/ir/SkSLFunctionDeclaration.h"
#include "src/sksl/ir/SkSLFunctionDefinition.h"
#include "src/sksl/ir/SkSLIfStatement.h"
#include "src/sksl/ir/SkSLIndexExpression.h"
#include "src/sksl/ir/SkSLInlineMarker.h"
#include "src/sksl/ir/SkSLLiteral.h"
#include "src/sksl/ir/SkSLPostfixExpression.h"
#include "src/sksl/ir/SkSLPrefixExpression.h"
#include "src/sksl/ir/SkSLSetting.h"
#include "src/sksl/ir/SkSLProgram.h"
#include "src/sksl/ir/SkSLReturnStatement.h"
#include "src/sksl/ir/SkSLSwitchCase.h"
#include "src/sksl/ir/SkSLSwitchStatement.h"
#include "src/sksl/ir/SkSLSwizzle.h"
#include "src/sksl/ir/SkSLTernaryExpression.h"
#include "src/sksl/ir/SkSLTypeReference.h"
#include "src/sksl/ir/SkSLType.h"
#include "src/sksl/ir/SkSLVarDeclarations.h"
#include "src/sksl/ir/SkSLVariable.h"
#include "src/sksl/ir/SkSLVariableReference.h"
#include "src/sksl/transform/SkSLProgramWriter.h"
#include <optional>
#include <string>
#include <string_view>
namespace SkSL {

View File

@ -8,11 +8,9 @@
#ifndef SkSLAnalysis_DEFINED
#define SkSLAnalysis_DEFINED
#include "include/core/SkSpan.h"
#include "include/private/SkSLDefines.h"
#include "include/private/SkSLSampleUsage.h"
#include "include/sksl/SkSLErrorReporter.h"
#include <stdint.h>
#include <memory>
#include <set>
@ -20,18 +18,18 @@ namespace SkSL {
class ErrorReporter;
class Expression;
class ForStatement;
class FunctionDeclaration;
class FunctionDefinition;
struct LoadedModule;
struct Program;
class Position;
class ProgramElement;
class ProgramUsage;
class Statement;
struct LoopUnrollInfo;
class Variable;
class VariableReference;
enum class VariableRefKind : int8_t;
struct LoadedModule;
struct LoopUnrollInfo;
struct Program;
/**
* Provides utilities for analyzing SkSL statically before it's composed into a full program.

View File

@ -5,10 +5,13 @@
* found in the LICENSE file.
*/
#include "include/private/SkSLProgramElement.h"
#include "include/private/SkSLString.h"
#include "src/sksl/SkSLBuiltinMap.h"
#include "include/core/SkTypes.h"
#include "include/private/SkSLProgramElement.h"
#include <utility>
namespace SkSL {
void BuiltinMap::insertOrDie(std::string key, std::unique_ptr<ProgramElement> element) {

View File

@ -8,15 +8,14 @@
#ifndef SKSL_BUILTINMAP
#define SKSL_BUILTINMAP
#include "include/private/SkSLString.h"
#include "include/private/SkSLProgramElement.h"
#include "include/private/SkTHash.h"
#include <memory>
#include <string>
namespace SkSL {
class ProgramElement;
/**
* Represents the builtin elements in the Context.
*/

View File

@ -7,9 +7,7 @@
#include "src/sksl/SkSLBuiltinTypes.h"
#include "include/private/SkSLModifiers.h"
#include "src/sksl/SkSLCompiler.h"
#include "src/sksl/ir/SkSLExpression.h"
#include "src/sksl/spirv.h"
namespace SkSL {

View File

@ -7,51 +7,52 @@
#include "src/sksl/SkSLCompiler.h"
#include <memory>
#include <unordered_set>
#include "include/private/SkSLLayout.h"
#include "include/private/SkSLModifiers.h"
#include "include/private/SkSLStatement.h"
#include "include/private/SkSLSymbol.h"
#include "include/sksl/DSLCore.h"
#include "include/sksl/DSLModifiers.h"
#include "include/sksl/DSLType.h"
#include "src/core/SkTraceEvent.h"
#include "src/sksl/SkSLAnalysis.h"
#include "src/sksl/SkSLBuiltinMap.h"
#include "src/sksl/SkSLConstantFolder.h"
#include "src/sksl/SkSLBuiltinTypes.h"
#include "src/sksl/SkSLContext.h"
#include "src/sksl/SkSLDSLParser.h"
#include "src/sksl/SkSLOperators.h"
#include "src/sksl/SkSLOutputStream.h"
#include "src/sksl/SkSLProgramSettings.h"
#include "src/sksl/SkSLRehydrator.h"
#include "src/sksl/SkSLStringStream.h"
#include "src/sksl/SkSLThreadContext.h"
#include "src/sksl/SkSLUtil.h"
#include "src/sksl/codegen/SkSLGLSLCodeGenerator.h"
#include "src/sksl/codegen/SkSLMetalCodeGenerator.h"
#include "src/sksl/codegen/SkSLSPIRVCodeGenerator.h"
#include "src/sksl/codegen/SkSLSPIRVtoHLSL.h"
#include "src/sksl/dsl/priv/DSLWriter.h"
#include "src/sksl/dsl/priv/DSL_priv.h"
#include "src/sksl/ir/SkSLExpression.h"
#include "src/sksl/ir/SkSLExpressionStatement.h"
#include "src/sksl/ir/SkSLExternalFunction.h"
#include "src/sksl/ir/SkSLExternalFunctionReference.h"
#include "src/sksl/ir/SkSLField.h"
#include "src/sksl/ir/SkSLFieldAccess.h"
#include "src/sksl/ir/SkSLFunctionCall.h"
#include "src/sksl/ir/SkSLFunctionDeclaration.h"
#include "src/sksl/ir/SkSLFunctionDefinition.h"
#include "src/sksl/ir/SkSLFunctionReference.h"
#include "src/sksl/ir/SkSLInterfaceBlock.h"
#include "src/sksl/ir/SkSLLiteral.h"
#include "src/sksl/ir/SkSLModifiersDeclaration.h"
#include "src/sksl/ir/SkSLNop.h"
#include "src/sksl/ir/SkSLSymbolTable.h"
#include "src/sksl/ir/SkSLTernaryExpression.h"
#include "src/sksl/ir/SkSLType.h"
#include "src/sksl/ir/SkSLTypeReference.h"
#include "src/sksl/ir/SkSLUnresolvedFunction.h"
#include "src/sksl/ir/SkSLVarDeclarations.h"
#include "src/sksl/transform/SkSLProgramWriter.h"
#include "src/sksl/ir/SkSLVariable.h"
#include "src/sksl/ir/SkSLVariableReference.h"
#include "src/sksl/transform/SkSLTransform.h"
#include "src/utils/SkBitSet.h"
#include <fstream>
#if !defined(SKSL_STANDALONE) & SK_SUPPORT_GPU
#include "include/gpu/GrContextOptions.h"
#include "src/gpu/GrShaderCaps.h"
#endif
#include <atomic>
#include <cstdint>
#include <memory>
#include <stdio.h>
#include <utility>
#ifdef SK_ENABLE_SPIRV_VALIDATION
#include "spirv-tools/libspirv.hpp"
@ -59,6 +60,7 @@
#ifdef SKSL_STANDALONE
#define REHYDRATE 0
#include <fstream>
#else
#define REHYDRATE 1
#endif

View File

@ -8,20 +8,26 @@
#ifndef SKSL_COMPILER
#define SKSL_COMPILER
#include <set>
#include <unordered_set>
#include <vector>
#include "include/core/SkSize.h"
#include "src/sksl/SkSLAnalysis.h"
#include "src/sksl/SkSLContext.h"
#include "include/core/SkTypes.h"
#include "include/private/SkSLDefines.h"
#include "include/private/SkSLProgramElement.h"
#include "include/private/SkSLProgramKind.h"
#include "include/sksl/SkSLErrorReporter.h"
#include "include/sksl/SkSLPosition.h"
#include "src/sksl/SkSLInliner.h"
#include "src/sksl/SkSLMangler.h"
#include "src/sksl/SkSLModifiersPool.h"
#include "src/sksl/SkSLParsedModule.h"
#include "src/sksl/ir/SkSLProgram.h"
#include "src/sksl/ir/SkSLSymbolTable.h"
#if !defined(SKSL_STANDALONE) && SK_SUPPORT_GPU
#include "src/gpu/GrShaderVar.h"
#endif
#include <array>
#include <memory>
#include <string>
#include <string_view>
#include <type_traits>
#include <unordered_set>
#include <vector>
#define SK_FRAGCOLOR_BUILTIN 10001
#define SK_LASTFRAGCOLOR_BUILTIN 10008
@ -35,19 +41,19 @@
#define SK_INSTANCEID_BUILTIN 43
#define SK_POSITION_BUILTIN 0
class SkBitSet;
class SkSLCompileBench;
namespace SkSL {
namespace dsl {
class DSLCore;
class DSLWriter;
}
class ExternalFunction;
class FunctionDeclaration;
class ProgramUsage;
class Context;
class Expression;
class IRNode;
class OutputStream;
class SymbolTable;
struct ShaderCaps;
struct LoadedModule {

View File

@ -7,13 +7,13 @@
#include "src/sksl/SkSLConstantFolder.h"
#include <limits>
#include "include/core/SkTypes.h"
#include "include/private/SkSLModifiers.h"
#include "include/sksl/SkSLErrorReporter.h"
#include "include/sksl/SkSLPosition.h"
#include "src/sksl/SkSLAnalysis.h"
#include "src/sksl/SkSLContext.h"
#include "src/sksl/SkSLProgramSettings.h"
#include "src/sksl/ir/SkSLBinaryExpression.h"
#include "src/sksl/SkSLLexer.h"
#include "src/sksl/ir/SkSLConstructor.h"
#include "src/sksl/ir/SkSLConstructorCompound.h"
#include "src/sksl/ir/SkSLConstructorSplat.h"
@ -24,6 +24,12 @@
#include "src/sksl/ir/SkSLVariable.h"
#include "src/sksl/ir/SkSLVariableReference.h"
#include <math.h>
#include <limits>
#include <optional>
#include <type_traits>
#include <utility>
namespace SkSL {
static bool is_vec_or_mat(const Type& type) {

View File

@ -11,13 +11,14 @@
#include <memory>
#include "include/private/SkSLDefines.h"
#include "include/sksl/SkSLErrorReporter.h"
#include "src/sksl/SkSLOperators.h"
namespace SkSL {
class Context;
class Expression;
class Position;
class Type;
/**
* Performs constant folding on IR expressions. This simplifies expressions containing

View File

@ -6,7 +6,11 @@
*/
#include "src/sksl/SkSLContext.h"
#include "include/core/SkTypes.h"
#ifdef SK_DEBUG
#include "src/sksl/SkSLPool.h"
#endif
namespace SkSL {

View File

@ -8,11 +8,7 @@
#ifndef SKSL_CONTEXT
#define SKSL_CONTEXT
#include <memory>
#include "src/sksl/SkSLBuiltinTypes.h"
#include "src/sksl/SkSLUtil.h"
#include "src/sksl/ir/SkSLType.h"
namespace SkSL {
@ -21,6 +17,7 @@ class ErrorReporter;
class Mangler;
class ModifiersPool;
struct ProgramConfig;
struct ShaderCaps;
/**
* Contains compiler-wide objects, which currently means the core types.

View File

@ -7,13 +7,32 @@
#include "src/sksl/SkSLDSLParser.h"
#include "include/core/SkSpan.h"
#include "include/private/SkSLModifiers.h"
#include "include/private/SkSLProgramElement.h"
#include "include/private/SkSLString.h"
#include "include/sksl/DSL.h"
#include "include/sksl/DSLBlock.h"
#include "include/sksl/DSLCase.h"
#include "include/sksl/DSLFunction.h"
#include "include/sksl/DSLSymbols.h"
#include "include/sksl/DSLVar.h"
#include "include/sksl/DSLWrapper.h"
#include "src/sksl/SkSLCompiler.h"
#include "src/sksl/SkSLConstantFolder.h"
#include "src/sksl/SkSLParsedModule.h"
#include "src/sksl/SkSLThreadContext.h"
#include "src/sksl/dsl/priv/DSLWriter.h"
#include "src/sksl/dsl/priv/DSL_priv.h"
#include "src/sksl/ir/SkSLExpression.h"
#include "src/sksl/ir/SkSLProgram.h"
#include <memory>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
using namespace SkSL::dsl;

View File

@ -8,23 +8,41 @@
#ifndef SKSL_DSLPARSER
#define SKSL_DSLPARSER
#include "include/core/SkTypes.h"
#include "include/private/SkSLDefines.h"
#include "include/private/SkSLProgramKind.h"
#include "include/private/SkTArray.h"
#include "include/private/SkTHash.h"
#include "include/sksl/DSL.h"
#include "include/sksl/DSLSymbols.h"
#include "include/sksl/DSLCore.h"
#include "include/sksl/DSLExpression.h"
#include "include/sksl/DSLLayout.h"
#include "include/sksl/DSLModifiers.h"
#include "include/sksl/DSLStatement.h"
#include "include/sksl/DSLType.h"
#include "include/sksl/SkSLErrorReporter.h"
#include "include/sksl/SkSLPosition.h"
#include "src/sksl/SkSLCompiler.h"
#include "src/sksl/SkSLLexer.h"
#include "src/sksl/ir/SkSLProgram.h"
#include "src/sksl/SkSLProgramSettings.h"
#include <memory>
#include <optional>
#include <string>
#include <string_view>
namespace SkSL {
class ErrorReporter;
struct Modifiers;
struct ParsedModule;
class SymbolTable;
struct Program;
namespace dsl {
class DSLBlock;
class DSLCase;
class DSLGlobalVar;
class DSLParameter;
template <typename T> class DSLWrapper;
}
/**
* Consumes .sksl text and invokes DSL functions to instantiate the program.

View File

@ -7,15 +7,20 @@
#include "src/sksl/SkSLDehydrator.h"
#include <map>
#include "include/core/SkSpan.h"
#include "include/private/SkSLDefines.h"
#include "include/private/SkSLLayout.h"
#include "include/private/SkSLModifiers.h"
#include "include/private/SkSLProgramElement.h"
#include "include/private/SkSLStatement.h"
#include "include/private/SkSLSymbol.h"
#include "include/private/SkTArray.h"
#include "src/sksl/SkSLOperators.h"
#include "src/sksl/SkSLOutputStream.h"
#include "src/sksl/SkSLProgramSettings.h"
#include "src/sksl/SkSLRehydrator.h"
#include "src/sksl/ir/SkSLBinaryExpression.h"
#include "src/sksl/ir/SkSLBreakStatement.h"
#include "src/sksl/ir/SkSLConstructor.h"
#include "src/sksl/ir/SkSLBlock.h"
#include "src/sksl/ir/SkSLConstructorArray.h"
#include "src/sksl/ir/SkSLConstructorArrayCast.h"
#include "src/sksl/ir/SkSLConstructorCompound.h"
@ -25,9 +30,8 @@
#include "src/sksl/ir/SkSLConstructorScalarCast.h"
#include "src/sksl/ir/SkSLConstructorSplat.h"
#include "src/sksl/ir/SkSLConstructorStruct.h"
#include "src/sksl/ir/SkSLContinueStatement.h"
#include "src/sksl/ir/SkSLDiscardStatement.h"
#include "src/sksl/ir/SkSLDoStatement.h"
#include "src/sksl/ir/SkSLExpression.h"
#include "src/sksl/ir/SkSLExpressionStatement.h"
#include "src/sksl/ir/SkSLField.h"
#include "src/sksl/ir/SkSLFieldAccess.h"
@ -43,6 +47,7 @@
#include "src/sksl/ir/SkSLLiteral.h"
#include "src/sksl/ir/SkSLPostfixExpression.h"
#include "src/sksl/ir/SkSLPrefixExpression.h"
#include "src/sksl/ir/SkSLProgram.h"
#include "src/sksl/ir/SkSLReturnStatement.h"
#include "src/sksl/ir/SkSLSetting.h"
#include "src/sksl/ir/SkSLStructDefinition.h"
@ -51,9 +56,13 @@
#include "src/sksl/ir/SkSLSwizzle.h"
#include "src/sksl/ir/SkSLSymbolTable.h"
#include "src/sksl/ir/SkSLTernaryExpression.h"
#include "src/sksl/ir/SkSLType.h"
#include "src/sksl/ir/SkSLUnresolvedFunction.h"
#include "src/sksl/ir/SkSLVarDeclarations.h"
#include "src/sksl/ir/SkSLVariable.h"
#include "src/sksl/ir/SkSLVariableReference.h"
#include <map>
namespace SkSL {

View File

@ -8,26 +8,31 @@
#ifndef SKSL_DEHYDRATOR
#define SKSL_DEHYDRATOR
#include "include/core/SkSpan.h"
#include "include/private/SkSLModifiers.h"
#include "include/private/SkSLSymbol.h"
#include "include/private/SkTFitsIn.h"
#include "include/core/SkTypes.h"
#include "include/private/SkTHash.h"
#include "src/sksl/SkSLOutputStream.h"
#include "src/sksl/SkSLStringStream.h"
#include <cstddef>
#include <memory>
#include <string>
#include <string_view>
#include <unordered_map>
#include <utility>
#include <vector>
template <typename T> class SkSpan;
namespace SkSL {
class AnyConstructor;
class Expression;
struct Program;
class OutputStream;
class ProgramElement;
class Statement;
class Symbol;
class SymbolTable;
struct Layout;
struct Modifiers;
struct Program;
/**
* Converts SkSL objects into a binary file. See binary_format.md for a description of the file

View File

@ -10,7 +10,6 @@
#include "include/private/SkStringView.h"
#include "include/sksl/SkSLPosition.h"
#include "src/sksl/SkSLCompiler.h"
#include "src/sksl/dsl/priv/DSLWriter.h"
namespace SkSL {

View File

@ -7,13 +7,21 @@
#include "src/sksl/SkSLInliner.h"
#include <limits.h>
#include <memory>
#include "include/private/SkSLLayout.h"
#include "include/core/SkSpan.h"
#include "include/core/SkTypes.h"
#include "include/private/SkSLDefines.h"
#include "include/private/SkSLModifiers.h"
#include "include/private/SkSLProgramElement.h"
#include "include/private/SkSLStatement.h"
#include "include/private/SkTArray.h"
#include "include/sksl/SkSLErrorReporter.h"
#include "include/sksl/SkSLPosition.h"
#include "src/sksl/SkSLAnalysis.h"
#include "src/sksl/SkSLLexer.h"
#include "src/sksl/SkSLMangler.h"
#include "src/sksl/SkSLOperators.h"
#include "src/sksl/analysis/SkSLProgramVisitor.h"
#include "src/sksl/ir/SkSLBinaryExpression.h"
#include "src/sksl/ir/SkSLBreakStatement.h"
#include "src/sksl/ir/SkSLChildCall.h"
#include "src/sksl/ir/SkSLConstructor.h"
#include "src/sksl/ir/SkSLConstructorArray.h"
@ -25,38 +33,38 @@
#include "src/sksl/ir/SkSLConstructorScalarCast.h"
#include "src/sksl/ir/SkSLConstructorSplat.h"
#include "src/sksl/ir/SkSLConstructorStruct.h"
#include "src/sksl/ir/SkSLContinueStatement.h"
#include "src/sksl/ir/SkSLDiscardStatement.h"
#include "src/sksl/ir/SkSLDoStatement.h"
#include "src/sksl/ir/SkSLExpressionStatement.h"
#include "src/sksl/ir/SkSLExternalFunctionCall.h"
#include "src/sksl/ir/SkSLExternalFunctionReference.h"
#include "src/sksl/ir/SkSLField.h"
#include "src/sksl/ir/SkSLFieldAccess.h"
#include "src/sksl/ir/SkSLForStatement.h"
#include "src/sksl/ir/SkSLFunctionCall.h"
#include "src/sksl/ir/SkSLFunctionDeclaration.h"
#include "src/sksl/ir/SkSLFunctionDefinition.h"
#include "src/sksl/ir/SkSLFunctionReference.h"
#include "src/sksl/ir/SkSLIfStatement.h"
#include "src/sksl/ir/SkSLIndexExpression.h"
#include "src/sksl/ir/SkSLInlineMarker.h"
#include "src/sksl/ir/SkSLInterfaceBlock.h"
#include "src/sksl/ir/SkSLLiteral.h"
#include "src/sksl/ir/SkSLNop.h"
#include "src/sksl/ir/SkSLPostfixExpression.h"
#include "src/sksl/ir/SkSLPrefixExpression.h"
#include "src/sksl/ir/SkSLReturnStatement.h"
#include "src/sksl/ir/SkSLSetting.h"
#include "src/sksl/ir/SkSLSwitchCase.h"
#include "src/sksl/ir/SkSLSwitchStatement.h"
#include "src/sksl/ir/SkSLSwizzle.h"
#include "src/sksl/ir/SkSLSymbolTable.h"
#include "src/sksl/ir/SkSLTernaryExpression.h"
#include "src/sksl/ir/SkSLUnresolvedFunction.h"
#include "src/sksl/ir/SkSLType.h"
#include "src/sksl/ir/SkSLVarDeclarations.h"
#include "src/sksl/ir/SkSLVariable.h"
#include "src/sksl/ir/SkSLVariableReference.h"
#include <limits.h>
#include <algorithm>
#include <memory>
#include <string>
#include <utility>
namespace SkSL {
namespace {

View File

@ -8,26 +8,28 @@
#ifndef SKSL_INLINER
#define SKSL_INLINER
#include <memory>
#include "include/private/SkTHash.h"
#include "src/sksl/SkSLMangler.h"
#include "src/sksl/SkSLContext.h"
#include "src/sksl/SkSLProgramSettings.h"
#include "src/sksl/ir/SkSLBlock.h"
#include "src/sksl/ir/SkSLExpression.h"
#include "src/sksl/ir/SkSLProgram.h"
#include "src/sksl/ir/SkSLVariableReference.h"
#include <memory>
#include <vector>
namespace SkSL {
class Block;
class Context;
class Expression;
class FunctionCall;
class FunctionDeclaration;
class FunctionDefinition;
struct InlineCandidate;
struct InlineCandidateList;
class ModifiersPool;
class Position;
class ProgramElement;
class Statement;
class SymbolTable;
class Variable;
struct InlineCandidate;
struct InlineCandidateList;
/**
* Converts a FunctionCall in the IR to a set of statements to be injected ahead of the function

View File

@ -7,9 +7,13 @@
#include "src/sksl/SkSLMangler.h"
#include "include/core/SkTypes.h"
#include "include/private/SkSLString.h"
#include "include/private/SkStringView.h"
#include "src/sksl/ir/SkSLSymbolTable.h"
#include <ctype.h>
namespace SkSL {
std::string Mangler::uniqueName(std::string_view baseName, SymbolTable* symbolTable) {

View File

@ -8,7 +8,8 @@
#ifndef SKSL_MANGLER
#define SKSL_MANGLER
#include "include/private/SkSLString.h"
#include <string>
#include <string_view>
namespace SkSL {

View File

@ -5,13 +5,18 @@
* found in the LICENSE file.
*/
#include "src/sksl/SkSLOperators.h"
#include "include/core/SkTypes.h"
#include "include/private/SkStringView.h"
#include "src/sksl/SkSLBuiltinTypes.h"
#include "src/sksl/SkSLContext.h"
#include "src/sksl/SkSLOperators.h"
#include "src/sksl/SkSLProgramSettings.h"
#include "src/sksl/ir/SkSLType.h"
#include <memory>
#include <utility>
namespace SkSL {
Operator::Precedence Operator::getBinaryPrecedence() const {

View File

@ -8,7 +8,7 @@
#ifndef SKSL_OPERATORS
#define SKSL_OPERATORS
#include "include/private/SkSLDefines.h"
#include "include/core/SkTypes.h"
#include "src/sksl/SkSLLexer.h"
#include <string_view>

View File

@ -7,6 +7,7 @@
#include "src/sksl/SkSLOutputStream.h"
#include <stdio.h>
#include <memory>
namespace SkSL {

View File

@ -8,8 +8,10 @@
#ifndef SKSL_OUTPUTSTREAM
#define SKSL_OUTPUTSTREAM
#include "include/private/SkSLDefines.h"
#include "include/private/SkSLString.h"
#include "include/core/SkTypes.h"
#include <stdarg.h>
#include <string>
namespace SkSL {

View File

@ -7,7 +7,8 @@
#include "src/sksl/SkSLPool.h"
#include "include/private/SkSLDefines.h"
#include "include/core/SkTypes.h"
#include "src/gpu/GrMemoryPool.h"
#define VLOG(...) // printf(__VA_ARGS__)

View File

@ -8,10 +8,11 @@
#ifndef SKSL_POOL
#define SKSL_POOL
#include <memory>
#include "src/sksl/SkSLMemoryPool.h"
#include <stddef.h>
#include <memory>
namespace SkSL {
/**

View File

@ -7,19 +7,24 @@
#include "src/sksl/SkSLRehydrator.h"
#include <memory>
#include <unordered_set>
#include "include/private/SkSLModifiers.h"
#include "include/private/SkSLProgramElement.h"
#include "include/private/SkSLProgramKind.h"
#include "include/private/SkSLStatement.h"
#include "include/private/SkTArray.h"
#include "include/sksl/DSLCore.h"
#include "include/sksl/SkSLPosition.h"
#include "src/sksl/SkSLAnalysis.h"
#include "src/sksl/SkSLCompiler.h"
#include "src/sksl/SkSLLexer.h"
#include "src/sksl/SkSLModifiersPool.h"
#include "src/sksl/SkSLParsedModule.h"
#include "src/sksl/SkSLPool.h"
#include "src/sksl/SkSLProgramSettings.h"
#include "src/sksl/SkSLThreadContext.h"
#include "src/sksl/ir/SkSLBinaryExpression.h"
#include "src/sksl/ir/SkSLBlock.h"
#include "src/sksl/ir/SkSLBreakStatement.h"
#include "src/sksl/ir/SkSLConstructor.h"
#include "src/sksl/ir/SkSLConstructorArray.h"
#include "src/sksl/ir/SkSLConstructorArrayCast.h"
#include "src/sksl/ir/SkSLConstructorCompound.h"
@ -49,6 +54,7 @@
#include "src/sksl/ir/SkSLNop.h"
#include "src/sksl/ir/SkSLPostfixExpression.h"
#include "src/sksl/ir/SkSLPrefixExpression.h"
#include "src/sksl/ir/SkSLProgram.h"
#include "src/sksl/ir/SkSLReturnStatement.h"
#include "src/sksl/ir/SkSLSetting.h"
#include "src/sksl/ir/SkSLStructDefinition.h"
@ -61,6 +67,13 @@
#include "src/sksl/ir/SkSLUnresolvedFunction.h"
#include "src/sksl/ir/SkSLVarDeclarations.h"
#include "src/sksl/ir/SkSLVariable.h"
#include "src/sksl/ir/SkSLVariableReference.h"
#include <stdio.h>
#include <memory>
#include <string>
#include <type_traits>
#include <utility>
namespace SkSL {

View File

@ -8,24 +8,28 @@
#ifndef SKSL_REHYDRATOR
#define SKSL_REHYDRATOR
#include "include/core/SkTypes.h"
#include "include/private/SkSLDefines.h"
#include "include/private/SkSLLayout.h"
#include "include/private/SkSLModifiers.h"
#include "include/private/SkSLSymbol.h"
#include "src/sksl/SkSLContext.h"
#include "src/sksl/ir/SkSLProgram.h"
#include "src/sksl/ir/SkSLSymbolTable.h"
#include <memory>
#include <string_view>
#include <vector>
namespace SkSL {
class Compiler;
class Context;
class ErrorReporter;
class Expression;
class ModifiersPool;
class ProgramElement;
class Statement;
class SymbolTable;
class Type;
struct Program;
/**
* Interprets a simple bytecode format that encodes the structure of an SkSL IR tree. This is used

View File

@ -8,6 +8,7 @@
#include "include/private/SkSLSampleUsage.h"
#include <algorithm>
#include <string>
namespace SkSL {

View File

@ -9,6 +9,11 @@
#ifdef SK_ENABLE_SKSL
#include "src/sksl/SkSLCompiler.h"
#include "src/sksl/SkSLUtil.h"
#include <memory>
namespace SkSL {
struct SharedCompiler::Impl {
Impl() {

View File

@ -8,13 +8,16 @@
#ifndef SkSLSharedCompiler_DEFINED
#define SkSLSharedCompiler_DEFINED
#include "include/private/SkMutex.h"
#include "src/sksl/SkSLCompiler.h"
#include "include/core/SkTypes.h"
#ifdef SK_ENABLE_SKSL
#include "include/private/SkMutex.h"
namespace SkSL {
class Compiler;
/** A shared compiler instance for runtime client SkSL that is internally guarded by a mutex. */
class SharedCompiler {
public:

View File

@ -6,13 +6,14 @@
*/
#include "include/private/SkSLString.h"
#include <algorithm>
#include <cinttypes>
#include <cmath>
#include <errno.h>
#include <limits.h>
#include <locale>
#include <memory>
#include <sstream>
#include <stdio.h>
#include <stdlib.h>
#include <string>
std::string skstd::to_string(float value) {

View File

@ -7,13 +7,22 @@
#include "src/sksl/SkSLThreadContext.h"
#include "include/private/SkSLProgramElement.h"
#include "include/sksl/DSLSymbols.h"
#include "src/sksl/SkSLBuiltinMap.h"
#include "src/sksl/SkSLCompiler.h"
#include "src/sksl/SkSLModifiersPool.h"
#include "src/sksl/SkSLParsedModule.h"
#include "src/sksl/SkSLPool.h"
#include "src/sksl/SkSLUtil.h"
#include "src/sksl/ir/SkSLExternalFunction.h"
#include "src/sksl/ir/SkSLSymbolTable.h"
#include <type_traits>
#if !defined(SKSL_STANDALONE) && SK_SUPPORT_GPU
#include "src/gpu/glsl/GrGLSLFragmentShaderBuilder.h"
#endif // !defined(SKSL_STANDALONE) && SK_SUPPORT_GPU
#include "src/sksl/SkSLBuiltinMap.h"
#include "src/sksl/SkSLCompiler.h"
#include "src/sksl/ir/SkSLExternalFunction.h"
namespace SkSL {

View File

@ -8,25 +8,36 @@
#ifndef SKSL_THREADCONTEXT
#define SKSL_THREADCONTEXT
#include "include/private/SkSLModifiers.h"
#include "include/core/SkTypes.h"
#include "include/private/SkSLDefines.h"
#include "include/private/SkSLProgramKind.h"
#include "include/sksl/SkSLErrorReporter.h"
#include "include/sksl/SkSLPosition.h"
#include "src/sksl/SkSLContext.h"
#include "src/sksl/SkSLMangler.h"
#include "src/sksl/SkSLProgramSettings.h"
#include "src/sksl/ir/SkSLProgram.h"
#if !defined(SKSL_STANDALONE) && SK_SUPPORT_GPU
#include "src/gpu/GrFragmentProcessor.h"
#endif // !defined(SKSL_STANDALONE) && SK_SUPPORT_GPU
#include <list>
#include <memory>
#include <stack>
#include <string_view>
#include <vector>
#if !defined(SKSL_STANDALONE) && SK_SUPPORT_GPU
#include "src/gpu/GrFragmentProcessor.h"
#endif
namespace SkSL {
class Compiler;
class Context;
struct ParsedModule;
class ModifiersPool;
class Pool;
class ProgramElement;
class SymbolTable;
class Type;
class Variable;
struct Modifiers;
struct ParsedModule;
namespace dsl {

View File

@ -7,14 +7,16 @@
#include "src/sksl/SkSLUtil.h"
#include "src/sksl/SkSLBuiltinTypes.h"
#include "src/sksl/SkSLContext.h"
#include "src/sksl/SkSLOutputStream.h"
#include "src/sksl/SkSLStringStream.h"
#include "src/sksl/ir/SkSLType.h"
#include "src/gpu/GrShaderCaps.h"
#include <string>
#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS
#if !defined(SKSL_STANDALONE) && SK_SUPPORT_GPU
#include "src/gpu/GrShaderCaps.h"
#endif
namespace SkSL {

View File

@ -8,28 +8,19 @@
#ifndef SKSL_UTIL
#define SKSL_UTIL
#include <cstdarg>
#include <memory>
#include <stdlib.h>
#include <string.h>
#include "include/private/SkSLDefines.h"
#include "src/core/SkSLTypeShared.h"
#include "src/sksl/SkSLGLSL.h"
#include "src/sksl/SkSLLexer.h"
#include <memory>
#ifndef SKSL_STANDALONE
#include "include/core/SkTypes.h"
#if SK_SUPPORT_GPU
#include "include/gpu/GrContextOptions.h"
#include "include/private/GrTypesPriv.h"
#endif // SK_SUPPORT_GPU
#endif // SKSL_STANDALONE
namespace SkSL {
class Context;
class OutputStream;
class ShaderCapsFactory;
class StringStream;
class Type;

View File

@ -1,4 +1,6 @@
load("//bazel:macros.bzl", "generated_cc_atom")
load("//bazel:macros.bzl", "enforce_iwyu_on_package", "generated_cc_atom")
enforce_iwyu_on_package()
generated_cc_atom(
name = "SkSLCanExitWithoutReturningValue_src",
@ -6,13 +8,17 @@ generated_cc_atom(
visibility = ["//:__subpackages__"],
deps = [
":SkSLProgramVisitor_hdr",
"//include/private:SkSLDefines_hdr",
"//include/private:SkSLStatement_hdr",
"//include/private:SkTArray_hdr",
"//src/sksl:SkSLAnalysis_hdr",
"//src/sksl/ir:SkSLDoStatement_hdr",
"//src/sksl/ir:SkSLForStatement_hdr",
"//src/sksl/ir:SkSLFunctionDeclaration_hdr",
"//src/sksl/ir:SkSLIfStatement_hdr",
"//src/sksl/ir:SkSLSwitchCase_hdr",
"//src/sksl/ir:SkSLSwitchStatement_hdr",
"//src/sksl/ir:SkSLType_hdr",
],
)
@ -22,15 +28,19 @@ generated_cc_atom(
visibility = ["//:__subpackages__"],
deps = [
":SkSLProgramVisitor_hdr",
"//include/core:SkTypes_hdr",
"//include/private:SkSLProgramElement_hdr",
"//include/private:SkSLStatement_hdr",
"//include/private:SkTHash_hdr",
"//include/sksl:SkSLErrorReporter_hdr",
"//include/sksl:SkSLPosition_hdr",
"//src/core:SkSafeMath_hdr",
"//src/sksl:SkSLAnalysis_hdr",
"//src/sksl:SkSLContext_hdr",
"//src/sksl:SkSLProgramSettings_hdr",
"//src/sksl/ir:SkSLExpression_hdr",
"//src/sksl/ir:SkSLForStatement_hdr",
"//src/sksl/ir:SkSLFunctionCall_hdr",
"//src/sksl/ir:SkSLFunctionDeclaration_hdr",
"//src/sksl/ir:SkSLFunctionDefinition_hdr",
"//src/sksl/ir:SkSLProgram_hdr",
],
@ -41,14 +51,21 @@ generated_cc_atom(
srcs = ["SkSLGetLoopUnrollInfo.cpp"],
visibility = ["//:__subpackages__"],
deps = [
"//include/core:SkTypes_hdr",
"//include/private:SkFloatingPoint_hdr",
"//include/private:SkSLStatement_hdr",
"//include/sksl:SkSLErrorReporter_hdr",
"//include/sksl:SkSLPosition_hdr",
"//src/sksl:SkSLAnalysis_hdr",
"//src/sksl:SkSLConstantFolder_hdr",
"//src/sksl:SkSLLexer_hdr",
"//src/sksl:SkSLOperators_hdr",
"//src/sksl/ir:SkSLBinaryExpression_hdr",
"//src/sksl/ir:SkSLExpression_hdr",
"//src/sksl/ir:SkSLForStatement_hdr",
"//src/sksl/ir:SkSLPostfixExpression_hdr",
"//src/sksl/ir:SkSLPrefixExpression_hdr",
"//src/sksl/ir:SkSLType_hdr",
"//src/sksl/ir:SkSLVarDeclarations_hdr",
"//src/sksl/ir:SkSLVariableReference_hdr",
],
@ -60,13 +77,12 @@ generated_cc_atom(
visibility = ["//:__subpackages__"],
deps = [
":SkSLProgramVisitor_hdr",
"//include/private:SkSLStatement_hdr",
"//include/core:SkTypes_hdr",
"//include/private:SkSLModifiers_hdr",
"//src/sksl:SkSLAnalysis_hdr",
"//src/sksl/ir:SkSLDoStatement_hdr",
"//src/sksl/ir:SkSLForStatement_hdr",
"//src/sksl/ir:SkSLFunctionDeclaration_hdr",
"//src/sksl/ir:SkSLIfStatement_hdr",
"//src/sksl/ir:SkSLSwitchStatement_hdr",
"//src/sksl/ir:SkSLExpression_hdr",
"//src/sksl/ir:SkSLVariableReference_hdr",
"//src/sksl/ir:SkSLVariable_hdr",
],
)
@ -76,8 +92,14 @@ generated_cc_atom(
visibility = ["//:__subpackages__"],
deps = [
":SkSLProgramVisitor_hdr",
"//include/core:SkTypes_hdr",
"//include/private:SkSLModifiers_hdr",
"//include/private:SkSLProgramElement_hdr",
"//include/private:SkSLStatement_hdr",
"//include/private:SkTHash_hdr",
"//src/sksl:SkSLAnalysis_hdr",
"//src/sksl:SkSLCompiler_hdr",
"//src/sksl/ir:SkSLExpression_hdr",
"//src/sksl/ir:SkSLFunctionCall_hdr",
"//src/sksl/ir:SkSLFunctionDeclaration_hdr",
"//src/sksl/ir:SkSLFunctionDefinition_hdr",
@ -85,6 +107,7 @@ generated_cc_atom(
"//src/sksl/ir:SkSLProgram_hdr",
"//src/sksl/ir:SkSLVarDeclarations_hdr",
"//src/sksl/ir:SkSLVariableReference_hdr",
"//src/sksl/ir:SkSLVariable_hdr",
],
)
@ -111,17 +134,24 @@ generated_cc_atom(
visibility = ["//:__subpackages__"],
deps = [
":SkSLProgramVisitor_hdr",
"//include/core:SkTypes_hdr",
"//include/private:SkSLDefines_hdr",
"//include/private:SkSLModifiers_hdr",
"//include/private:SkSLProgramElement_hdr",
"//include/private:SkSLStatement_hdr",
"//include/sksl:SkSLErrorReporter_hdr",
"//src/core:SkSafeMath_hdr",
"//src/sksl:SkSLAnalysis_hdr",
"//src/sksl:SkSLBuiltinTypes_hdr",
"//src/sksl:SkSLContext_hdr",
"//src/sksl:SkSLProgramSettings_hdr",
"//src/sksl/ir:SkSLExpression_hdr",
"//src/sksl/ir:SkSLFunctionCall_hdr",
"//src/sksl/ir:SkSLFunctionDeclaration_hdr",
"//src/sksl/ir:SkSLFunctionDefinition_hdr",
"//src/sksl/ir:SkSLIfStatement_hdr",
"//src/sksl/ir:SkSLProgram_hdr",
"//src/sksl/ir:SkSLSwitchStatement_hdr",
"//src/sksl/ir:SkSLType_hdr",
"//src/sksl/ir:SkSLVarDeclarations_hdr",
"//src/sksl/ir:SkSLVariable_hdr",
],

View File

@ -5,16 +5,23 @@
* found in the LICENSE file.
*/
#include "include/private/SkSLDefines.h"
#include "include/private/SkSLStatement.h"
#include "include/private/SkTArray.h"
#include "src/sksl/SkSLAnalysis.h"
#include "src/sksl/analysis/SkSLProgramVisitor.h"
#include "src/sksl/ir/SkSLDoStatement.h"
#include "src/sksl/ir/SkSLForStatement.h"
#include "src/sksl/ir/SkSLFunctionDeclaration.h"
#include "src/sksl/ir/SkSLIfStatement.h"
#include "src/sksl/ir/SkSLSwitchCase.h"
#include "src/sksl/ir/SkSLSwitchStatement.h"
#include "src/sksl/ir/SkSLType.h"
#include <memory>
namespace SkSL {
class Expression;
namespace {
class ReturnsOnAllPathsVisitor : public ProgramVisitor {

View File

@ -5,20 +5,28 @@
* found in the LICENSE file.
*/
#include "src/sksl/SkSLAnalysis.h"
#include "include/core/SkTypes.h"
#include "include/private/SkSLProgramElement.h"
#include "include/private/SkSLStatement.h"
#include "include/private/SkTHash.h"
#include "include/sksl/SkSLErrorReporter.h"
#include "include/sksl/SkSLPosition.h"
#include "src/core/SkSafeMath.h"
#include "src/sksl/SkSLAnalysis.h"
#include "src/sksl/SkSLContext.h"
#include "src/sksl/SkSLProgramSettings.h"
#include "src/sksl/analysis/SkSLProgramVisitor.h"
#include "src/sksl/ir/SkSLExpression.h"
#include "src/sksl/ir/SkSLForStatement.h"
#include "src/sksl/ir/SkSLFunctionCall.h"
#include "src/sksl/ir/SkSLFunctionDeclaration.h"
#include "src/sksl/ir/SkSLFunctionDefinition.h"
#include "src/sksl/ir/SkSLProgram.h"
#include <cstddef>
#include <memory>
#include <string>
#include <type_traits>
#include <utility>
#include <vector>
namespace SkSL {

View File

@ -5,21 +5,32 @@
* found in the LICENSE file.
*/
#include "include/core/SkTypes.h"
#include "include/private/SkSLDefines.h"
#include "include/private/SkSLModifiers.h"
#include "include/private/SkSLProgramElement.h"
#include "include/private/SkSLStatement.h"
#include "include/sksl/SkSLErrorReporter.h"
#include "src/core/SkSafeMath.h"
#include "src/sksl/SkSLAnalysis.h"
#include "src/sksl/SkSLBuiltinTypes.h"
#include "src/sksl/SkSLContext.h"
#include "src/sksl/SkSLProgramSettings.h"
#include "src/sksl/analysis/SkSLProgramVisitor.h"
#include "src/sksl/ir/SkSLExpression.h"
#include "src/sksl/ir/SkSLFunctionCall.h"
#include "src/sksl/ir/SkSLFunctionDeclaration.h"
#include "src/sksl/ir/SkSLFunctionDefinition.h"
#include "src/sksl/ir/SkSLIfStatement.h"
#include "src/sksl/ir/SkSLProgram.h"
#include "src/sksl/ir/SkSLSwitchStatement.h"
#include "src/sksl/ir/SkSLType.h"
#include "src/sksl/ir/SkSLVarDeclarations.h"
#include "src/sksl/ir/SkSLVariable.h"
#include <memory>
#include <string>
#include <vector>
namespace SkSL {
namespace {

View File

@ -5,14 +5,21 @@
* found in the LICENSE file.
*/
#include "include/core/SkTypes.h"
#include "include/private/SkFloatingPoint.h"
#include "include/private/SkSLStatement.h"
#include "include/sksl/SkSLErrorReporter.h"
#include "include/sksl/SkSLPosition.h"
#include "src/sksl/SkSLAnalysis.h"
#include "src/sksl/SkSLConstantFolder.h"
#include "src/sksl/SkSLLexer.h"
#include "src/sksl/SkSLOperators.h"
#include "src/sksl/ir/SkSLBinaryExpression.h"
#include "src/sksl/ir/SkSLExpression.h"
#include "src/sksl/ir/SkSLForStatement.h"
#include "src/sksl/ir/SkSLPostfixExpression.h"
#include "src/sksl/ir/SkSLPrefixExpression.h"
#include "src/sksl/ir/SkSLType.h"
#include "src/sksl/ir/SkSLVarDeclarations.h"
#include "src/sksl/ir/SkSLVariableReference.h"

View File

@ -5,14 +5,15 @@
* found in the LICENSE file.
*/
#include "include/private/SkSLStatement.h"
#include "include/core/SkTypes.h"
#include "include/private/SkSLModifiers.h"
#include "src/sksl/SkSLAnalysis.h"
#include "src/sksl/analysis/SkSLProgramVisitor.h"
#include "src/sksl/ir/SkSLDoStatement.h"
#include "src/sksl/ir/SkSLForStatement.h"
#include "src/sksl/ir/SkSLFunctionDeclaration.h"
#include "src/sksl/ir/SkSLIfStatement.h"
#include "src/sksl/ir/SkSLSwitchStatement.h"
#include "src/sksl/ir/SkSLExpression.h"
#include "src/sksl/ir/SkSLVariable.h"
#include "src/sksl/ir/SkSLVariableReference.h"
#include <set>
namespace SkSL {

View File

@ -5,17 +5,27 @@
* found in the LICENSE file.
*/
#include "include/core/SkTypes.h"
#include "include/private/SkSLModifiers.h"
#include "include/private/SkSLProgramElement.h"
#include "include/private/SkSLStatement.h"
#include "include/private/SkTHash.h"
#include "src/sksl/SkSLAnalysis.h"
#include "src/sksl/SkSLCompiler.h"
#include "src/sksl/analysis/SkSLProgramVisitor.h"
#include "src/sksl/ir/SkSLExpression.h"
#include "src/sksl/ir/SkSLFunctionCall.h"
#include "src/sksl/ir/SkSLFunctionDeclaration.h"
#include "src/sksl/ir/SkSLFunctionDefinition.h"
#include "src/sksl/ir/SkSLInterfaceBlock.h"
#include "src/sksl/ir/SkSLProgram.h"
#include "src/sksl/ir/SkSLVarDeclarations.h"
#include "src/sksl/ir/SkSLVariable.h"
#include "src/sksl/ir/SkSLVariableReference.h"
#include <memory>
#include <vector>
namespace SkSL {
namespace {

View File

@ -1,4 +1,6 @@
load("//bazel:macros.bzl", "generated_cc_atom")
load("//bazel:macros.bzl", "enforce_iwyu_on_package", "generated_cc_atom")
enforce_iwyu_on_package()
generated_cc_atom(
name = "SkSLCodeGenerator_hdr",
@ -16,6 +18,7 @@ generated_cc_atom(
visibility = ["//:__subpackages__"],
deps = [
":SkSLCodeGenerator_hdr",
"//src/sksl:SkSLContext_hdr",
"//src/sksl:SkSLOperators_hdr",
"//src/sksl:SkSLStringStream_hdr",
],
@ -27,33 +30,60 @@ generated_cc_atom(
visibility = ["//:__subpackages__"],
deps = [
":SkSLGLSLCodeGenerator_hdr",
"//include/private:SkOnce_hdr",
"//include/core:SkSpan_hdr",
"//include/core:SkTypes_hdr",
"//include/private:SkSLDefines_hdr",
"//include/private:SkSLLayout_hdr",
"//include/private:SkSLModifiers_hdr",
"//include/private:SkSLProgramElement_hdr",
"//include/private:SkSLProgramKind_hdr",
"//include/private:SkSLStatement_hdr",
"//include/private:SkSLString_hdr",
"//include/private:SkTArray_hdr",
"//include/sksl:SkSLErrorReporter_hdr",
"//include/sksl:SkSLPosition_hdr",
"//src/sksl:SkSLBuiltinTypes_hdr",
"//src/sksl:SkSLCompiler_hdr",
"//src/sksl:SkSLGLSL_hdr",
"//src/sksl:SkSLLexer_hdr",
"//src/sksl:SkSLOutputStream_hdr",
"//src/sksl:SkSLProgramSettings_hdr",
"//src/sksl:SkSLUtil_hdr",
"//src/sksl:spirv_hdr",
"//src/sksl/ir:SkSLBinaryExpression_hdr",
"//src/sksl/ir:SkSLBlock_hdr",
"//src/sksl/ir:SkSLConstructorArrayCast_hdr",
"//src/sksl/ir:SkSLConstructorDiagonalMatrix_hdr",
"//src/sksl/ir:SkSLConstructor_hdr",
"//src/sksl/ir:SkSLDoStatement_hdr",
"//src/sksl/ir:SkSLExpressionStatement_hdr",
"//src/sksl/ir:SkSLExpression_hdr",
"//src/sksl/ir:SkSLExtension_hdr",
"//src/sksl/ir:SkSLFieldAccess_hdr",
"//src/sksl/ir:SkSLForStatement_hdr",
"//src/sksl/ir:SkSLFunctionCall_hdr",
"//src/sksl/ir:SkSLFunctionDeclaration_hdr",
"//src/sksl/ir:SkSLFunctionDefinition_hdr",
"//src/sksl/ir:SkSLFunctionPrototype_hdr",
"//src/sksl/ir:SkSLIfStatement_hdr",
"//src/sksl/ir:SkSLIndexExpression_hdr",
"//src/sksl/ir:SkSLInterfaceBlock_hdr",
"//src/sksl/ir:SkSLLiteral_hdr",
"//src/sksl/ir:SkSLModifiersDeclaration_hdr",
"//src/sksl/ir:SkSLNop_hdr",
"//src/sksl/ir:SkSLPostfixExpression_hdr",
"//src/sksl/ir:SkSLPrefixExpression_hdr",
"//src/sksl/ir:SkSLProgram_hdr",
"//src/sksl/ir:SkSLReturnStatement_hdr",
"//src/sksl/ir:SkSLSetting_hdr",
"//src/sksl/ir:SkSLStructDefinition_hdr",
"//src/sksl/ir:SkSLSwitchCase_hdr",
"//src/sksl/ir:SkSLSwitchStatement_hdr",
"//src/sksl/ir:SkSLSwizzle_hdr",
"//src/sksl/ir:SkSLTernaryExpression_hdr",
"//src/sksl/ir:SkSLType_hdr",
"//src/sksl/ir:SkSLVarDeclarations_hdr",
"//src/sksl/ir:SkSLVariableReference_hdr",
"//src/sksl/ir:SkSLVariable_hdr",
],
)
@ -63,9 +93,12 @@ generated_cc_atom(
visibility = ["//:__subpackages__"],
deps = [
":SkSLCodeGenerator_hdr",
"//include/private:SkSLDefines_hdr",
"//include/private:SkTArray_hdr",
"//include/private:SkTHash_hdr",
"//src/sksl:SkSLOperators_hdr",
"//src/sksl:SkSLStringStream_hdr",
"//src/sksl/ir:SkSLType_hdr",
],
)
@ -75,21 +108,36 @@ generated_cc_atom(
visibility = ["//:__subpackages__"],
deps = [
":SkSLMetalCodeGenerator_hdr",
"//include/core:SkSpan_hdr",
"//include/core:SkTypes_hdr",
"//include/private:SkSLLayout_hdr",
"//include/private:SkSLModifiers_hdr",
"//include/private:SkSLProgramElement_hdr",
"//include/private:SkSLProgramKind_hdr",
"//include/private:SkSLStatement_hdr",
"//include/private:SkSLString_hdr",
"//include/sksl:SkSLErrorReporter_hdr",
"//include/sksl:SkSLPosition_hdr",
"//src/core:SkScopeExit_hdr",
"//src/sksl:SkSLAnalysis_hdr",
"//src/sksl:SkSLBuiltinTypes_hdr",
"//src/sksl:SkSLCompiler_hdr",
"//src/sksl:SkSLContext_hdr",
"//src/sksl:SkSLLexer_hdr",
"//src/sksl:SkSLMemoryLayout_hdr",
"//src/sksl:SkSLOutputStream_hdr",
"//src/sksl:SkSLProgramSettings_hdr",
"//src/sksl:SkSLUtil_hdr",
"//src/sksl:spirv_hdr",
"//src/sksl/ir:SkSLBinaryExpression_hdr",
"//src/sksl/ir:SkSLBlock_hdr",
"//src/sksl/ir:SkSLConstructorArrayCast_hdr",
"//src/sksl/ir:SkSLConstructorArray_hdr",
"//src/sksl/ir:SkSLConstructorCompoundCast_hdr",
"//src/sksl/ir:SkSLConstructorCompound_hdr",
"//src/sksl/ir:SkSLConstructorDiagonalMatrix_hdr",
"//src/sksl/ir:SkSLConstructorMatrixResize_hdr",
"//src/sksl/ir:SkSLConstructorSplat_hdr",
"//src/sksl/ir:SkSLConstructorStruct_hdr",
"//src/sksl/ir:SkSLConstructor_hdr",
"//src/sksl/ir:SkSLDoStatement_hdr",
"//src/sksl/ir:SkSLExpressionStatement_hdr",
"//src/sksl/ir:SkSLExpression_hdr",
"//src/sksl/ir:SkSLExtension_hdr",
"//src/sksl/ir:SkSLFieldAccess_hdr",
"//src/sksl/ir:SkSLForStatement_hdr",
@ -100,17 +148,22 @@ generated_cc_atom(
"//src/sksl/ir:SkSLIfStatement_hdr",
"//src/sksl/ir:SkSLIndexExpression_hdr",
"//src/sksl/ir:SkSLInterfaceBlock_hdr",
"//src/sksl/ir:SkSLLiteral_hdr",
"//src/sksl/ir:SkSLModifiersDeclaration_hdr",
"//src/sksl/ir:SkSLNop_hdr",
"//src/sksl/ir:SkSLPostfixExpression_hdr",
"//src/sksl/ir:SkSLPrefixExpression_hdr",
"//src/sksl/ir:SkSLProgram_hdr",
"//src/sksl/ir:SkSLReturnStatement_hdr",
"//src/sksl/ir:SkSLSetting_hdr",
"//src/sksl/ir:SkSLStructDefinition_hdr",
"//src/sksl/ir:SkSLSwitchCase_hdr",
"//src/sksl/ir:SkSLSwitchStatement_hdr",
"//src/sksl/ir:SkSLSwizzle_hdr",
"//src/sksl/ir:SkSLTernaryExpression_hdr",
"//src/sksl/ir:SkSLVarDeclarations_hdr",
"//src/sksl/ir:SkSLVariableReference_hdr",
"//src/sksl/ir:SkSLVariable_hdr",
],
)
@ -118,7 +171,7 @@ generated_cc_atom(
name = "SkSLPipelineStageCodeGenerator_hdr",
hdrs = ["SkSLPipelineStageCodeGenerator.h"],
visibility = ["//:__subpackages__"],
deps = ["//include/private:SkSLString_hdr"],
deps = ["//include/core:SkTypes_hdr"],
)
generated_cc_atom(
@ -127,34 +180,48 @@ generated_cc_atom(
visibility = ["//:__subpackages__"],
deps = [
":SkSLPipelineStageCodeGenerator_hdr",
"//include/core:SkSpan_hdr",
"//include/core:SkTypes_hdr",
"//include/private:SkSLDefines_hdr",
"//include/private:SkSLLayout_hdr",
"//include/private:SkSLModifiers_hdr",
"//include/private:SkSLProgramElement_hdr",
"//include/private:SkSLProgramKind_hdr",
"//include/private:SkSLStatement_hdr",
"//include/private:SkSLString_hdr",
"//include/private:SkTArray_hdr",
"//include/private:SkTHash_hdr",
"//src/sksl:SkSLCompiler_hdr",
"//src/sksl:SkSLOperators_hdr",
"//src/sksl:SkSLProgramSettings_hdr",
"//src/sksl:SkSLStringStream_hdr",
"//src/sksl/ir:SkSLBinaryExpression_hdr",
"//src/sksl/ir:SkSLBlock_hdr",
"//src/sksl/ir:SkSLChildCall_hdr",
"//src/sksl/ir:SkSLConstructorArrayCast_hdr",
"//src/sksl/ir:SkSLConstructor_hdr",
"//src/sksl/ir:SkSLDoStatement_hdr",
"//src/sksl/ir:SkSLExpressionStatement_hdr",
"//src/sksl/ir:SkSLExpression_hdr",
"//src/sksl/ir:SkSLFieldAccess_hdr",
"//src/sksl/ir:SkSLForStatement_hdr",
"//src/sksl/ir:SkSLFunctionCall_hdr",
"//src/sksl/ir:SkSLFunctionDeclaration_hdr",
"//src/sksl/ir:SkSLFunctionDefinition_hdr",
"//src/sksl/ir:SkSLFunctionPrototype_hdr",
"//src/sksl/ir:SkSLIfStatement_hdr",
"//src/sksl/ir:SkSLIndexExpression_hdr",
"//src/sksl/ir:SkSLPostfixExpression_hdr",
"//src/sksl/ir:SkSLPrefixExpression_hdr",
"//src/sksl/ir:SkSLProgram_hdr",
"//src/sksl/ir:SkSLReturnStatement_hdr",
"//src/sksl/ir:SkSLStructDefinition_hdr",
"//src/sksl/ir:SkSLSwitchCase_hdr",
"//src/sksl/ir:SkSLSwitchStatement_hdr",
"//src/sksl/ir:SkSLSwizzle_hdr",
"//src/sksl/ir:SkSLTernaryExpression_hdr",
"//src/sksl/ir:SkSLType_hdr",
"//src/sksl/ir:SkSLVarDeclarations_hdr",
"//src/sksl/ir:SkSLVariableReference_hdr",
"//src/sksl/ir:SkSLVariable_hdr",
],
)
@ -164,10 +231,21 @@ generated_cc_atom(
visibility = ["//:__subpackages__"],
deps = [
":SkSLCodeGenerator_hdr",
"//include/private:SkSLDefines_hdr",
"//include/private:SkSLLayout_hdr",
"//include/private:SkSLModifiers_hdr",
"//include/private:SkSLProgramKind_hdr",
"//include/private:SkTHash_hdr",
"//src/core:SkOpts_hdr",
"//src/sksl:SkSLMemoryLayout_hdr",
"//src/sksl:SkSLStringStream_hdr",
"//src/sksl:spirv_hdr",
"//src/sksl/ir:SkSLFunctionDeclaration_hdr",
"//src/sksl/ir:SkSLFunctionDefinition_hdr",
"//src/sksl/ir:SkSLInterfaceBlock_hdr",
"//src/sksl/ir:SkSLSymbolTable_hdr",
"//src/sksl/ir:SkSLType_hdr",
"//src/sksl/ir:SkSLVariable_hdr",
],
)
@ -177,12 +255,30 @@ generated_cc_atom(
visibility = ["//:__subpackages__"],
deps = [
":SkSLSPIRVCodeGenerator_hdr",
"//include/core:SkSpan_hdr",
"//include/core:SkTypes_hdr",
"//include/private:SkSLProgramElement_hdr",
"//include/private:SkSLStatement_hdr",
"//include/private:SkSLSymbol_hdr",
"//include/private:SkTArray_hdr",
"//include/sksl:DSLCore_hdr",
"//src/gpu/vk:GrVkCaps_hdr",
"//include/sksl:DSLExpression_hdr",
"//include/sksl:DSLType_hdr",
"//include/sksl:DSLVar_hdr",
"//include/sksl:SkSLErrorReporter_hdr",
"//include/sksl:SkSLPosition_hdr",
"//src/sksl:GLSL.std.450_hdr",
"//src/sksl:SkSLBuiltinTypes_hdr",
"//src/sksl:SkSLCompiler_hdr",
"//src/sksl:SkSLContext_hdr",
"//src/sksl:SkSLLexer_hdr",
"//src/sksl:SkSLModifiersPool_hdr",
"//src/sksl:SkSLOperators_hdr",
"//src/sksl:SkSLOutputStream_hdr",
"//src/sksl:SkSLPool_hdr",
"//src/sksl:SkSLProgramSettings_hdr",
"//src/sksl:SkSLThreadContext_hdr",
"//src/sksl:SkSLUtil_hdr",
"//src/sksl/ir:SkSLBinaryExpression_hdr",
"//src/sksl/ir:SkSLBlock_hdr",
"//src/sksl/ir:SkSLConstructorArrayCast_hdr",
@ -192,8 +288,10 @@ generated_cc_atom(
"//src/sksl/ir:SkSLConstructorMatrixResize_hdr",
"//src/sksl/ir:SkSLConstructorScalarCast_hdr",
"//src/sksl/ir:SkSLConstructorSplat_hdr",
"//src/sksl/ir:SkSLConstructor_hdr",
"//src/sksl/ir:SkSLDoStatement_hdr",
"//src/sksl/ir:SkSLExpressionStatement_hdr",
"//src/sksl/ir:SkSLExpression_hdr",
"//src/sksl/ir:SkSLExtension_hdr",
"//src/sksl/ir:SkSLFieldAccess_hdr",
"//src/sksl/ir:SkSLField_hdr",
@ -204,9 +302,12 @@ generated_cc_atom(
"//src/sksl/ir:SkSLIfStatement_hdr",
"//src/sksl/ir:SkSLIndexExpression_hdr",
"//src/sksl/ir:SkSLInterfaceBlock_hdr",
"//src/sksl/ir:SkSLLiteral_hdr",
"//src/sksl/ir:SkSLPostfixExpression_hdr",
"//src/sksl/ir:SkSLPrefixExpression_hdr",
"//src/sksl/ir:SkSLProgram_hdr",
"//src/sksl/ir:SkSLReturnStatement_hdr",
"//src/sksl/ir:SkSLSwitchCase_hdr",
"//src/sksl/ir:SkSLSwitchStatement_hdr",
"//src/sksl/ir:SkSLSwizzle_hdr",
"//src/sksl/ir:SkSLTernaryExpression_hdr",
@ -219,7 +320,6 @@ generated_cc_atom(
name = "SkSLSPIRVtoHLSL_hdr",
hdrs = ["SkSLSPIRVtoHLSL.h"],
visibility = ["//:__subpackages__"],
deps = ["//include/private:SkSLString_hdr"],
)
generated_cc_atom(
@ -234,8 +334,6 @@ generated_cc_atom(
hdrs = ["SkSLVMCodeGenerator.h"],
visibility = ["//:__subpackages__"],
deps = [
"//include/core:SkSpan_hdr",
"//include/private:SkSLString_hdr",
"//src/core:SkVM_hdr",
"//src/sksl/ir:SkSLType_hdr",
],
@ -246,31 +344,40 @@ generated_cc_atom(
srcs = ["SkSLVMCodeGenerator.cpp"],
visibility = ["//:__subpackages__"],
deps = [
":SkSLCodeGenerator_hdr",
":SkSLVMCodeGenerator_hdr",
"//include/core:SkBlendMode_hdr",
"//include/core:SkColorType_hdr",
"//include/core:SkColor_hdr",
"//include/core:SkPoint_hdr",
"//include/core:SkSpan_hdr",
"//include/core:SkTypes_hdr",
"//include/private:SkFloatingPoint_hdr",
"//include/private:SkSLDefines_hdr",
"//include/private:SkSLLayout_hdr",
"//include/private:SkSLModifiers_hdr",
"//include/private:SkSLProgramElement_hdr",
"//include/private:SkSLStatement_hdr",
"//include/private:SkSLString_hdr",
"//include/private:SkTArray_hdr",
"//include/private:SkTHash_hdr",
"//include/private:SkTPin_hdr",
"//include/sksl:SkSLPosition_hdr",
"//src/sksl:SkSLCompiler_hdr",
"//src/sksl:SkSLLexer_hdr",
"//src/sksl:SkSLOperators_hdr",
"//src/sksl:SkSLProgramSettings_hdr",
"//src/sksl/ir:SkSLBinaryExpression_hdr",
"//src/sksl/ir:SkSLBlock_hdr",
"//src/sksl/ir:SkSLBreakStatement_hdr",
"//src/sksl/ir:SkSLChildCall_hdr",
"//src/sksl/ir:SkSLConstructorArrayCast_hdr",
"//src/sksl/ir:SkSLConstructorArray_hdr",
"//src/sksl/ir:SkSLConstructorDiagonalMatrix_hdr",
"//src/sksl/ir:SkSLConstructorMatrixResize_hdr",
"//src/sksl/ir:SkSLConstructorSplat_hdr",
"//src/sksl/ir:SkSLConstructorStruct_hdr",
"//src/sksl/ir:SkSLConstructor_hdr",
"//src/sksl/ir:SkSLContinueStatement_hdr",
"//src/sksl/ir:SkSLDoStatement_hdr",
"//src/sksl/ir:SkSLExpressionStatement_hdr",
"//src/sksl/ir:SkSLExpression_hdr",
"//src/sksl/ir:SkSLExternalFunctionCall_hdr",
"//src/sksl/ir:SkSLExternalFunctionReference_hdr",
"//src/sksl/ir:SkSLExternalFunction_hdr",
"//src/sksl/ir:SkSLFieldAccess_hdr",
"//src/sksl/ir:SkSLForStatement_hdr",
"//src/sksl/ir:SkSLFunctionCall_hdr",
@ -281,12 +388,15 @@ generated_cc_atom(
"//src/sksl/ir:SkSLLiteral_hdr",
"//src/sksl/ir:SkSLPostfixExpression_hdr",
"//src/sksl/ir:SkSLPrefixExpression_hdr",
"//src/sksl/ir:SkSLProgram_hdr",
"//src/sksl/ir:SkSLReturnStatement_hdr",
"//src/sksl/ir:SkSLSwitchCase_hdr",
"//src/sksl/ir:SkSLSwitchStatement_hdr",
"//src/sksl/ir:SkSLSwizzle_hdr",
"//src/sksl/ir:SkSLTernaryExpression_hdr",
"//src/sksl/ir:SkSLVarDeclarations_hdr",
"//src/sksl/ir:SkSLVariableReference_hdr",
"//src/sksl/ir:SkSLVariable_hdr",
"//src/sksl/tracing:SkVMDebugTrace_hdr",
],
)

View File

@ -7,38 +7,64 @@
#include "src/sksl/codegen/SkSLGLSLCodeGenerator.h"
#include <memory>
#include "include/core/SkSpan.h"
#include "include/core/SkTypes.h"
#include "include/private/SkSLDefines.h"
#include "include/private/SkSLLayout.h"
#include "include/private/SkSLModifiers.h"
#include "include/private/SkSLProgramElement.h"
#include "include/private/SkSLProgramKind.h"
#include "include/private/SkSLStatement.h"
#include "include/private/SkSLString.h"
#include "include/private/SkTArray.h"
#include "include/sksl/SkSLErrorReporter.h"
#include "include/sksl/SkSLPosition.h"
#include "src/sksl/SkSLBuiltinTypes.h"
#include "src/sksl/SkSLCompiler.h"
#include "src/sksl/SkSLGLSL.h"
#include "src/sksl/SkSLLexer.h"
#include "src/sksl/SkSLOutputStream.h"
#include "src/sksl/SkSLProgramSettings.h"
#include "src/sksl/SkSLUtil.h"
#include "src/sksl/ir/SkSLBinaryExpression.h"
#include "src/sksl/ir/SkSLBlock.h"
#include "src/sksl/ir/SkSLConstructor.h"
#include "src/sksl/ir/SkSLConstructorArrayCast.h"
#include "src/sksl/ir/SkSLConstructorDiagonalMatrix.h"
#include "src/sksl/ir/SkSLDoStatement.h"
#include "src/sksl/ir/SkSLExpression.h"
#include "src/sksl/ir/SkSLExpressionStatement.h"
#include "src/sksl/ir/SkSLExtension.h"
#include "src/sksl/ir/SkSLFieldAccess.h"
#include "src/sksl/ir/SkSLForStatement.h"
#include "src/sksl/ir/SkSLFunctionCall.h"
#include "src/sksl/ir/SkSLFunctionDeclaration.h"
#include "src/sksl/ir/SkSLFunctionDefinition.h"
#include "src/sksl/ir/SkSLFunctionPrototype.h"
#include "src/sksl/ir/SkSLIfStatement.h"
#include "src/sksl/ir/SkSLIndexExpression.h"
#include "src/sksl/ir/SkSLInterfaceBlock.h"
#include "src/sksl/ir/SkSLLiteral.h"
#include "src/sksl/ir/SkSLModifiersDeclaration.h"
#include "src/sksl/ir/SkSLNop.h"
#include "src/sksl/ir/SkSLPostfixExpression.h"
#include "src/sksl/ir/SkSLPrefixExpression.h"
#include "src/sksl/ir/SkSLProgram.h"
#include "src/sksl/ir/SkSLReturnStatement.h"
#include "src/sksl/ir/SkSLSetting.h"
#include "src/sksl/ir/SkSLStructDefinition.h"
#include "src/sksl/ir/SkSLSwitchCase.h"
#include "src/sksl/ir/SkSLSwitchStatement.h"
#include "src/sksl/ir/SkSLSwizzle.h"
#include "src/sksl/ir/SkSLTernaryExpression.h"
#include "src/sksl/ir/SkSLType.h"
#include "src/sksl/ir/SkSLVarDeclarations.h"
#include "src/sksl/ir/SkSLVariable.h"
#include "src/sksl/ir/SkSLVariableReference.h"
#include "src/sksl/spirv.h"
#ifndef SKSL_STANDALONE
#include "include/private/SkOnce.h"
#endif
#include <memory>
#include <type_traits>
#include <vector>
namespace SkSL {

View File

@ -8,19 +8,24 @@
#ifndef SKSL_GLSLCODEGENERATOR
#define SKSL_GLSLCODEGENERATOR
#include "src/sksl/SkSLContext.h"
#include "src/sksl/SkSLOperators.h"
#include "src/sksl/SkSLStringStream.h"
#include "src/sksl/codegen/SkSLCodeGenerator.h"
#include <set>
#include <string>
#include <string_view>
namespace SkSL {
class AnyConstructor;
class BinaryExpression;
class Block;
class ConstructorDiagonalMatrix;
class ConstructorScalarCast;
class DoStatement;
class Expression;
class ExpressionStatement;
class Extension;
class FieldAccess;
class ForStatement;
class FunctionCall;
@ -28,19 +33,28 @@ class FunctionDeclaration;
class FunctionDefinition;
class FunctionPrototype;
class IfStatement;
struct IndexExpression;
class InterfaceBlock;
class Literal;
class OutputStream;
class PostfixExpression;
class PrefixExpression;
class ProgramElement;
class ReturnStatement;
class Setting;
class Statement;
class StructDefinition;
class SwitchStatement;
struct Swizzle;
class TernaryExpression;
class Type;
class VarDeclaration;
class Variable;
class VariableReference;
struct IndexExpression;
struct Layout;
struct Modifiers;
struct Program;
struct ShaderCaps;
struct Swizzle;
/**
* Converts a Program into GLSL code.

View File

@ -7,20 +7,34 @@
#include "src/sksl/codegen/SkSLMetalCodeGenerator.h"
#include "include/core/SkSpan.h"
#include "include/core/SkTypes.h"
#include "include/private/SkSLLayout.h"
#include "include/private/SkSLModifiers.h"
#include "include/private/SkSLProgramElement.h"
#include "include/private/SkSLProgramKind.h"
#include "include/private/SkSLStatement.h"
#include "include/private/SkSLString.h"
#include "include/sksl/SkSLErrorReporter.h"
#include "include/sksl/SkSLPosition.h"
#include "src/core/SkScopeExit.h"
#include "src/sksl/SkSLAnalysis.h"
#include "src/sksl/SkSLBuiltinTypes.h"
#include "src/sksl/SkSLCompiler.h"
#include "src/sksl/SkSLContext.h"
#include "src/sksl/SkSLLexer.h"
#include "src/sksl/SkSLMemoryLayout.h"
#include "src/sksl/SkSLOutputStream.h"
#include "src/sksl/SkSLProgramSettings.h"
#include "src/sksl/SkSLUtil.h"
#include "src/sksl/ir/SkSLBinaryExpression.h"
#include "src/sksl/ir/SkSLBlock.h"
#include "src/sksl/ir/SkSLConstructorArray.h"
#include "src/sksl/ir/SkSLConstructor.h"
#include "src/sksl/ir/SkSLConstructorArrayCast.h"
#include "src/sksl/ir/SkSLConstructorCompound.h"
#include "src/sksl/ir/SkSLConstructorCompoundCast.h"
#include "src/sksl/ir/SkSLConstructorDiagonalMatrix.h"
#include "src/sksl/ir/SkSLConstructorMatrixResize.h"
#include "src/sksl/ir/SkSLConstructorSplat.h"
#include "src/sksl/ir/SkSLConstructorStruct.h"
#include "src/sksl/ir/SkSLDoStatement.h"
#include "src/sksl/ir/SkSLExpression.h"
#include "src/sksl/ir/SkSLExpressionStatement.h"
#include "src/sksl/ir/SkSLExtension.h"
#include "src/sksl/ir/SkSLFieldAccess.h"
@ -32,19 +46,29 @@
#include "src/sksl/ir/SkSLIfStatement.h"
#include "src/sksl/ir/SkSLIndexExpression.h"
#include "src/sksl/ir/SkSLInterfaceBlock.h"
#include "src/sksl/ir/SkSLLiteral.h"
#include "src/sksl/ir/SkSLModifiersDeclaration.h"
#include "src/sksl/ir/SkSLNop.h"
#include "src/sksl/ir/SkSLPostfixExpression.h"
#include "src/sksl/ir/SkSLPrefixExpression.h"
#include "src/sksl/ir/SkSLProgram.h"
#include "src/sksl/ir/SkSLReturnStatement.h"
#include "src/sksl/ir/SkSLSetting.h"
#include "src/sksl/ir/SkSLStructDefinition.h"
#include "src/sksl/ir/SkSLSwitchCase.h"
#include "src/sksl/ir/SkSLSwitchStatement.h"
#include "src/sksl/ir/SkSLSwizzle.h"
#include "src/sksl/ir/SkSLTernaryExpression.h"
#include "src/sksl/ir/SkSLVarDeclarations.h"
#include "src/sksl/ir/SkSLVariable.h"
#include "src/sksl/ir/SkSLVariableReference.h"
#include "src/sksl/spirv.h"
#include <algorithm>
#include <functional>
#include <limits>
#include <memory>
#include <type_traits>
namespace SkSL {

View File

@ -8,19 +8,32 @@
#ifndef SKSL_METALCODEGENERATOR
#define SKSL_METALCODEGENERATOR
#include "include/private/SkSLDefines.h"
#include "include/private/SkTArray.h"
#include "include/private/SkTHash.h"
#include "src/sksl/SkSLOperators.h"
#include "src/sksl/SkSLStringStream.h"
#include "src/sksl/codegen/SkSLCodeGenerator.h"
#include "src/sksl/ir/SkSLType.h"
#include <stdint.h>
#include <initializer_list>
#include <set>
#include <string>
#include <string_view>
#include <vector>
namespace SkSL {
class AnyConstructor;
class BinaryExpression;
class Block;
class ConstructorArrayCast;
class ConstructorCompound;
class ConstructorMatrixResize;
class Context;
class DoStatement;
class Expression;
class ExpressionStatement;
class Extension;
class FieldAccess;
@ -30,20 +43,28 @@ class FunctionDeclaration;
class FunctionDefinition;
class FunctionPrototype;
class IfStatement;
struct IndexExpression;
class InterfaceBlock;
enum IntrinsicKind : int8_t;
class Literal;
class OutputStream;
class Position;
class PostfixExpression;
class PrefixExpression;
class ProgramElement;
class ReturnStatement;
class Setting;
class Statement;
class StructDefinition;
class SwitchStatement;
struct Swizzle;
class TernaryExpression;
class VarDeclaration;
class Variable;
class VariableReference;
enum IntrinsicKind : int8_t;
struct IndexExpression;
struct Layout;
struct Modifiers;
struct Program;
struct Swizzle;
/**
* Converts a Program into Metal code.

View File

@ -7,38 +7,54 @@
#include "src/sksl/codegen/SkSLPipelineStageCodeGenerator.h"
#if defined(SKSL_STANDALONE) || SK_SUPPORT_GPU
#include "include/core/SkSpan.h"
#include "include/core/SkTypes.h"
#include "include/private/SkSLDefines.h"
#include "include/private/SkSLLayout.h"
#include "include/private/SkSLModifiers.h"
#include "include/private/SkSLProgramElement.h"
#include "include/private/SkSLProgramKind.h"
#include "include/private/SkSLStatement.h"
#include "include/private/SkSLString.h"
#include "include/private/SkTArray.h"
#include "include/private/SkTHash.h"
#include "src/sksl/SkSLCompiler.h"
#include "src/sksl/SkSLOperators.h"
#include "src/sksl/SkSLProgramSettings.h"
#include "src/sksl/SkSLStringStream.h"
#include "src/sksl/ir/SkSLBinaryExpression.h"
#include "src/sksl/ir/SkSLBlock.h"
#include "src/sksl/ir/SkSLChildCall.h"
#include "src/sksl/ir/SkSLConstructor.h"
#include "src/sksl/ir/SkSLConstructorArrayCast.h"
#include "src/sksl/ir/SkSLDoStatement.h"
#include "src/sksl/ir/SkSLExpression.h"
#include "src/sksl/ir/SkSLExpressionStatement.h"
#include "src/sksl/ir/SkSLFieldAccess.h"
#include "src/sksl/ir/SkSLForStatement.h"
#include "src/sksl/ir/SkSLFunctionCall.h"
#include "src/sksl/ir/SkSLFunctionDeclaration.h"
#include "src/sksl/ir/SkSLFunctionDefinition.h"
#include "src/sksl/ir/SkSLFunctionPrototype.h"
#include "src/sksl/ir/SkSLIfStatement.h"
#include "src/sksl/ir/SkSLIndexExpression.h"
#include "src/sksl/ir/SkSLPostfixExpression.h"
#include "src/sksl/ir/SkSLPrefixExpression.h"
#include "src/sksl/ir/SkSLProgram.h"
#include "src/sksl/ir/SkSLReturnStatement.h"
#include "src/sksl/ir/SkSLStructDefinition.h"
#include "src/sksl/ir/SkSLSwitchCase.h"
#include "src/sksl/ir/SkSLSwitchStatement.h"
#include "src/sksl/ir/SkSLSwizzle.h"
#include "src/sksl/ir/SkSLTernaryExpression.h"
#include "src/sksl/ir/SkSLType.h"
#include "src/sksl/ir/SkSLVarDeclarations.h"
#include "src/sksl/ir/SkSLVariable.h"
#include "src/sksl/ir/SkSLVariableReference.h"
#include <unordered_map>
#if defined(SKSL_STANDALONE) || SK_SUPPORT_GPU
#include <memory>
#include <string_view>
#include <utility>
#include <vector>
namespace SkSL {
namespace PipelineStage {

View File

@ -8,10 +8,12 @@
#ifndef SKSL_PIPELINESTAGECODEGENERATOR
#define SKSL_PIPELINESTAGECODEGENERATOR
#include "include/private/SkSLString.h"
#include "include/core/SkTypes.h" // IWYU pragma: keep
#if defined(SKSL_STANDALONE) || SK_SUPPORT_GPU
#include <string>
namespace SkSL {
struct Program;

View File

@ -7,14 +7,33 @@
#include "src/sksl/codegen/SkSLSPIRVCodeGenerator.h"
#include "src/sksl/GLSL.std.450.h"
#include "include/core/SkSpan.h"
#include "include/core/SkTypes.h"
#include "include/private/SkSLProgramElement.h"
#include "include/private/SkSLStatement.h"
#include "include/private/SkSLSymbol.h"
#include "include/private/SkTArray.h"
#include "include/sksl/DSLCore.h"
#include "include/sksl/DSLExpression.h"
#include "include/sksl/DSLType.h"
#include "include/sksl/DSLVar.h"
#include "include/sksl/SkSLErrorReporter.h"
#include "include/sksl/SkSLPosition.h"
#include "src/sksl/GLSL.std.450.h"
#include "src/sksl/SkSLBuiltinTypes.h"
#include "src/sksl/SkSLCompiler.h"
#include "src/sksl/SkSLContext.h"
#include "src/sksl/SkSLLexer.h"
#include "src/sksl/SkSLModifiersPool.h"
#include "src/sksl/SkSLOperators.h"
#include "src/sksl/SkSLOutputStream.h"
#include "src/sksl/SkSLPool.h"
#include "src/sksl/SkSLProgramSettings.h"
#include "src/sksl/SkSLThreadContext.h"
#include "src/sksl/SkSLUtil.h"
#include "src/sksl/ir/SkSLBinaryExpression.h"
#include "src/sksl/ir/SkSLBlock.h"
#include "src/sksl/ir/SkSLConstructor.h"
#include "src/sksl/ir/SkSLConstructorArrayCast.h"
#include "src/sksl/ir/SkSLConstructorCompound.h"
#include "src/sksl/ir/SkSLConstructorCompoundCast.h"
@ -23,6 +42,7 @@
#include "src/sksl/ir/SkSLConstructorScalarCast.h"
#include "src/sksl/ir/SkSLConstructorSplat.h"
#include "src/sksl/ir/SkSLDoStatement.h"
#include "src/sksl/ir/SkSLExpression.h"
#include "src/sksl/ir/SkSLExpressionStatement.h"
#include "src/sksl/ir/SkSLExtension.h"
#include "src/sksl/ir/SkSLField.h"
@ -34,18 +54,23 @@
#include "src/sksl/ir/SkSLIfStatement.h"
#include "src/sksl/ir/SkSLIndexExpression.h"
#include "src/sksl/ir/SkSLInterfaceBlock.h"
#include "src/sksl/ir/SkSLLiteral.h"
#include "src/sksl/ir/SkSLPostfixExpression.h"
#include "src/sksl/ir/SkSLPrefixExpression.h"
#include "src/sksl/ir/SkSLProgram.h"
#include "src/sksl/ir/SkSLReturnStatement.h"
#include "src/sksl/ir/SkSLSwitchCase.h"
#include "src/sksl/ir/SkSLSwitchStatement.h"
#include "src/sksl/ir/SkSLSwizzle.h"
#include "src/sksl/ir/SkSLTernaryExpression.h"
#include "src/sksl/ir/SkSLVarDeclarations.h"
#include "src/sksl/ir/SkSLVariableReference.h"
#ifdef SK_VULKAN
#include "src/gpu/vk/GrVkCaps.h"
#endif
#include <cmath>
#include <optional>
#include <set>
#include <type_traits>
#include <utility>
#define kLast_Capability SpvCapabilityMultiViewport

View File

@ -8,16 +8,33 @@
#ifndef SKSL_SPIRVCODEGENERATOR
#define SKSL_SPIRVCODEGENERATOR
#include <stack>
#include "include/private/SkSLDefines.h"
#include "include/private/SkSLLayout.h"
#include "include/private/SkSLModifiers.h"
#include "include/private/SkSLProgramKind.h"
#include "include/private/SkTHash.h"
#include "src/core/SkOpts.h"
#include "src/sksl/SkSLMemoryLayout.h"
#include "src/sksl/SkSLStringStream.h"
#include "src/sksl/codegen/SkSLCodeGenerator.h"
#include "src/sksl/ir/SkSLFunctionDeclaration.h"
#include "src/sksl/ir/SkSLFunctionDefinition.h"
#include "src/sksl/ir/SkSLInterfaceBlock.h"
#include "src/sksl/ir/SkSLSymbolTable.h"
#include "src/sksl/ir/SkSLType.h"
#include "src/sksl/ir/SkSLVariable.h"
#include "src/sksl/spirv.h"
#include <stdint.h>
#include <memory>
#include <stack>
#include <string>
#include <string_view>
#include <vector>
namespace SkSL {
class AnyConstructor;
class BinaryExpression;
class Block;
class ConstructorCompound;
@ -26,29 +43,30 @@ class ConstructorDiagonalMatrix;
class ConstructorMatrixResize;
class ConstructorScalarCast;
class ConstructorSplat;
class Context;
class DoStatement;
class Expression;
class FieldAccess;
class ForStatement;
class FunctionCall;
class FunctionDeclaration;
class FunctionDefinition;
class FunctionPrototype;
class IfStatement;
struct IndexExpression;
class InterfaceBlock;
enum IntrinsicKind : int8_t;
class Literal;
class Operator;
class OutputStream;
class Position;
class PostfixExpression;
class PrefixExpression;
class ProgramElement;
class ReturnStatement;
class Setting;
class StructDefinition;
class Statement;
class SwitchStatement;
struct Swizzle;
class TernaryExpression;
class VarDeclaration;
class VariableReference;
enum IntrinsicKind : int8_t;
struct IndexExpression;
struct Program;
struct Swizzle;
struct SPIRVNumberConstant {
bool operator==(const SPIRVNumberConstant& that) const {

View File

@ -8,7 +8,7 @@
#ifndef SKSL_SPIRVTOHLSL
#define SKSL_SPIRVTOHLSL
#include "include/private/SkSLString.h"
#include <string>
namespace SkSL {

View File

@ -5,31 +5,41 @@
* found in the LICENSE file.
*/
#include "src/sksl/codegen/SkSLVMCodeGenerator.h"
#include "include/core/SkBlendMode.h"
#include "include/core/SkColor.h"
#include "include/core/SkColorType.h"
#include "include/core/SkPoint.h"
#include "include/core/SkSpan.h"
#include "include/core/SkTypes.h"
#include "include/private/SkFloatingPoint.h"
#include "include/private/SkSLDefines.h"
#include "include/private/SkSLLayout.h"
#include "include/private/SkSLModifiers.h"
#include "include/private/SkSLProgramElement.h"
#include "include/private/SkSLStatement.h"
#include "include/private/SkSLString.h"
#include "include/private/SkTArray.h"
#include "include/private/SkTHash.h"
#include "include/private/SkTPin.h"
#include "include/sksl/SkSLPosition.h"
#include "src/sksl/SkSLCompiler.h"
#include "src/sksl/SkSLLexer.h"
#include "src/sksl/SkSLOperators.h"
#include "src/sksl/codegen/SkSLCodeGenerator.h"
#include "src/sksl/codegen/SkSLVMCodeGenerator.h"
#include "src/sksl/SkSLProgramSettings.h"
#include "src/sksl/ir/SkSLBinaryExpression.h"
#include "src/sksl/ir/SkSLBlock.h"
#include "src/sksl/ir/SkSLBreakStatement.h"
#include "src/sksl/ir/SkSLChildCall.h"
#include "src/sksl/ir/SkSLConstructor.h"
#include "src/sksl/ir/SkSLConstructorArray.h"
#include "src/sksl/ir/SkSLConstructorArrayCast.h"
#include "src/sksl/ir/SkSLConstructorDiagonalMatrix.h"
#include "src/sksl/ir/SkSLConstructorMatrixResize.h"
#include "src/sksl/ir/SkSLConstructorSplat.h"
#include "src/sksl/ir/SkSLConstructorStruct.h"
#include "src/sksl/ir/SkSLContinueStatement.h"
#include "src/sksl/ir/SkSLDoStatement.h"
#include "src/sksl/ir/SkSLExpression.h"
#include "src/sksl/ir/SkSLExpressionStatement.h"
#include "src/sksl/ir/SkSLExternalFunction.h"
#include "src/sksl/ir/SkSLExternalFunctionCall.h"
#include "src/sksl/ir/SkSLExternalFunctionReference.h"
#include "src/sksl/ir/SkSLFieldAccess.h"
#include "src/sksl/ir/SkSLForStatement.h"
#include "src/sksl/ir/SkSLFunctionCall.h"
@ -40,15 +50,22 @@
#include "src/sksl/ir/SkSLLiteral.h"
#include "src/sksl/ir/SkSLPostfixExpression.h"
#include "src/sksl/ir/SkSLPrefixExpression.h"
#include "src/sksl/ir/SkSLProgram.h"
#include "src/sksl/ir/SkSLReturnStatement.h"
#include "src/sksl/ir/SkSLSwitchCase.h"
#include "src/sksl/ir/SkSLSwitchStatement.h"
#include "src/sksl/ir/SkSLSwizzle.h"
#include "src/sksl/ir/SkSLTernaryExpression.h"
#include "src/sksl/ir/SkSLVarDeclarations.h"
#include "src/sksl/ir/SkSLVariable.h"
#include "src/sksl/ir/SkSLVariableReference.h"
#include "src/sksl/tracing/SkVMDebugTrace.h"
#include <algorithm>
#include <cstddef>
#include <functional>
#include <string_view>
#include <utility>
namespace {
// sksl allows the optimizations of fast_mul(), so we want to use that most of the time.
@ -93,6 +110,7 @@ namespace {
} // namespace
namespace SkSL {
class IRNode;
namespace {

View File

@ -8,12 +8,14 @@
#ifndef SKSL_VMGENERATOR
#define SKSL_VMGENERATOR
#include "include/core/SkSpan.h"
#include "include/private/SkSLString.h"
#include "src/core/SkVM.h"
#include "src/sksl/ir/SkSLType.h"
#include <functional>
#include <memory>
#include <string>
#include <vector>
template <typename T> class SkSpan;
namespace SkSL {

View File

@ -1,4 +1,6 @@
load("//bazel:macros.bzl", "generated_cc_atom")
load("//bazel:macros.bzl", "enforce_iwyu_on_package", "generated_cc_atom")
enforce_iwyu_on_package()
generated_cc_atom(
name = "DSLBlock_src",
@ -7,6 +9,7 @@ generated_cc_atom(
deps = [
"//include/sksl:DSLBlock_hdr",
"//include/sksl:DSLStatement_hdr",
"//include/sksl:SkSLPosition_hdr",
"//src/sksl/ir:SkSLBlock_hdr",
],
)
@ -15,10 +18,7 @@ generated_cc_atom(
name = "DSLCase_src",
srcs = ["DSLCase.cpp"],
visibility = ["//:__subpackages__"],
deps = [
"//include/private:SkSLStatement_hdr",
"//include/sksl:DSLCase_hdr",
],
deps = ["//include/sksl:DSLCase_hdr"],
)
generated_cc_atom(
@ -26,11 +26,22 @@ generated_cc_atom(
srcs = ["DSLCore.cpp"],
visibility = ["//:__subpackages__"],
deps = [
"//include/core:SkTypes_hdr",
"//include/private:SkSLDefines_hdr",
"//include/private:SkSLProgramElement_hdr",
"//include/private:SkSLStatement_hdr",
"//include/private:SkSLSymbol_hdr",
"//include/sksl:DSLCore_hdr",
"//include/sksl:DSLSymbols_hdr",
"//include/sksl:DSLType_hdr",
"//include/sksl:DSLVar_hdr",
"//include/sksl:SkSLErrorReporter_hdr",
"//src/sksl:SkSLBuiltinTypes_hdr",
"//src/sksl:SkSLCompiler_hdr",
"//src/sksl:SkSLContext_hdr",
"//src/sksl:SkSLParsedModule_hdr",
"//src/sksl:SkSLPool_hdr",
"//src/sksl:SkSLProgramSettings_hdr",
"//src/sksl:SkSLThreadContext_hdr",
"//src/sksl/dsl/priv:DSLWriter_hdr",
"//src/sksl/ir:SkSLBlock_hdr",
@ -45,11 +56,15 @@ generated_cc_atom(
"//src/sksl/ir:SkSLIfStatement_hdr",
"//src/sksl/ir:SkSLInterfaceBlock_hdr",
"//src/sksl/ir:SkSLModifiersDeclaration_hdr",
"//src/sksl/ir:SkSLProgram_hdr",
"//src/sksl/ir:SkSLReturnStatement_hdr",
"//src/sksl/ir:SkSLStructDefinition_hdr",
"//src/sksl/ir:SkSLSwitchStatement_hdr",
"//src/sksl/ir:SkSLSwizzle_hdr",
"//src/sksl/ir:SkSLSymbolTable_hdr",
"//src/sksl/ir:SkSLTernaryExpression_hdr",
"//src/sksl/ir:SkSLType_hdr",
"//src/sksl/ir:SkSLVarDeclarations_hdr",
"//src/sksl/ir:SkSLVariable_hdr",
"//src/sksl/transform:SkSLTransform_hdr",
],
)
@ -59,14 +74,21 @@ generated_cc_atom(
srcs = ["DSLExpression.cpp"],
visibility = ["//:__subpackages__"],
deps = [
"//include/core:SkTypes_hdr",
"//include/private:SkSLDefines_hdr",
"//include/sksl:DSLCore_hdr",
"//include/sksl:DSLExpression_hdr",
"//include/sksl:DSLStatement_hdr",
"//include/sksl:DSLType_hdr",
"//include/sksl:DSLVar_hdr",
"//include/sksl:DSLWrapper_hdr",
"//src/gpu:GrFragmentProcessor_hdr",
"//src/gpu/glsl:GrGLSLFragmentShaderBuilder_hdr",
"//src/sksl:SkSLCompiler_hdr",
"//src/sksl:SkSLLexer_hdr",
"//src/sksl:SkSLThreadContext_hdr",
"//src/sksl/dsl/priv:DSLWriter_hdr",
"//src/sksl/ir:SkSLBinaryExpression_hdr",
"//src/sksl/ir:SkSLExpression_hdr",
"//src/sksl/ir:SkSLFieldAccess_hdr",
"//src/sksl/ir:SkSLFunctionCall_hdr",
"//src/sksl/ir:SkSLIndexExpression_hdr",
@ -74,6 +96,7 @@ generated_cc_atom(
"//src/sksl/ir:SkSLPoison_hdr",
"//src/sksl/ir:SkSLPostfixExpression_hdr",
"//src/sksl/ir:SkSLPrefixExpression_hdr",
"//src/sksl/ir:SkSLVariableReference_hdr",
],
)
@ -82,16 +105,23 @@ generated_cc_atom(
srcs = ["DSLFunction.cpp"],
visibility = ["//:__subpackages__"],
deps = [
"//include/core:SkTypes_hdr",
"//include/private:SkSLModifiers_hdr",
"//include/private:SkSLProgramElement_hdr",
"//include/private:SkSLStatement_hdr",
"//include/private:SkSLString_hdr",
"//include/sksl:DSLFunction_hdr",
"//include/sksl:DSLVar_hdr",
"//src/sksl:SkSLAnalysis_hdr",
"//src/sksl:SkSLCompiler_hdr",
"//include/sksl:DSLWrapper_hdr",
"//src/sksl:SkSLProgramSettings_hdr",
"//src/sksl:SkSLThreadContext_hdr",
"//src/sksl/dsl/priv:DSLWriter_hdr",
"//src/sksl/ir:SkSLExpression_hdr",
"//src/sksl/ir:SkSLFunctionCall_hdr",
"//src/sksl/ir:SkSLFunctionDeclaration_hdr",
"//src/sksl/ir:SkSLFunctionDefinition_hdr",
"//src/sksl/ir:SkSLFunctionPrototype_hdr",
"//src/sksl/ir:SkSLReturnStatement_hdr",
"//src/sksl/ir:SkSLVariable_hdr",
],
)
@ -110,11 +140,15 @@ generated_cc_atom(
srcs = ["DSLRuntimeEffects.cpp"],
visibility = ["//:__subpackages__"],
deps = [
"//include/effects:SkRuntimeEffect_hdr",
"//include/core:SkTypes_hdr",
"//include/private:SkSLProgramKind_hdr",
"//include/sksl:DSLCore_hdr",
"//include/sksl:DSLRuntimeEffects_hdr",
"//src/sksl:SkSLCompiler_hdr",
"//include/sksl:SkSLPosition_hdr",
"//src/sksl:SkSLContext_hdr",
"//src/sksl:SkSLProgramSettings_hdr",
"//src/sksl:SkSLThreadContext_hdr",
"//src/sksl/ir:SkSLProgram_hdr",
],
)
@ -123,14 +157,16 @@ generated_cc_atom(
srcs = ["DSLStatement.cpp"],
visibility = ["//:__subpackages__"],
deps = [
"//include/private:SkSLDefines_hdr",
"//include/sksl:DSLBlock_hdr",
"//include/sksl:DSLExpression_hdr",
"//include/sksl:DSLStatement_hdr",
"//src/gpu:GrFragmentProcessor_hdr",
"//src/gpu/glsl:GrGLSLFragmentShaderBuilder_hdr",
"//src/sksl:SkSLCompiler_hdr",
"//src/sksl:SkSLThreadContext_hdr",
"//src/sksl/ir:SkSLBlock_hdr",
"//src/sksl/ir:SkSLExpressionStatement_hdr",
"//src/sksl/ir:SkSLExpression_hdr",
"//src/sksl/ir:SkSLNop_hdr",
],
)
@ -140,10 +176,13 @@ generated_cc_atom(
srcs = ["DSLSymbols.cpp"],
visibility = ["//:__subpackages__"],
deps = [
"//include/private:SkSLSymbol_hdr",
"//include/sksl:DSLSymbols_hdr",
"//src/sksl:SkSLCompiler_hdr",
"//src/sksl:SkSLThreadContext_hdr",
"//src/sksl/dsl/priv:DSLWriter_hdr",
"//src/sksl/ir:SkSLSymbolTable_hdr",
"//src/sksl/ir:SkSLType_hdr",
"//src/sksl/ir:SkSLVariable_hdr",
],
)
@ -153,10 +192,24 @@ generated_cc_atom(
srcs = ["DSLType.cpp"],
visibility = ["//:__subpackages__"],
deps = [
"//include/core:SkTypes_hdr",
"//include/private:SkSLDefines_hdr",
"//include/private:SkSLLayout_hdr",
"//include/private:SkSLModifiers_hdr",
"//include/private:SkSLProgramElement_hdr",
"//include/private:SkSLString_hdr",
"//include/private:SkSLSymbol_hdr",
"//include/sksl:DSLType_hdr",
"//include/sksl:SkSLErrorReporter_hdr",
"//src/sksl:SkSLBuiltinTypes_hdr",
"//src/sksl:SkSLContext_hdr",
"//src/sksl:SkSLProgramSettings_hdr",
"//src/sksl:SkSLThreadContext_hdr",
"//src/sksl/ir:SkSLConstructor_hdr",
"//src/sksl/ir:SkSLExpression_hdr",
"//src/sksl/ir:SkSLStructDefinition_hdr",
"//src/sksl/ir:SkSLSymbolTable_hdr",
"//src/sksl/ir:SkSLType_hdr",
],
)
@ -165,17 +218,34 @@ generated_cc_atom(
srcs = ["DSLVar.cpp"],
visibility = ["//:__subpackages__"],
deps = [
"//include/core:SkTypes_hdr",
"//include/private:GrTypesPriv_hdr",
"//include/private:SkSLDefines_hdr",
"//include/private:SkSLLayout_hdr",
"//include/private:SkSLModifiers_hdr",
"//include/private:SkSLStatement_hdr",
"//include/private:SkSLString_hdr",
"//include/private:SkSLSymbol_hdr",
"//include/sksl:DSLModifiers_hdr",
"//include/sksl:DSLType_hdr",
"//include/sksl:DSLVar_hdr",
"//src/core:SkSLTypeShared_hdr",
"//src/gpu:GrFragmentProcessor_hdr",
"//src/gpu/glsl:GrGLSLUniformHandler_hdr",
"//src/sksl:SkSLBuiltinTypes_hdr",
"//src/sksl:SkSLCompiler_hdr",
"//src/sksl:SkSLContext_hdr",
"//src/sksl:SkSLLexer_hdr",
"//src/sksl:SkSLModifiersPool_hdr",
"//src/sksl:SkSLThreadContext_hdr",
"//src/sksl:SkSLUtil_hdr",
"//src/sksl/dsl/priv:DSLWriter_hdr",
"//src/sksl/ir:SkSLBinaryExpression_hdr",
"//src/sksl/ir:SkSLExpression_hdr",
"//src/sksl/ir:SkSLFieldAccess_hdr",
"//src/sksl/ir:SkSLFunctionCall_hdr",
"//src/sksl/ir:SkSLSymbolTable_hdr",
"//src/sksl/ir:SkSLVariableReference_hdr",
"//src/sksl/ir:SkSLType_hdr",
"//src/sksl/ir:SkSLVariable_hdr",
],
)

View File

@ -8,6 +8,7 @@
#include "include/sksl/DSLBlock.h"
#include "include/sksl/DSLStatement.h"
#include "include/sksl/SkSLPosition.h"
#include "src/sksl/ir/SkSLBlock.h"
namespace SkSL {

Some files were not shown because too many files have changed in this diff Show More