Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
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
9
10#include <algorithm>
11
12namespace SkSL {
13
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
#define SkASSERT(cond)
Definition SkAssert.h:116
SampleUsage merge(const SampleUsage &other)