Flutter Engine
The Flutter Engine
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)
PODArray< SkColor > colors
Definition: SkRecords.h:276
std::shared_ptr< const fml::Mapping > data
Definition: texture_gles.cc:63

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: