Flutter Engine
The Flutter Engine
|
#include <BufferManager.h>
Public Types | |
enum class | FinishResult : int { kFailure , kSuccess , kNoWork } |
Public Member Functions | |
StaticBufferManager (ResourceProvider *, const Caps *) | |
~StaticBufferManager () | |
VertexWriter | getVertexWriter (size_t size, BindBufferInfo *binding) |
VertexWriter | getIndexWriter (size_t size, BindBufferInfo *binding) |
FinishResult | finalize (Context *, QueueManager *, GlobalCache *) |
The StaticBufferManager is the one-time-only analog to DrawBufferManager and provides "static" Buffers to RenderSteps and other Context-lifetime-tied objects, where the Buffers' contents will not change and can benefit from prioritizing GPU reads. The assumed use case is that they remain read-only on the GPU as well, so a single static buffer can be shared by all Recorders.
Unlike DrawBufferManager's getXWriter() functions that return both a Writer and a BindBufferInfo, StaticBufferManager returns only a Writer and accepts a BindBufferInfo* as an argument. This will be re-written with the final binding info for the GPU-private data once that can be determined after all static buffers have been requested.
Definition at line 228 of file BufferManager.h.
|
strong |
Enumerator | |
---|---|
kFailure | |
kSuccess | |
kNoWork |
Definition at line 241 of file BufferManager.h.
skgpu::graphite::StaticBufferManager::StaticBufferManager | ( | ResourceProvider * | resourceProvider, |
const Caps * | caps | ||
) |
Definition at line 480 of file BufferManager.cpp.
|
default |
StaticBufferManager::FinishResult skgpu::graphite::StaticBufferManager::finalize | ( | Context * | context, |
QueueManager * | queueManager, | ||
GlobalCache * | globalCache | ||
) |
Definition at line 577 of file BufferManager.cpp.
VertexWriter skgpu::graphite::StaticBufferManager::getIndexWriter | ( | size_t | size, |
BindBufferInfo * | binding | ||
) |
Definition at line 499 of file BufferManager.cpp.
VertexWriter skgpu::graphite::StaticBufferManager::getVertexWriter | ( | size_t | size, |
BindBufferInfo * | binding | ||
) |