Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
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 402 of file UploadTask.cpp.

408 {
409 UploadInstance instance = UploadInstance::Make(recorder, std::move(textureProxy),
410 srcColorInfo, dstColorInfo,
411 levels, dstRect, std::move(condContext));
412 if (!instance.isValid()) {
413 return false;
414 }
415
416 fInstances.emplace_back(std::move(instance));
417 return true;
418}
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 >)
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 Symbol 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: