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

## Constructor & Destructor Documentation

## ◆ FlushTestDeviceBuffer()

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

Definition at line 2888 of file entity_unittests.cc.

2889 : 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 2903 of file entity_unittests.cc.

2903 {
2904 flush_called_ = true;
2905 }

## ◆ flush_called()

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

Definition at line 2907 of file entity_unittests.cc.

2907 { 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 2893 of file entity_unittests.cc.

2895 {
2896 return true;
2897 }

## ◆ OnGetContents()

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

Implements impeller::DeviceBuffer.

Definition at line 2899 of file entity_unittests.cc.

2899 {
2900 return const_cast<uint8_t*>(storage_.data());
2901 }

## ◆ SetLabel() [1/2]

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

Implements impeller::DeviceBuffer.

Definition at line 2891 of file entity_unittests.cc.

2891 { 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 2892 of file entity_unittests.cc.

2892 { return true; }

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

- impeller/entity/entity_unittests.cc