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

## Constructor & Destructor Documentation

## ◆ FlushTestDeviceBuffer()

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

Definition at line 2588 of file entity_unittests.cc.

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

2603 {
2604 flush_called_ = true;
2605 }

## ◆ flush_called()

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

Definition at line 2607 of file entity_unittests.cc.

2607 { 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 2593 of file entity_unittests.cc.

2595 {
2596 return true;
2597 }

## ◆ OnGetContents()

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

Implements impeller::DeviceBuffer.

Definition at line 2599 of file entity_unittests.cc.

2599 {
2600 return const_cast<uint8_t*>(storage_.data());
2601 }

## ◆ SetLabel() [1/2]

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

Implements impeller::DeviceBuffer.

Definition at line 2591 of file entity_unittests.cc.

2591 { 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 2592 of file entity_unittests.cc.

2592 { return true; }

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

- impeller/entity/entity_unittests.cc