![]() |
Flutter Engine
The Flutter Engine
|
#include <AsyncReadTypes.h>
Classes | |
struct | BufferFinishedMessage |
Public Types | |
using | BufferFinishedMessageBus = SkMessageBus< BufferFinishedMessage, IDType, false > |
Public Member Functions | |
TClientMappedBufferManager (IDType ownerID) | |
TClientMappedBufferManager (const TClientMappedBufferManager &)=delete | |
TClientMappedBufferManager (TClientMappedBufferManager &&)=delete | |
~TClientMappedBufferManager () | |
TClientMappedBufferManager & | operator= (const TClientMappedBufferManager &)=delete |
TClientMappedBufferManager & | operator= (TClientMappedBufferManager &&)=delete |
IDType | ownerID () const |
void | insert (sk_sp< T > b) |
void | process () |
void | abandon () |
We sometimes hand clients objects that contain mapped buffers. The client may consume the mapped buffer on another thread. This object manages receiving messages that buffers are ready to be unmapped (on the owner's thread). It also handles cleaning up mapped buffers if the owner is destroyed before the client has finished with the buffer.
Buffers are first registered using insert() before being passed the client. process() should be called periodically on the owner's thread to poll for messages and process them.
Definition at line 34 of file AsyncReadTypes.h.
using skgpu::TClientMappedBufferManager< T, IDType >::BufferFinishedMessageBus = SkMessageBus<BufferFinishedMessage, IDType, false> |
Definition at line 52 of file AsyncReadTypes.h.
|
inline |
Definition at line 56 of file AsyncReadTypes.h.
|
delete |
|
delete |
|
inline |
Definition at line 61 of file AsyncReadTypes.h.
|
inline |
Notifies the manager that the context has been abandoned. No more unmaps() will occur.
Definition at line 106 of file AsyncReadTypes.h.
|
inline |
Let the manager know to expect a message with buffer 'b'. It's illegal for a buffer to be inserted again before it is unmapped by process().
Definition at line 87 of file AsyncReadTypes.h.
|
delete |
|
delete |
|
inline |
Initialize BufferFinishedMessage::fIntendedRecipient to this value. It is the unique ID of the object that owns this buffer manager.
Definition at line 79 of file AsyncReadTypes.h.
|
inline |
Poll for messages and unmap any incoming buffers.
Definition at line 94 of file AsyncReadTypes.h.