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

## Constructor & Destructor Documentation

## ◆ FlushTestDeviceBuffer()

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

Definition at line 2793 of file entity_unittests.cc.

2794 : 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 2808 of file entity_unittests.cc.

2808 {
2809 flush_called_ = true;
2810 }

## ◆ flush_called()

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

Definition at line 2812 of file entity_unittests.cc.

2812 { 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 2798 of file entity_unittests.cc.

2800 {
2801 return true;
2802 }

## ◆ OnGetContents()

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

Implements impeller::DeviceBuffer.

Definition at line 2804 of file entity_unittests.cc.

2804 {
2805 return const_cast<uint8_t*>(storage_.data());
2806 }

## ◆ SetLabel() [1/2]

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

Implements impeller::DeviceBuffer.

Definition at line 2796 of file entity_unittests.cc.

2796 { 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 2797 of file entity_unittests.cc.

2797 { return true; }

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

- impeller/entity/entity_unittests.cc