Flutter Engine
The Flutter Engine
Public Member Functions | Friends | List of all members
skif::Context Class Reference

#include <SkImageFilterTypes.h>

Public Member Functions

 Context (sk_sp< Backend > backend, const Mapping &mapping, const LayerSpace< SkIRect > &desiredOutput, const FilterResult &source, const SkColorSpace *colorSpace, Stats *stats)
 
const Backendbackend () const
 
const Mappingmapping () const
 
const LayerSpace< SkIRect > & desiredOutput () const
 
SkColorSpacecolorSpace () const
 
sk_sp< SkColorSpacerefColorSpace () const
 
const FilterResultsource () const
 
Context withNewMapping (const Mapping &mapping) const
 
Context withNewDesiredOutput (const LayerSpace< SkIRect > &desiredOutput) const
 
Context withNewColorSpace (SkColorSpace *cs) const
 
Context withNewSource (const FilterResult &source) const
 
void markVisitedImageFilter () const
 
void markCacheHit () const
 
void markNewSurface () const
 
void markShaderBasedTilingRequired (SkTileMode tileMode) const
 

Friends

class ::FilterResultTestAccess
 

Detailed Description

Definition at line 1145 of file SkImageFilterTypes.h.

Constructor & Destructor Documentation

◆ Context()

skif::Context::Context ( sk_sp< Backend backend,
const Mapping mapping,
const LayerSpace< SkIRect > &  desiredOutput,
const FilterResult source,
const SkColorSpace colorSpace,
Stats stats 
)
inline

Definition at line 1147 of file SkImageFilterTypes.h.

1153 : fBackend(std::move(backend))
1154 , fMapping(mapping)
1155 , fDesiredOutput(desiredOutput)
1156 , fSource(source)
1157 , fColorSpace(sk_ref_sp(colorSpace))
1158 , fStats(stats) {}
sk_sp< T > sk_ref_sp(T *obj)
Definition: SkRefCnt.h:381
const Backend * backend() const
SkColorSpace * colorSpace() const
const LayerSpace< SkIRect > & desiredOutput() const
const FilterResult & source() const
const Mapping & mapping() const
dictionary stats
Definition: malisc.py:20

Member Function Documentation

◆ backend()

const Backend * skif::Context::backend ( ) const
inline

Definition at line 1160 of file SkImageFilterTypes.h.

1160{ return fBackend.get(); }

◆ colorSpace()

SkColorSpace * skif::Context::colorSpace ( ) const
inline

Definition at line 1180 of file SkImageFilterTypes.h.

1180{ return fColorSpace.get(); }
T * get() const
Definition: SkRefCnt.h:303

◆ desiredOutput()

const LayerSpace< SkIRect > & skif::Context::desiredOutput ( ) const
inline

Definition at line 1176 of file SkImageFilterTypes.h.

1176{ return fDesiredOutput; }

◆ mapping()

const Mapping & skif::Context::mapping ( ) const
inline

Definition at line 1171 of file SkImageFilterTypes.h.

1171{ return fMapping; }

◆ markCacheHit()

void skif::Context::markCacheHit ( ) const
inline

Definition at line 1224 of file SkImageFilterTypes.h.

1224 {
1225 if (fStats) {
1226 fStats->fNumCacheHits++;
1227 }
1228 }

◆ markNewSurface()

void skif::Context::markNewSurface ( ) const
inline

Definition at line 1229 of file SkImageFilterTypes.h.

1229 {
1230 if (fStats) {
1231 fStats->fNumOffscreenSurfaces++;
1232 }
1233 }

◆ markShaderBasedTilingRequired()

void skif::Context::markShaderBasedTilingRequired ( SkTileMode  tileMode) const
inline

Definition at line 1234 of file SkImageFilterTypes.h.

1234 {
1235 if (fStats) {
1236 if (tileMode == SkTileMode::kClamp) {
1237 fStats->fNumShaderClampedDraws++;
1238 } else {
1240 }
1241 }
1242 }

◆ markVisitedImageFilter()

void skif::Context::markVisitedImageFilter ( ) const
inline

Definition at line 1219 of file SkImageFilterTypes.h.

1219 {
1220 if (fStats) {
1221 fStats->fNumVisitedImageFilters++;
1222 }
1223 }

◆ refColorSpace()

sk_sp< SkColorSpace > skif::Context::refColorSpace ( ) const
inline

Definition at line 1181 of file SkImageFilterTypes.h.

1181{ return fColorSpace; }

◆ source()

const FilterResult & skif::Context::source ( ) const
inline

Definition at line 1188 of file SkImageFilterTypes.h.

1188{ return fSource; }

◆ withNewColorSpace()

Context skif::Context::withNewColorSpace ( SkColorSpace cs) const
inline

Definition at line 1204 of file SkImageFilterTypes.h.

1204 {
1205 Context c = *this;
1206 c.fColorSpace = sk_ref_sp(cs);
1207 return c;
1208 }

◆ withNewDesiredOutput()

Context skif::Context::withNewDesiredOutput ( const LayerSpace< SkIRect > &  desiredOutput) const
inline

Definition at line 1198 of file SkImageFilterTypes.h.

1198 {
1199 Context c = *this;
1200 c.fDesiredOutput = desiredOutput;
1201 return c;
1202 }

◆ withNewMapping()

Context skif::Context::withNewMapping ( const Mapping mapping) const
inline

Definition at line 1192 of file SkImageFilterTypes.h.

1192 {
1193 Context c = *this;
1194 c.fMapping = mapping;
1195 return c;
1196 }

◆ withNewSource()

Context skif::Context::withNewSource ( const FilterResult source) const
inline

Definition at line 1211 of file SkImageFilterTypes.h.

1211 {
1212 Context c = *this;
1213 c.fSource = source;
1214 return c;
1215 }

Friends And Related Function Documentation

◆ ::FilterResultTestAccess

friend class ::FilterResultTestAccess
friend

Definition at line 1245 of file SkImageFilterTypes.h.


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