| Flutter Impeller |

Public Member Functions | List of all members
impeller::testing::FlushTestDeviceBuffer Class Reference
Inheritance diagram for impeller::testing::FlushTestDeviceBuffer:

## Public Member Functions
| FlushTestDeviceBuffer (const DeviceBufferDescriptor &desc)
bool | SetLabel (std::string_view label) override
bool | SetLabel (std::string_view label, Range range) override
bool | OnCopyHostBuffer (const uint8_t *source, Range source_range, size_t offset)
uint8_t * | OnGetContents () const override
void | Flush (std::optional< Range > range) const override
bool | flush_called () const
Public Member Functions inherited from impeller::DeviceBuffer
virtual | ~DeviceBuffer ()
bool | CopyHostBuffer (const uint8_t *source, Range source_range, size_t offset=0u)
const DeviceBufferDescriptor & | GetDeviceBufferDescriptor () const
virtual void | Invalidate (std::optional< Range > range=std::nullopt) const

## Additional Inherited Members
Static Public Member Functions inherited from impeller::DeviceBuffer
static BufferView | AsBufferView (std::shared_ptr< DeviceBuffer > buffer)
| Create a buffer view of this entire buffer. More...
Protected Member Functions inherited from impeller::DeviceBuffer
| DeviceBuffer (DeviceBufferDescriptor desc)
Protected Attributes inherited from impeller::DeviceBuffer
const DeviceBufferDescriptor | desc_

## Detailed Description

Definition at line 2666 of file entity_unittests.cc.

## Constructor & Destructor Documentation

## ◆ FlushTestDeviceBuffer()

impeller::testing::FlushTestDeviceBuffer::FlushTestDeviceBuffer | ( | const DeviceBufferDescriptor & | desc | ) |
| inline explicit

Definition at line 2668 of file entity_unittests.cc.

2669 : DeviceBuffer(desc), storage_(desc.size) {}
impeller::DeviceBuffer::DeviceBuffer
DeviceBuffer(DeviceBufferDescriptor desc)
Definition: device_buffer.cc:9

## Member Function Documentation

## ◆ Flush()

void impeller::testing::FlushTestDeviceBuffer::Flush | ( | std::optional< Range > | range | ) | const
| inline override virtual

Make any pending writes visible to the GPU.

This method must be called if the device pointer provided by [OnGetContents] is written to without using [CopyHostBuffer]. On Devices with coherent host memory, this method will not perform extra work.

If the range is not provided, the entire buffer is flushed.

Reimplemented from impeller::DeviceBuffer.

Definition at line 2683 of file entity_unittests.cc.

2683 {
2684 flush_called_ = true;
2685 }

## ◆ flush_called()

bool impeller::testing::FlushTestDeviceBuffer::flush_called | ( |  | ) | const
| inline

Definition at line 2687 of file entity_unittests.cc.

2687 { return flush_called_; }

## ◆ OnCopyHostBuffer()

bool impeller::testing::FlushTestDeviceBuffer::OnCopyHostBuffer | ( | const uint8_t * | source,
|  | Range | source_range,
|  | size_t | offset
| ) |  |
| inline virtual

Implements impeller::DeviceBuffer.

Definition at line 2673 of file entity_unittests.cc.

2675 {
2676 return true;
2677 }

## ◆ OnGetContents()

uint8_t* impeller::testing::FlushTestDeviceBuffer::OnGetContents | ( |  | ) | const
| inline override virtual

Implements impeller::DeviceBuffer.

Definition at line 2679 of file entity_unittests.cc.

2679 {
2680 return const_cast<uint8_t*>(storage_.data());
2681 }

## ◆ SetLabel() [1/2]

bool impeller::testing::FlushTestDeviceBuffer::SetLabel | ( | std::string_view | label | ) |
| inline override virtual

Implements impeller::DeviceBuffer.

Definition at line 2671 of file entity_unittests.cc.

2671 { return true; }

## ◆ SetLabel() [2/2]

bool impeller::testing::FlushTestDeviceBuffer::SetLabel | ( | std::string_view | label,
|  | Range | range
| ) |  |
| inline override virtual

Implements impeller::DeviceBuffer.

Definition at line 2672 of file entity_unittests.cc.

2672 { return true; }

The documentation for this class was generated from the following file:

- impeller/entity/entity_unittests.cc