Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
third_party
skia
src
sksl
SkSLDefines.h
Go to the documentation of this file.
1
/*
2
* Copyright 2019 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_DEFINES
9
#define SKSL_DEFINES
10
11
#include <cstdint>
12
13
#include "
include/core/SkTypes.h
"
14
#include "
include/private/base/SkTArray.h
"
15
16
using
SKSL_INT
= int64_t;
17
using
SKSL_FLOAT
= float;
18
19
namespace
SkSL
{
20
21
class
Expression;
22
class
Statement;
23
24
using
ComponentArray
=
skia_private::STArray<4, int8_t>
;
// for Swizzles
25
26
class
ExpressionArray
:
public
skia_private::STArray
<2, std::unique_ptr<Expression>> {
27
public
:
28
using
STArray::STArray;
29
30
/** Returns a new ExpressionArray containing a clone of every element. */
31
ExpressionArray
clone
()
const
;
32
};
33
34
using
StatementArray
=
skia_private::STArray<2, std::unique_ptr<Statement>
>;
35
36
// Functions larger than this (measured in IR nodes) will not be inlined. This growth factor
37
// accounts for the number of calls being inlined--i.e., a function called five times (that is, with
38
// five inlining opportunities) would be considered 5x larger than if it were called once. This
39
// default threshold value is arbitrary, but tends to work well in practice.
40
static
constexpr
int
kDefaultInlineThreshold
= 50;
41
42
// A hard upper limit on the number of variable slots allowed in a function/global scope.
43
// This is an arbitrary limit, but is needed to prevent code generation from taking unbounded
44
// amounts of time or space.
45
static
constexpr
int
kVariableSlotLimit
= 100000;
46
47
}
// namespace SkSL
48
49
#endif
SKSL_INT
int64_t SKSL_INT
Definition
SkSLDefines.h:16
SKSL_FLOAT
float SKSL_FLOAT
Definition
SkSLDefines.h:17
SkTArray.h
SkTypes.h
SkSL::ExpressionArray
Definition
SkSLDefines.h:26
SkSL::ExpressionArray::clone
ExpressionArray clone() const
Definition
SkSLExpression.cpp:41
skia_private::STArray< 4, int8_t >
SkSL
Definition
SkCapabilities.h:15
SkSL::kDefaultInlineThreshold
static constexpr int kDefaultInlineThreshold
Definition
SkSLDefines.h:40
SkSL::kVariableSlotLimit
static constexpr int kVariableSlotLimit
Definition
SkSLDefines.h:45
Generated on Fri Apr 26 2024 06:17:33 for Flutter Engine by
1.9.8