Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Static Public Member Functions | Static Public Attributes | List of all members
SkOverdrawColorFilter Class Reference

#include <SkOverdrawColorFilter.h>

Static Public Member Functions

static sk_sp< SkColorFilterMakeWithSkColors (const SkColor[kNumColors])
 

Static Public Attributes

static constexpr int kNumColors = 6
 

Detailed Description

Uses the value in the src alpha channel to set the dst pixel. 0 -> colors[0] 1 -> colors[1] ... 5 (or larger) -> colors[5]

Definition at line 25 of file SkOverdrawColorFilter.h.

Member Function Documentation

◆ MakeWithSkColors()

sk_sp< SkColorFilter > SkOverdrawColorFilter::MakeWithSkColors ( const SkColor  colors[kNumColors])
static

Definition at line 153 of file SkRuntimeColorFilter.cpp.

153 {
154 using namespace SkKnownRuntimeEffects;
155
156 const SkRuntimeEffect* overdrawEffect = GetKnownRuntimeEffect(StableKey::kOverdraw);
157
159 SkPMColor4f* premul = (SkPMColor4f*)data->writable_data();
160 for (int i = 0; i < kNumColors; ++i) {
161 premul[i] = SkColor4f::FromColor(colors[i]).premul();
162 }
163 return overdrawEffect->makeColorFilter(std::move(data));
164}
static uint32_t premul(uint32_t color)
static sk_sp< SkData > MakeUninitialized(size_t length)
Definition SkData.cpp:116
static constexpr int kNumColors
sk_sp< SkColorFilter > makeColorFilter(sk_sp< const SkData > uniforms) const
const SkRuntimeEffect * GetKnownRuntimeEffect(StableKey stableKey)
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot data
Definition switches.h:41
SkRGBA4f< kPremul_SkAlphaType > premul() const
Definition SkColor.h:385
static SkRGBA4f FromColor(SkColor color)

Member Data Documentation

◆ kNumColors

constexpr int SkOverdrawColorFilter::kNumColors = 6
staticconstexpr

Definition at line 27 of file SkOverdrawColorFilter.h.


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