Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
SkSL::ModuleLoader::Impl Struct Reference

Public Member Functions

 Impl ()
 
void makeRootSymbolTable ()
 

Public Attributes

SkMutex fMutex
 
const BuiltinTypes fBuiltinTypes
 
std::unique_ptr< const ModulefRootModule
 
std::unique_ptr< const ModulefSharedModule
 
std::unique_ptr< const ModulefGPUModule
 
std::unique_ptr< const ModulefVertexModule
 
std::unique_ptr< const ModulefFragmentModule
 
std::unique_ptr< const ModulefComputeModule
 
std::unique_ptr< const ModulefGraphiteVertexModule
 
std::unique_ptr< const ModulefGraphiteFragmentModule
 
std::unique_ptr< const ModulefGraphiteVertexES2Module
 
std::unique_ptr< const ModulefGraphiteFragmentES2Module
 
std::unique_ptr< const ModulefPublicModule
 
std::unique_ptr< const ModulefRuntimeShaderModule
 

Detailed Description

Definition at line 148 of file SkSLModuleLoader.cpp.

Constructor & Destructor Documentation

◆ Impl()

SkSL::ModuleLoader::Impl::Impl ( )

Definition at line 201 of file SkSLModuleLoader.cpp.

201 {
202 this->makeRootSymbolTable();
203}

Member Function Documentation

◆ makeRootSymbolTable()

void SkSL::ModuleLoader::Impl::makeRootSymbolTable ( )

Definition at line 435 of file SkSLModuleLoader.cpp.

435 {
436 auto rootModule = std::make_unique<Module>();
437 rootModule->fSymbols = std::make_unique<SymbolTable>(/*builtin=*/true);
438
439 for (BuiltinTypePtr rootType : kRootTypes) {
440 rootModule->fSymbols->addWithoutOwnershipOrDie((fBuiltinTypes.*rootType).get());
441 }
442
443 for (BuiltinTypePtr privateType : kPrivateTypes) {
444 rootModule->fSymbols->addWithoutOwnershipOrDie((fBuiltinTypes.*privateType).get());
445 }
446
447 // sk_Caps is "builtin", but all references to it are resolved to Settings, so we don't need to
448 // treat it as builtin (ie, no need to clone it into the Program).
449 rootModule->fSymbols->addOrDie(Variable::Make(/*pos=*/Position(),
450 /*modifiersPosition=*/Position(),
451 Layout{},
454 "sk_Caps",
455 /*mangledName=*/"",
456 /*builtin=*/false,
457 Variable::Storage::kGlobal));
458 fRootModule = std::move(rootModule);
459}
const std::unique_ptr< Type > fSkCaps
const Module * rootModule()
static std::unique_ptr< Variable > Make(Position pos, Position modifiersPosition, const Layout &layout, ModifierFlags flags, const Type *type, std::string_view name, std::string mangledName, bool builtin, Storage storage)
const std::unique_ptr< Type > BuiltinTypes::* BuiltinTypePtr
static constexpr BuiltinTypePtr kPrivateTypes[]
static constexpr BuiltinTypePtr kRootTypes[]
const BuiltinTypes fBuiltinTypes
std::unique_ptr< const Module > fRootModule
std::unique_ptr< SymbolTable > fSymbols

Member Data Documentation

◆ fBuiltinTypes

const BuiltinTypes SkSL::ModuleLoader::Impl::fBuiltinTypes

Definition at line 156 of file SkSLModuleLoader.cpp.

◆ fComputeModule

std::unique_ptr<const Module> SkSL::ModuleLoader::Impl::fComputeModule

Definition at line 165 of file SkSLModuleLoader.cpp.

◆ fFragmentModule

std::unique_ptr<const Module> SkSL::ModuleLoader::Impl::fFragmentModule

Definition at line 164 of file SkSLModuleLoader.cpp.

◆ fGPUModule

std::unique_ptr<const Module> SkSL::ModuleLoader::Impl::fGPUModule

Definition at line 161 of file SkSLModuleLoader.cpp.

◆ fGraphiteFragmentES2Module

std::unique_ptr<const Module> SkSL::ModuleLoader::Impl::fGraphiteFragmentES2Module

Definition at line 169 of file SkSLModuleLoader.cpp.

◆ fGraphiteFragmentModule

std::unique_ptr<const Module> SkSL::ModuleLoader::Impl::fGraphiteFragmentModule

Definition at line 167 of file SkSLModuleLoader.cpp.

◆ fGraphiteVertexES2Module

std::unique_ptr<const Module> SkSL::ModuleLoader::Impl::fGraphiteVertexES2Module

Definition at line 168 of file SkSLModuleLoader.cpp.

◆ fGraphiteVertexModule

std::unique_ptr<const Module> SkSL::ModuleLoader::Impl::fGraphiteVertexModule

Definition at line 166 of file SkSLModuleLoader.cpp.

◆ fMutex

SkMutex SkSL::ModuleLoader::Impl::fMutex

Definition at line 155 of file SkSLModuleLoader.cpp.

◆ fPublicModule

std::unique_ptr<const Module> SkSL::ModuleLoader::Impl::fPublicModule

Definition at line 171 of file SkSLModuleLoader.cpp.

◆ fRootModule

std::unique_ptr<const Module> SkSL::ModuleLoader::Impl::fRootModule

Definition at line 158 of file SkSLModuleLoader.cpp.

◆ fRuntimeShaderModule

std::unique_ptr<const Module> SkSL::ModuleLoader::Impl::fRuntimeShaderModule

Definition at line 173 of file SkSLModuleLoader.cpp.

◆ fSharedModule

std::unique_ptr<const Module> SkSL::ModuleLoader::Impl::fSharedModule

Definition at line 160 of file SkSLModuleLoader.cpp.

◆ fVertexModule

std::unique_ptr<const Module> SkSL::ModuleLoader::Impl::fVertexModule

Definition at line 163 of file SkSLModuleLoader.cpp.


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