Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
third_party
skia
src
sksl
SkSLContext.h
Go to the documentation of this file.
1
/*
2
* Copyright 2016 Google Inc.
3
*
4
* Use of this source code is governed by a BSD-style license that can be
5
* found in the LICENSE file.
6
*/
7
8
#ifndef SKSL_CONTEXT
9
#define SKSL_CONTEXT
10
11
#include "
include/private/base/SkAssert.h
"
12
13
namespace
SkSL
{
14
15
class
BuiltinTypes;
16
class
ErrorReporter;
17
struct
Module;
18
struct
ProgramConfig;
19
class
SymbolTable;
20
21
/**
22
* Contains compiler-wide objects and state.
23
*/
24
class
Context
{
25
public
:
26
Context
(
const
BuiltinTypes
& types,
ErrorReporter
& errors);
27
~Context
();
28
29
// The Context holds a reference to all of the built-in types.
30
const
BuiltinTypes
&
fTypes
;
31
32
// The Context holds a pointer to the configuration of the program being compiled.
33
ProgramConfig
*
fConfig
=
nullptr
;
34
35
// The Context holds a pointer to our error reporter.
36
ErrorReporter
*
fErrors
;
37
38
void
setErrorReporter
(
ErrorReporter
* e) {
39
SkASSERT
(e);
40
fErrors
= e;
41
}
42
43
// The Context holds a pointer to our module with built-in declarations.
44
const
Module
*
fModule
=
nullptr
;
45
46
// This is the current symbol table of the code we are processing, and therefore changes during
47
// compilation.
48
SymbolTable
*
fSymbolTable
=
nullptr
;
49
};
50
51
}
// namespace SkSL
52
53
#endif
SkAssert.h
SkASSERT
#define SkASSERT(cond)
Definition
SkAssert.h:116
SkSL::BuiltinTypes
Definition
SkSLBuiltinTypes.h:20
SkSL::Context
Definition
SkSLContext.h:24
SkSL::Context::~Context
~Context()
Definition
SkSLContext.cpp:23
SkSL::Context::fTypes
const BuiltinTypes & fTypes
Definition
SkSLContext.h:30
SkSL::Context::setErrorReporter
void setErrorReporter(ErrorReporter *e)
Definition
SkSLContext.h:38
SkSL::Context::fModule
const Module * fModule
Definition
SkSLContext.h:44
SkSL::Context::fErrors
ErrorReporter * fErrors
Definition
SkSLContext.h:36
SkSL::Context::fSymbolTable
SymbolTable * fSymbolTable
Definition
SkSLContext.h:48
SkSL::Context::fConfig
ProgramConfig * fConfig
Definition
SkSLContext.h:33
SkSL::ErrorReporter
Definition
SkSLErrorReporter.h:22
SkSL::SymbolTable
Definition
SkSLSymbolTable.h:35
SkSL
Definition
SkCapabilities.h:15
SkSL::Module
Definition
SkSLCompiler.h:56
SkSL::ProgramConfig
Definition
SkSLProgramSettings.h:81
Generated on Fri Apr 26 2024 06:17:33 for Flutter Engine by
1.9.8