Flutter Engine
The Flutter Engine
Public Member Functions | Friends | List of all members
skgpu::graphite::UploadBufferManager Class Reference

#include <UploadBufferManager.h>

Public Member Functions

 UploadBufferManager (ResourceProvider *, const Caps *)
 
 ~UploadBufferManager ()
 
std::tuple< TextureUploadWriter, BindBufferInfogetTextureUploadWriter (size_t requiredBytes, size_t requiredAlignment)
 
void transferToRecording (Recording *)
 
void transferToCommandBuffer (CommandBuffer *)
 

Friends

class DrawBufferManager
 
class StaticBufferManager
 

Detailed Description

Definition at line 27 of file UploadBufferManager.h.

Constructor & Destructor Documentation

◆ UploadBufferManager()

skgpu::graphite::UploadBufferManager::UploadBufferManager ( ResourceProvider resourceProvider,
const Caps caps 
)

Definition at line 22 of file UploadBufferManager.cpp.

24 : fResourceProvider(resourceProvider)
25 , fMinAlignment(caps->requiredTransferBufferAlignment()) {}

◆ ~UploadBufferManager()

skgpu::graphite::UploadBufferManager::~UploadBufferManager ( )

Definition at line 27 of file UploadBufferManager.cpp.

27{}

Member Function Documentation

◆ getTextureUploadWriter()

std::tuple< TextureUploadWriter, BindBufferInfo > skgpu::graphite::UploadBufferManager::getTextureUploadWriter ( size_t  requiredBytes,
size_t  requiredAlignment 
)

Definition at line 29 of file UploadBufferManager.cpp.

30 {
31 auto[bufferMapPtr, bindInfo] = this->makeBindInfo(requiredBytes,
32 requiredAlignment,
33 "TextureUploadBuffer");
34 if (!bufferMapPtr) {
35 return {TextureUploadWriter(), BindBufferInfo()};
36 }
37
38 return {TextureUploadWriter(bufferMapPtr, requiredBytes), bindInfo};
39}

◆ transferToCommandBuffer()

void skgpu::graphite::UploadBufferManager::transferToCommandBuffer ( CommandBuffer commandBuffer)

Definition at line 117 of file UploadBufferManager.cpp.

117 {
118 for (sk_sp<Buffer>& buffer : fUsedBuffers) {
119 buffer->unmap();
120 commandBuffer->trackResource(std::move(buffer));
121 }
122 fUsedBuffers.clear();
123
124 if (fReusedBuffer) {
125 fReusedBuffer->unmap();
126 commandBuffer->trackResource(std::move(fReusedBuffer));
127 }
128}
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace buffer
Definition: switches.h:126

◆ transferToRecording()

void skgpu::graphite::UploadBufferManager::transferToRecording ( Recording recording)

Definition at line 104 of file UploadBufferManager.cpp.

104 {
105 for (sk_sp<Buffer>& buffer : fUsedBuffers) {
106 buffer->unmap();
107 recording->priv().addResourceRef(std::move(buffer));
108 }
109 fUsedBuffers.clear();
110
111 if (fReusedBuffer) {
112 fReusedBuffer->unmap();
113 recording->priv().addResourceRef(std::move(fReusedBuffer));
114 }
115}

Friends And Related Function Documentation

◆ DrawBufferManager

friend class DrawBufferManager
friend

Definition at line 40 of file UploadBufferManager.h.

◆ StaticBufferManager

friend class StaticBufferManager
friend

Definition at line 41 of file UploadBufferManager.h.


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