Flutter Impeller
sampler_library.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_SAMPLER_LIBRARY_H_
6 #define FLUTTER_IMPELLER_RENDERER_SAMPLER_LIBRARY_H_
7 
10 
11 namespace impeller {
12 
14  public:
15  virtual ~SamplerLibrary();
16 
17  /// @brief Retrieve a backend specific sampler object for the given sampler
18  /// descriptor.
19  ///
20  /// If the descriptor is invalid or there is a loss of rendering
21  /// context, this method may return a nullptr.
22  ///
23  /// The sampler library implementations must cache this sampler object
24  /// and guarantee that the reference will continue to be valid
25  /// throughout the lifetime of the Impeller context.
26  virtual const std::unique_ptr<const Sampler>& GetSampler(
27  SamplerDescriptor descriptor) = 0;
28 
29  protected:
31 
32  private:
33  SamplerLibrary(const SamplerLibrary&) = delete;
34 
35  SamplerLibrary& operator=(const SamplerLibrary&) = delete;
36 };
37 
38 } // namespace impeller
39 
40 #endif // FLUTTER_IMPELLER_RENDERER_SAMPLER_LIBRARY_H_
sampler.h
impeller::SamplerDescriptor
Definition: sampler_descriptor.h:15
sampler_descriptor.h
impeller::SamplerLibrary::~SamplerLibrary
virtual ~SamplerLibrary()
impeller::SamplerLibrary::SamplerLibrary
SamplerLibrary()
impeller::SamplerLibrary
Definition: sampler_library.h:13
impeller
Definition: aiks_blur_unittests.cc:20
impeller::SamplerLibrary::GetSampler
virtual const std::unique_ptr< const Sampler > & GetSampler(SamplerDescriptor descriptor)=0
Retrieve a backend specific sampler object for the given sampler descriptor.