| 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 2589 of file entity_unittests.cc.

## Constructor & Destructor Documentation

## ◆ FlushTestDeviceBuffer()

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

Definition at line 2591 of file entity_unittests.cc.

2592 : 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 2606 of file entity_unittests.cc.

2606 {
2607 flush_called_ = true;
2608 }

## ◆ flush_called()

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

Definition at line 2610 of file entity_unittests.cc.

2610 { 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 2596 of file entity_unittests.cc.

2598 {
2599 return true;
2600 }

## ◆ OnGetContents()

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

Implements impeller::DeviceBuffer.

Definition at line 2602 of file entity_unittests.cc.

2602 {
2603 return const_cast<uint8_t*>(storage_.data());
2604 }

## ◆ SetLabel() [1/2]

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

Implements impeller::DeviceBuffer.

Definition at line 2594 of file entity_unittests.cc.

2594 { 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 2595 of file entity_unittests.cc.

2595 { return true; }

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

- impeller/entity/entity_unittests.cc