Flutter Engine
The Flutter Engine
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
SkSL::ProgramConfig Struct Reference

#include <SkSLProgramSettings.h>

Public Member Functions

bool enforcesSkSLVersion () const
 
bool strictES2Mode () const
 
const char * versionDescription () const
 

Static Public Member Functions

static bool IsFragment (ProgramKind kind)
 
static bool IsVertex (ProgramKind kind)
 
static bool IsCompute (ProgramKind kind)
 
static bool IsRuntimeEffect (ProgramKind kind)
 
static bool IsRuntimeShader (ProgramKind kind)
 
static bool IsRuntimeColorFilter (ProgramKind kind)
 
static bool IsRuntimeBlender (ProgramKind kind)
 
static bool AllowsPrivateIdentifiers (ProgramKind kind)
 

Public Attributes

bool fIsBuiltinCode
 
ProgramKind fKind
 
ProgramSettings fSettings
 
SkSL::Version fRequiredSkSLVersion = SkSL::Version::k100
 

Detailed Description

All the configuration data for a given program.

Definition at line 81 of file SkSLProgramSettings.h.

Member Function Documentation

◆ AllowsPrivateIdentifiers()

static bool SkSL::ProgramConfig::AllowsPrivateIdentifiers ( ProgramKind  kind)
inlinestatic

◆ enforcesSkSLVersion()

bool SkSL::ProgramConfig::enforcesSkSLVersion ( ) const
inline

Definition at line 91 of file SkSLProgramSettings.h.

91 {
92 return IsRuntimeEffect(fKind);
93 }
static bool IsRuntimeEffect(ProgramKind kind)

◆ IsCompute()

static bool SkSL::ProgramConfig::IsCompute ( ProgramKind  kind)
inlinestatic

Definition at line 125 of file SkSLProgramSettings.h.

125 {
126 return kind == ProgramKind::kCompute;
127 }

◆ IsFragment()

static bool SkSL::ProgramConfig::IsFragment ( ProgramKind  kind)
inlinestatic

Definition at line 113 of file SkSLProgramSettings.h.

◆ IsRuntimeBlender()

static bool SkSL::ProgramConfig::IsRuntimeBlender ( ProgramKind  kind)
inlinestatic

Definition at line 150 of file SkSLProgramSettings.h.

150 {
151 return (kind == ProgramKind::kRuntimeBlender ||
153 }

◆ IsRuntimeColorFilter()

static bool SkSL::ProgramConfig::IsRuntimeColorFilter ( ProgramKind  kind)
inlinestatic

Definition at line 145 of file SkSLProgramSettings.h.

145 {
146 return (kind == ProgramKind::kRuntimeColorFilter ||
148 }

◆ IsRuntimeEffect()

static bool SkSL::ProgramConfig::IsRuntimeEffect ( ProgramKind  kind)
inlinestatic

◆ IsRuntimeShader()

static bool SkSL::ProgramConfig::IsRuntimeShader ( ProgramKind  kind)
inlinestatic

Definition at line 140 of file SkSLProgramSettings.h.

140 {
141 return (kind == ProgramKind::kRuntimeShader ||
143 }

◆ IsVertex()

static bool SkSL::ProgramConfig::IsVertex ( ProgramKind  kind)
inlinestatic

Definition at line 119 of file SkSLProgramSettings.h.

◆ strictES2Mode()

bool SkSL::ProgramConfig::strictES2Mode ( ) const
inline

Definition at line 95 of file SkSLProgramSettings.h.

95 {
96 // TODO(skia:11209): Remove the first condition - so this is just based on #version.
97 // Make it more generic (eg, isVersionLT) checking.
100 this->enforcesSkSLVersion();
101 }
bool enforcesSkSLVersion() const
ProgramSettings fSettings
SkSL::Version fRequiredSkSLVersion
SkSL::Version fMaxVersionAllowed

◆ versionDescription()

const char * SkSL::ProgramConfig::versionDescription ( ) const
inline

Definition at line 103 of file SkSLProgramSettings.h.

103 {
104 if (this->enforcesSkSLVersion()) {
105 switch (fRequiredSkSLVersion) {
106 case Version::k100: return "#version 100\n";
107 case Version::k300: return "#version 300\n";
108 }
109 }
110 return "";
111 }

Member Data Documentation

◆ fIsBuiltinCode

bool SkSL::ProgramConfig::fIsBuiltinCode

True if we are currently processing one of the built-in SkSL include modules.

Definition at line 83 of file SkSLProgramSettings.h.

◆ fKind

ProgramKind SkSL::ProgramConfig::fKind

Definition at line 84 of file SkSLProgramSettings.h.

◆ fRequiredSkSLVersion

SkSL::Version SkSL::ProgramConfig::fRequiredSkSLVersion = SkSL::Version::k100

Definition at line 89 of file SkSLProgramSettings.h.

◆ fSettings

ProgramSettings SkSL::ProgramConfig::fSettings

Definition at line 85 of file SkSLProgramSettings.h.


The documentation for this struct was generated from the following file: