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

#include <UploadTask.h>

Public Member Functions

bool recordUpload (Recorder *, sk_sp< TextureProxy > targetProxy, const SkColorInfo &srcColorInfo, const SkColorInfo &dstColorInfo, SkSpan< const MipLevel > levels, const SkIRect &dstRect, std::unique_ptr< ConditionalUploadContext >)
 
int size ()
 

Friends

class UploadTask
 

Detailed Description

An UploadList is a mutable collection of UploadCommands.

Currently commands are accumulated in order and processed in the same order. Dependency management is expected to be handled by the TaskGraph.

When an upload is appended to the list its data will be copied to a Buffer in preparation for a deferred upload.

Definition at line 122 of file UploadTask.h.

Member Function Documentation

◆ recordUpload()

bool skgpu::graphite::UploadList::recordUpload ( Recorder recorder,
sk_sp< TextureProxy targetProxy,
const SkColorInfo srcColorInfo,
const SkColorInfo dstColorInfo,
SkSpan< const MipLevel levels,
const SkIRect dstRect,
std::unique_ptr< ConditionalUploadContext condContext 
)

Definition at line 405 of file UploadTask.cpp.

411 {
412 UploadInstance instance = UploadInstance::Make(recorder, std::move(textureProxy),
413 srcColorInfo, dstColorInfo,
414 levels, dstRect, std::move(condContext));
415 if (!instance.isValid()) {
416 return false;
417 }
418
419 fInstances.emplace_back(std::move(instance));
420 return true;
421}
static UploadInstance Make(Recorder *, sk_sp< TextureProxy > targetProxy, const SkColorInfo &srcColorInfo, const SkColorInfo &dstColorInfo, SkSpan< const MipLevel > levels, const SkIRect &dstRect, std::unique_ptr< ConditionalUploadContext >)
Definition: UploadTask.cpp:91
VkInstance instance
Definition: main.cc:48

◆ size()

int skgpu::graphite::UploadList::size ( )
inline

Definition at line 132 of file UploadTask.h.

132{ return fInstances.size(); }

Friends And Related Function Documentation

◆ UploadTask

friend class UploadTask
friend

Definition at line 135 of file UploadTask.h.


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