From c82f9efc0c3e187bd2aa0e34ac0f761f82730e2b Mon Sep 17 00:00:00 2001 From: Kevin Lubick Date: Thu, 28 Oct 2021 11:19:19 -0400 Subject: [PATCH] Remove GrTypesPriv.h dep from SkSLUtil.h when SK_SUPPORT_GPU=0 Change-Id: I8f1f05d774fa69a5331f314f84e48ee726a708d6 Bug: skia:12584 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/464901 Reviewed-by: Brian Osman --- src/sksl/SkSLCompiler.h | 1 + src/sksl/SkSLUtil.cpp | 2 +- src/sksl/SkSLUtil.h | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/sksl/SkSLCompiler.h b/src/sksl/SkSLCompiler.h index 1ab007dbde..baf5626ea6 100644 --- a/src/sksl/SkSLCompiler.h +++ b/src/sksl/SkSLCompiler.h @@ -11,6 +11,7 @@ #include #include #include +#include "include/core/SkSize.h" #include "src/sksl/SkSLAnalysis.h" #include "src/sksl/SkSLContext.h" #include "src/sksl/SkSLInliner.h" diff --git a/src/sksl/SkSLUtil.cpp b/src/sksl/SkSLUtil.cpp index fa0d50fad7..a987686e87 100644 --- a/src/sksl/SkSLUtil.cpp +++ b/src/sksl/SkSLUtil.cpp @@ -31,7 +31,7 @@ void write_stringstream(const StringStream& s, OutputStream& out) { out.write(s.str().c_str(), s.str().size()); } -#if !defined(SKSL_STANDALONE) +#if !defined(SKSL_STANDALONE) && SK_SUPPORT_GPU bool type_to_grsltype(const Context& context, const Type& type, GrSLType* outType) { // If a new GrSL type is added, this function will need to be updated. static_assert(kGrSLTypeCount == 41); diff --git a/src/sksl/SkSLUtil.h b/src/sksl/SkSLUtil.h index b083db5631..0f8fbf9bd4 100644 --- a/src/sksl/SkSLUtil.h +++ b/src/sksl/SkSLUtil.h @@ -17,9 +17,9 @@ #ifndef SKSL_STANDALONE #include "include/core/SkTypes.h" -#include "include/private/GrTypesPriv.h" #if SK_SUPPORT_GPU #include "include/gpu/GrContextOptions.h" +#include "include/private/GrTypesPriv.h" #include "src/gpu/GrShaderCaps.h" #endif // SK_SUPPORT_GPU #endif // SKSL_STANDALONE @@ -455,7 +455,7 @@ private: static ShaderCapsPointer MakeShaderCaps(); }; -#if !defined(SKSL_STANDALONE) +#if !defined(SKSL_STANDALONE) && SK_SUPPORT_GPU bool type_to_grsltype(const Context& context, const Type& type, GrSLType* outType); #endif