Flutter Engine
 
Loading...
Searching...
No Matches
sampler_library_vk.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_RENDERER_BACKEND_VULKAN_SAMPLER_LIBRARY_VK_H_
6#define FLUTTER_IMPELLER_RENDERER_BACKEND_VULKAN_SAMPLER_LIBRARY_VK_H_
7
14
15namespace impeller {
16
18 : public SamplerLibrary,
19 public BackendCast<SamplerLibraryVK, SamplerLibrary> {
20 public:
21 // |SamplerLibrary|
23
24 explicit SamplerLibraryVK(const std::weak_ptr<DeviceHolderVK>& device_holder);
25
26 void ApplyWorkarounds(const WorkaroundsVK& workarounds);
27
28 private:
29 friend class ContextVK;
30
31 std::weak_ptr<DeviceHolderVK> device_holder_;
32 std::vector<std::pair<uint64_t, std::shared_ptr<const Sampler>>> samplers_;
33 bool mips_disabled_workaround_ = false;
34
35 // |SamplerLibrary|
36 raw_ptr<const Sampler> GetSampler(
37 const SamplerDescriptor& descriptor) override;
38
39 SamplerLibraryVK(const SamplerLibraryVK&) = delete;
40
41 SamplerLibraryVK& operator=(const SamplerLibraryVK&) = delete;
42};
43
44} // namespace impeller
45
46#endif // FLUTTER_IMPELLER_RENDERER_BACKEND_VULKAN_SAMPLER_LIBRARY_VK_H_
void ApplyWorkarounds(const WorkaroundsVK &workarounds)
A wrapper around a raw ptr that adds additional unopt mode only checks.
Definition raw_ptr.h:15
A non-exhaustive set of driver specific workarounds.