Flutter Engine
The Flutter Engine
Public Types | Public Member Functions | Static Public Member Functions | List of all members
sk_gpu_test::LazyYUVImage Class Reference

#include <YUVUtils.h>

Public Types

enum class  Type { kFromPixmaps , kFromGenerator , kFromTextures , kFromImages }
 

Public Member Functions

SkISize dimensions () const
 
sk_sp< SkImagerefImage (GrRecordingContext *rContext, Type)
 

Static Public Member Functions

static std::unique_ptr< LazyYUVImageMake (sk_sp< SkData > data, skgpu::Mipmapped=skgpu::Mipmapped::kNo, sk_sp< SkColorSpace >=nullptr)
 
static std::unique_ptr< LazyYUVImageMake (SkYUVAPixmaps, skgpu::Mipmapped=skgpu::Mipmapped::kNo, sk_sp< SkColorSpace >=nullptr)
 

Detailed Description

Definition at line 40 of file YUVUtils.h.

Member Enumeration Documentation

◆ Type

Enumerator
kFromPixmaps 
kFromGenerator 
kFromTextures 
kFromImages 

Definition at line 50 of file YUVUtils.h.

50{ kFromPixmaps, kFromGenerator, kFromTextures, kFromImages };

Member Function Documentation

◆ dimensions()

SkISize sk_gpu_test::LazyYUVImage::dimensions ( ) const
inline

Definition at line 52 of file YUVUtils.h.

52{ return fPixmaps.yuvaInfo().dimensions(); }
SkISize dimensions() const
Definition: SkYUVAInfo.h:171
const SkYUVAInfo & yuvaInfo() const

◆ Make() [1/2]

std::unique_ptr< LazyYUVImage > sk_gpu_test::LazyYUVImage::Make ( sk_sp< SkData data,
skgpu::Mipmapped  mipmapped = skgpu::Mipmapped::kNo,
sk_sp< SkColorSpace cs = nullptr 
)
static

Definition at line 200 of file YUVUtils.cpp.

202 {
203 std::unique_ptr<LazyYUVImage> image(new LazyYUVImage());
204 if (image->reset(std::move(data), mipmapped, std::move(cs))) {
205 return image;
206 } else {
207 return nullptr;
208 }
209}
sk_sp< const SkImage > image
Definition: SkRecords.h:269
std::shared_ptr< const fml::Mapping > data
Definition: texture_gles.cc:63

◆ Make() [2/2]

std::unique_ptr< LazyYUVImage > sk_gpu_test::LazyYUVImage::Make ( SkYUVAPixmaps  pixmaps,
skgpu::Mipmapped  mipmapped = skgpu::Mipmapped::kNo,
sk_sp< SkColorSpace cs = nullptr 
)
static

Definition at line 211 of file YUVUtils.cpp.

213 {
214 std::unique_ptr<LazyYUVImage> image(new LazyYUVImage());
215 if (image->reset(std::move(pixmaps), mipmapped, std::move(cs))) {
216 return image;
217 } else {
218 return nullptr;
219 }
220}

◆ refImage()

sk_sp< SkImage > sk_gpu_test::LazyYUVImage::refImage ( GrRecordingContext rContext,
Type  type 
)

Definition at line 222 of file YUVUtils.cpp.

222 {
223 if (this->ensureYUVImage(rContext, type)) {
224 size_t idx = static_cast<size_t>(type);
225 SkASSERT(idx < std::size(fYUVImage));
226 return fYUVImage[idx];
227 } else {
228 return nullptr;
229 }
230}
#define SkASSERT(cond)
Definition: SkAssert.h:116
GLenum type
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
Definition: switches.h:259

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