Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
SkCommandLineConfig Class Reference

#include <CommonFlagsConfig.h>

Inheritance diagram for SkCommandLineConfig:
SkCommandLineConfigGpu SkCommandLineConfigSvg

Public Member Functions

 SkCommandLineConfig (const SkString &tag, const SkString &backend, const skia_private::TArray< SkString > &viaParts)
 
virtual ~SkCommandLineConfig ()
 
virtual const SkCommandLineConfigGpuasConfigGpu () const
 
virtual const SkCommandLineConfigGraphite * asConfigGraphite () const
 
virtual const SkCommandLineConfigSvgasConfigSvg () const
 
const SkStringgetTag () const
 
const SkStringgetBackend () const
 
sk_sp< SkColorSpacerefColorSpace () const
 
const skia_private::TArray< SkString > & getViaParts () const
 

Detailed Description

Definition at line 27 of file CommonFlagsConfig.h.

Constructor & Destructor Documentation

◆ SkCommandLineConfig()

SkCommandLineConfig::SkCommandLineConfig ( const SkString tag,
const SkString backend,
const skia_private::TArray< SkString > &  viaParts 
)

Definition at line 256 of file CommonFlagsConfig.cpp.

259 : fTag(tag), fBackend(backend) {
260 static const auto* kColorSpaces = new std::unordered_map<std::string_view, SkColorSpace*>{
261 {"narrow", // 'narrow' has a gamut narrower than sRGB, and different transfer function.
263 {"srgb",
265 {"srgb2", // The same as "srgb" but works around ignoring prior images in Gold
267 {"linear",
269 {"p3",
271 {"spin",
273 {"rec2020",
275 };
276
277 // Strip off any via parts that refer to color spaces (and remember the last one we see)
278 for (const SkString& via : viaParts) {
279 auto it = kColorSpaces->find(via.c_str());
280 if (it == kColorSpaces->end()) {
281 fViaParts.push_back(via);
282 } else {
283 fColorSpace = sk_ref_sp(it->second);
284 }
285 }
286}
const char * backend
static constexpr skcms_Matrix3x3 gNarrow_toXYZD50
sk_sp< T > sk_ref_sp(T *obj)
Definition: SkRefCnt.h:381
static sk_sp< SkColorSpace > MakeSRGB()
sk_sp< SkColorSpace > makeColorSpin() const
static sk_sp< SkColorSpace > MakeRGB(const skcms_TransferFunction &transferFn, const skcms_Matrix3x3 &toXYZ)
static sk_sp< SkColorSpace > MakeSRGBLinear()
T * release()
Definition: SkRefCnt.h:324
static constexpr skcms_Matrix3x3 kRec2020
Definition: SkColorSpace.h:93
static constexpr skcms_Matrix3x3 kDisplayP3
Definition: SkColorSpace.h:87
static constexpr skcms_TransferFunction kRec2020
Definition: SkColorSpace.h:54
static constexpr skcms_TransferFunction k2Dot2
Definition: SkColorSpace.h:48
static constexpr skcms_TransferFunction kSRGB
Definition: SkColorSpace.h:45

◆ ~SkCommandLineConfig()

SkCommandLineConfig::~SkCommandLineConfig ( )
virtual

Definition at line 288 of file CommonFlagsConfig.cpp.

288{}

Member Function Documentation

◆ asConfigGpu()

virtual const SkCommandLineConfigGpu * SkCommandLineConfig::asConfigGpu ( ) const
inlinevirtual

Reimplemented in SkCommandLineConfigGpu.

Definition at line 33 of file CommonFlagsConfig.h.

33{ return nullptr; }

◆ asConfigGraphite()

virtual const SkCommandLineConfigGraphite * SkCommandLineConfig::asConfigGraphite ( ) const
inlinevirtual

Definition at line 34 of file CommonFlagsConfig.h.

34{ return nullptr; }

◆ asConfigSvg()

virtual const SkCommandLineConfigSvg * SkCommandLineConfig::asConfigSvg ( ) const
inlinevirtual

Reimplemented in SkCommandLineConfigSvg.

Definition at line 35 of file CommonFlagsConfig.h.

35{ return nullptr; }

◆ getBackend()

const SkString & SkCommandLineConfig::getBackend ( ) const
inline

Definition at line 37 of file CommonFlagsConfig.h.

37{ return fBackend; }

◆ getTag()

const SkString & SkCommandLineConfig::getTag ( ) const
inline

Definition at line 36 of file CommonFlagsConfig.h.

36{ return fTag; }

◆ getViaParts()

const skia_private::TArray< SkString > & SkCommandLineConfig::getViaParts ( ) const
inline

Definition at line 39 of file CommonFlagsConfig.h.

39{ return fViaParts; }

◆ refColorSpace()

sk_sp< SkColorSpace > SkCommandLineConfig::refColorSpace ( ) const
inline

Definition at line 38 of file CommonFlagsConfig.h.

38{ return fColorSpace; }

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