Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | List of all members
skgpu::graphite::PrecompileChildPtr Class Reference

#include <FactoryFunctions.h>

Public Member Functions

 PrecompileChildPtr ()=default
 
 PrecompileChildPtr (sk_sp< PrecompileShader >)
 
 PrecompileChildPtr (sk_sp< PrecompileColorFilter >)
 
 PrecompileChildPtr (sk_sp< PrecompileBlender >)
 
 PrecompileChildPtr (sk_sp< PrecompileBase >)
 
std::optional< SkRuntimeEffect::ChildTypetype () const
 
PrecompileShadershader () const
 
PrecompileColorFiltercolorFilter () const
 
PrecompileBlenderblender () const
 
PrecompileBasebase () const
 

Detailed Description

Definition at line 168 of file FactoryFunctions.h.

Constructor & Destructor Documentation

◆ PrecompileChildPtr() [1/5]

skgpu::graphite::PrecompileChildPtr::PrecompileChildPtr ( )
default

◆ PrecompileChildPtr() [2/5]

skgpu::graphite::PrecompileChildPtr::PrecompileChildPtr ( sk_sp< PrecompileShader s)

Definition at line 1301 of file FactoryFunctions.cpp.

1301: fChild(std::move(s)) {}
struct MyStruct s

◆ PrecompileChildPtr() [3/5]

skgpu::graphite::PrecompileChildPtr::PrecompileChildPtr ( sk_sp< PrecompileColorFilter cf)

Definition at line 1302 of file FactoryFunctions.cpp.

1303 : fChild(std::move(cf)) {
1304}

◆ PrecompileChildPtr() [4/5]

skgpu::graphite::PrecompileChildPtr::PrecompileChildPtr ( sk_sp< PrecompileBlender b)

Definition at line 1305 of file FactoryFunctions.cpp.

1305: fChild(std::move(b)) {}
static bool b

◆ PrecompileChildPtr() [5/5]

skgpu::graphite::PrecompileChildPtr::PrecompileChildPtr ( sk_sp< PrecompileBase child)

Definition at line 1307 of file FactoryFunctions.cpp.

1308 : fChild(std::move(child)) {
1309 SkASSERT(precompilebase_is_valid_as_child(fChild.get()));
1310}
#define SkASSERT(cond)
Definition SkAssert.h:116

Member Function Documentation

◆ base()

PrecompileBase * skgpu::graphite::PrecompileChildPtr::base ( ) const
inline

Definition at line 183 of file FactoryFunctions.h.

183{ return fChild.get(); }

◆ blender()

PrecompileBlender * skgpu::graphite::PrecompileChildPtr::blender ( ) const

Definition at line 1340 of file FactoryFunctions.cpp.

1340 {
1341 return (fChild && fChild->type() == PrecompileBase::Type::kBlender)
1342 ? static_cast<PrecompileBlender*>(fChild.get())
1343 : nullptr;
1344}

◆ colorFilter()

PrecompileColorFilter * skgpu::graphite::PrecompileChildPtr::colorFilter ( ) const

Definition at line 1334 of file FactoryFunctions.cpp.

1334 {
1335 return (fChild && fChild->type() == PrecompileBase::Type::kColorFilter)
1336 ? static_cast<PrecompileColorFilter*>(fChild.get())
1337 : nullptr;
1338}

◆ shader()

PrecompileShader * skgpu::graphite::PrecompileChildPtr::shader ( ) const

Definition at line 1328 of file FactoryFunctions.cpp.

1328 {
1329 return (fChild && fChild->type() == PrecompileBase::Type::kShader)
1330 ? static_cast<PrecompileShader*>(fChild.get())
1331 : nullptr;
1332}

◆ type()

std::optional< SkRuntimeEffect::ChildType > skgpu::graphite::PrecompileChildPtr::type ( ) const

Definition at line 1312 of file FactoryFunctions.cpp.

1312 {
1313 if (fChild) {
1314 switch (fChild->type()) {
1316 return SkRuntimeEffect::ChildType::kShader;
1318 return SkRuntimeEffect::ChildType::kColorFilter;
1320 return SkRuntimeEffect::ChildType::kBlender;
1321 default:
1322 break;
1323 }
1324 }
1325 return std::nullopt;
1326}

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