Flutter Engine
The Flutter Engine
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
class
ExpressionArray
:
public
skia_private::STArray
<2, std::unique_ptr<Expression>> {
25
public
:
26
using
STArray::STArray;
27
28
/** Returns a new ExpressionArray containing a clone of every element. */
29
ExpressionArray
clone
()
const
;
30
};
31
32
using
StatementArray
=
skia_private::STArray<2, std::unique_ptr<Statement>
>;
33
34
// Functions larger than this (measured in IR nodes) will not be inlined. This growth factor
35
// accounts for the number of calls being inlined--i.e., a function called five times (that is, with
36
// five inlining opportunities) would be considered 5x larger than if it were called once. This
37
// default threshold value is arbitrary, but tends to work well in practice.
38
static
constexpr
int
kDefaultInlineThreshold
= 50;
39
40
// A hard upper limit on the number of variable slots allowed in a function/global scope.
41
// This is an arbitrary limit, but is needed to prevent code generation from taking unbounded
42
// amounts of time or space.
43
static
constexpr
int
kVariableSlotLimit
= 100000;
44
45
}
// namespace SkSL
46
47
#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:24
SkSL::ExpressionArray::clone
ExpressionArray clone() const
Definition:
SkSLExpression.cpp:49
skia_private::STArray
Definition:
SkTArray.h:754
SkSL
Definition:
SkCapabilities.h:15
SkSL::kDefaultInlineThreshold
static constexpr int kDefaultInlineThreshold
Definition:
SkSLDefines.h:38
SkSL::kVariableSlotLimit
static constexpr int kVariableSlotLimit
Definition:
SkSLDefines.h:43
tools.skpbench.skpbench.float
float
Definition:
skpbench.py:42
Generated on Sun Jun 23 2024 21:56:35 for Flutter Engine by
1.9.4