Flutter Engine
The Flutter Engine
third_party
skia
src
sksl
SkSLSampleUsage.cpp
Go to the documentation of this file.
1
/*
2
* Copyright 2020 Google LLC
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
#include "
include/private/SkSLSampleUsage.h
"
9
10
#include <algorithm>
11
12
namespace
SkSL
{
13
14
SampleUsage
SampleUsage::merge
(
const
SampleUsage
& other) {
15
// This function is only used in Analysis::MergeSampleUsageVisitor to determine the combined
16
// SampleUsage for a child fp/shader/etc. We should never see matrix sampling here.
17
SkASSERT
(fKind !=
Kind::kUniformMatrix
&& other.fKind !=
Kind::kUniformMatrix
);
18
19
static_assert
(
Kind::kExplicit
>
Kind::kPassThrough
);
20
static_assert
(
Kind::kPassThrough
>
Kind::kNone
);
21
fKind =
std::max
(fKind, other.fKind);
22
23
return
*
this
;
24
}
25
26
}
// namespace SkSL
SkASSERT
#define SkASSERT(cond)
Definition:
SkAssert.h:116
SkSLSampleUsage.h
SkSL::SampleUsage
Definition:
SkSLSampleUsage.h:18
SkSL::SampleUsage::merge
SampleUsage merge(const SampleUsage &other)
Definition:
SkSLSampleUsage.cpp:14
SkSL::SampleUsage::Kind::kNone
@ kNone
SkSL::SampleUsage::Kind::kUniformMatrix
@ kUniformMatrix
SkSL::SampleUsage::Kind::kPassThrough
@ kPassThrough
SkSL::SampleUsage::Kind::kExplicit
@ kExplicit
max
static float max(float r, float g, float b)
Definition:
hsl.cpp:49
SkSL
Definition:
SkCapabilities.h:15
Generated on Sun Jun 23 2024 21:56:35 for Flutter Engine by
1.9.4