Flutter Engine
The Flutter Engine
Functions
GrBlendFragmentProcessor Namespace Reference

Functions

std::unique_ptr< GrFragmentProcessorMake (std::unique_ptr< GrFragmentProcessor > src, std::unique_ptr< GrFragmentProcessor > dst, SkBlendMode mode, bool shareBlendLogic=true)
 
template<SkBlendMode mode>
std::unique_ptr< GrFragmentProcessorMake (std::unique_ptr< GrFragmentProcessor > src, std::unique_ptr< GrFragmentProcessor > dst)
 

Function Documentation

◆ Make() [1/2]

template<SkBlendMode mode>
std::unique_ptr< GrFragmentProcessor > GrBlendFragmentProcessor::Make ( std::unique_ptr< GrFragmentProcessor src,
std::unique_ptr< GrFragmentProcessor dst 
)

Blends src and dst inputs according to the blend mode. If either input is null, fInputColor is used instead. Hard-wires a single blend mode into the code (slightly reducing complexity).

Definition at line 36 of file GrBlendFragmentProcessor.h.

37 {
38 return Make(std::move(src), std::move(dst), mode, /*shareBlendLogic=*/false);
39}
std::unique_ptr< GrFragmentProcessor > Make(std::unique_ptr< GrFragmentProcessor > src, std::unique_ptr< GrFragmentProcessor > dst)
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
dst
Definition: cp.py:12

◆ Make() [2/2]

std::unique_ptr< GrFragmentProcessor > GrBlendFragmentProcessor::Make ( std::unique_ptr< GrFragmentProcessor src,
std::unique_ptr< GrFragmentProcessor dst,
SkBlendMode  mode,
bool  shareBlendLogic = true 
)

Blends src and dst inputs according to the blend mode. If either input is null, fInputColor is used instead.

  • When shareBlendLogic is false, the blend function logic is written directly into the code.
  • When shareBlendLogic is true, most Porter-Duff blends share the same code, and a uniform is used to pick the blend type. This can reduce our overall shader count.

Definition at line 272 of file GrBlendFragmentProcessor.cpp.

276 {
277 // These modes simplify dramatically in the shader, but only if we bypass the shared logic:
279 shareBlendLogic = false;
280 }
281
282 return BlendFragmentProcessor::Make(std::move(src), std::move(dst), mode, shareBlendLogic);
283}
@ kClear
r = 0
static std::unique_ptr< GrFragmentProcessor > Make(std::unique_ptr< GrFragmentProcessor > src, std::unique_ptr< GrFragmentProcessor > dst, SkBlendMode mode, bool shareBlendLogic)