Flutter Engine
The Flutter Engine
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 89 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 474 of file FactoryFunctions.cpp.

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

◆ PrecompileChildPtr() [3/5]

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

Definition at line 475 of file FactoryFunctions.cpp.

476 : fChild(std::move(cf)) {
477}

◆ PrecompileChildPtr() [4/5]

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

Definition at line 478 of file FactoryFunctions.cpp.

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

◆ PrecompileChildPtr() [5/5]

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

Definition at line 480 of file FactoryFunctions.cpp.

481 : fChild(std::move(child)) {
482 SkASSERT(precompilebase_is_valid_as_child(fChild.get()));
483}
#define SkASSERT(cond)
Definition: SkAssert.h:116

Member Function Documentation

◆ base()

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

Definition at line 104 of file FactoryFunctions.h.

104{ return fChild.get(); }

◆ blender()

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

Definition at line 513 of file FactoryFunctions.cpp.

513 {
514 return (fChild && fChild->type() == PrecompileBase::Type::kBlender)
515 ? static_cast<PrecompileBlender*>(fChild.get())
516 : nullptr;
517}

◆ colorFilter()

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

Definition at line 507 of file FactoryFunctions.cpp.

507 {
508 return (fChild && fChild->type() == PrecompileBase::Type::kColorFilter)
509 ? static_cast<PrecompileColorFilter*>(fChild.get())
510 : nullptr;
511}

◆ shader()

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

Definition at line 501 of file FactoryFunctions.cpp.

501 {
502 return (fChild && fChild->type() == PrecompileBase::Type::kShader)
503 ? static_cast<PrecompileShader*>(fChild.get())
504 : nullptr;
505}

◆ type()

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

Definition at line 485 of file FactoryFunctions.cpp.

485 {
486 if (fChild) {
487 switch (fChild->type()) {
494 default:
495 break;
496 }
497 }
498 return std::nullopt;
499}

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