Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
resource_binder.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_RESOURCE_BINDER_H_
6#define FLUTTER_IMPELLER_CORE_RESOURCE_BINDER_H_
7
8#include <memory>
9
15
16namespace impeller {
17
18//------------------------------------------------------------------------------
19/// @brief An interface for binding resources. This is implemented by
20/// |Command| and |ComputeCommand| to make GPU resources available
21/// to a given command's pipeline.
22///
24 virtual ~ResourceBinder() = default;
25
26 virtual bool BindResource(ShaderStage stage,
28 const ShaderUniformSlot& slot,
29 const ShaderMetadata& metadata,
30 BufferView view) = 0;
31
32 virtual bool BindResource(ShaderStage stage,
34 const SampledImageSlot& slot,
35 const ShaderMetadata& metadata,
36 std::shared_ptr<const Texture> texture,
37 const std::unique_ptr<const Sampler>& sampler) = 0;
38};
39
40} // namespace impeller
41
42#endif // FLUTTER_IMPELLER_CORE_RESOURCE_BINDER_H_
FlTexture * texture
An interface for binding resources. This is implemented by |Command| and |ComputeCommand| to make GPU...
virtual ~ResourceBinder()=default
virtual bool BindResource(ShaderStage stage, DescriptorType type, const SampledImageSlot &slot, const ShaderMetadata &metadata, std::shared_ptr< const Texture > texture, const std::unique_ptr< const Sampler > &sampler)=0
virtual bool BindResource(ShaderStage stage, DescriptorType type, const ShaderUniformSlot &slot, const ShaderMetadata &metadata, BufferView view)=0
Metadata required to bind a combined texture and sampler.
Metadata required to bind a buffer.