Flutter Engine
The Flutter Engine
sampler_descriptor.h
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef FLUTTER_IMPELLER_CORE_SAMPLER_DESCRIPTOR_H_
6#define FLUTTER_IMPELLER_CORE_SAMPLER_DESCRIPTOR_H_
7
10
11namespace impeller {
12
13class Context;
14
15struct SamplerDescriptor final : public Comparable<SamplerDescriptor> {
19
23
24 std::string label = "NN Clamp Sampler";
25
27
28 SamplerDescriptor(std::string label,
32
33 // Comparable<SamplerDescriptor>
34 std::size_t GetHash() const override {
38 }
39
40 // Comparable<SamplerDescriptor>
41 bool IsEqual(const SamplerDescriptor& o) const override {
42 return min_filter == o.min_filter && mag_filter == o.mag_filter &&
47 }
48};
49
50} // namespace impeller
51
52#endif // FLUTTER_IMPELLER_CORE_SAMPLER_DESCRIPTOR_H_
constexpr std::size_t HashCombine()
Definition: hash_combine.h:25
MipFilter
Options for selecting and filtering between mipmap levels.
Definition: formats.h:419
@ kNearest
The nearst mipmap level is selected.
SamplerAddressMode
Definition: formats.h:435
MinMagFilter
Describes how the texture should be sampled when the texture is being shrunk (minified) or expanded (...
Definition: formats.h:409
@ kNearest
Select nearest to the sample point. Most widely supported.
bool IsEqual(const SamplerDescriptor &o) const override
SamplerAddressMode depth_address_mode
std::size_t GetHash() const override
SamplerAddressMode width_address_mode
SamplerAddressMode height_address_mode