Flutter Engine
The Flutter Engine
Functions
SkSVGFeBlend.cpp File Reference
#include "include/core/SkBlendMode.h"
#include "include/effects/SkImageFilters.h"
#include "modules/svg/include/SkSVGAttributeParser.h"
#include "modules/svg/include/SkSVGFeBlend.h"
#include "modules/svg/include/SkSVGFilterContext.h"
#include "modules/svg/include/SkSVGRenderContext.h"
#include "modules/svg/include/SkSVGValue.h"

Go to the source code of this file.

Functions

static SkBlendMode GetBlendMode (SkSVGFeBlend::Mode mode)
 
template<>
bool SkSVGAttributeParser::parse< SkSVGFeBlend::Mode > (SkSVGFeBlend::Mode *mode)
 

Function Documentation

◆ GetBlendMode()

static SkBlendMode GetBlendMode ( SkSVGFeBlend::Mode  mode)
static

Definition at line 22 of file SkSVGFeBlend.cpp.

22 {
23 switch (mode) {
34 }
35
37}
#define SkUNREACHABLE
Definition: SkAssert.h:135
@ kLighten
rc = s + d - min(s*da, d*sa), ra = kSrcOver
@ kMultiply
r = s*(1-da) + d*(1-sa) + s*d
@ kScreen
r = s + d - s*d
@ kSrcOver
r = s + (1-sa)*d
@ kDarken
rc = s + d - max(s*da, d*sa), ra = kSrcOver
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 mode
Definition: switches.h:228

◆ SkSVGAttributeParser::parse< SkSVGFeBlend::Mode >()

Definition at line 50 of file SkSVGFeBlend.cpp.

51 {
52 static constexpr std::tuple<const char*, SkSVGFeBlend::Mode> gMap[] = {
53 { "normal" , SkSVGFeBlend::Mode::kNormal },
54 { "multiply", SkSVGFeBlend::Mode::kMultiply },
55 { "screen" , SkSVGFeBlend::Mode::kScreen },
56 { "darken" , SkSVGFeBlend::Mode::kDarken },
57 { "lighten" , SkSVGFeBlend::Mode::kLighten },
58 };
59
60 return this->parseEnumMap(gMap, mode) && this->parseEOSToken();
61}