Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
impeller
core
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
10
#include "
impeller/core/buffer_view.h
"
11
#include "
impeller/core/formats.h
"
12
#include "
impeller/core/sampler.h
"
13
#include "
impeller/core/shader_types.h
"
14
#include "
impeller/core/texture.h
"
15
16
namespace
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
///
23
struct
ResourceBinder
{
24
virtual
~ResourceBinder
() =
default
;
25
26
virtual
bool
BindResource
(
ShaderStage
stage,
27
DescriptorType
type
,
28
const
ShaderUniformSlot
& slot,
29
const
ShaderMetadata
& metadata,
30
BufferView
view) = 0;
31
32
virtual
bool
BindResource
(
ShaderStage
stage,
33
DescriptorType
type
,
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_
buffer_view.h
type
uint8_t type
Definition
fl_standard_message_codec_test.cc:1115
formats.h
sampler.h
texture.h
texture
FlTexture * texture
Definition
mock_texture_registrar.cc:24
impeller
Definition
texture.h:18
impeller::ShaderStage
ShaderStage
Definition
shader_types.h:22
impeller::DescriptorType
DescriptorType
Definition
shader_types.h:153
shader_types.h
impeller::BufferView
Definition
buffer_view.h:15
impeller::ResourceBinder
An interface for binding resources. This is implemented by |Command| and |ComputeCommand| to make GPU...
Definition
resource_binder.h:23
impeller::ResourceBinder::~ResourceBinder
virtual ~ResourceBinder()=default
impeller::ResourceBinder::BindResource
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
impeller::ResourceBinder::BindResource
virtual bool BindResource(ShaderStage stage, DescriptorType type, const ShaderUniformSlot &slot, const ShaderMetadata &metadata, BufferView view)=0
impeller::SampledImageSlot
Metadata required to bind a combined texture and sampler.
Definition
shader_types.h:98
impeller::ShaderMetadata
Definition
shader_types.h:72
impeller::ShaderUniformSlot
Metadata required to bind a buffer.
Definition
shader_types.h:81
Generated on Fri Apr 26 2024 06:14:08 for Flutter Engine by
1.9.8