#include <color_filter.h>
Public Types | |
using | ColorFilterProc = std::function< Color(Color)> |
Public Member Functions | |
ColorFilter () | |
virtual | ~ColorFilter () |
virtual std::shared_ptr< ColorFilterContents > | WrapWithGPUColorFilter (std::shared_ptr< FilterInput > input, ColorFilterContents::AbsorbOpacity absorb_opacity) const =0 |
Wraps the given filter input with a GPU-based filter that will perform the color operation. The given input will first be rendered to a texture and then filtered. More... | |
virtual ColorFilterProc | GetCPUColorFilterProc () const =0 |
Returns a function that can be used to filter unpremultiplied Impeller Colors on the CPU. More... | |
virtual std::shared_ptr< ColorFilter > | Clone () const =0 |
Static Public Member Functions | |
static std::shared_ptr< ColorFilter > | MakeBlend (BlendMode blend_mode, Color color) |
static std::shared_ptr< ColorFilter > | MakeMatrix (ColorMatrix color_matrix) |
static std::shared_ptr< ColorFilter > | MakeSrgbToLinear () |
static std::shared_ptr< ColorFilter > | MakeLinearToSrgb () |
static std::shared_ptr< ColorFilter > | MakeComposed (const std::shared_ptr< ColorFilter > &outer, const std::shared_ptr< ColorFilter > &inner) |
Definition at line 19 of file color_filter.h.
using impeller::ColorFilter::ColorFilterProc = std::function<Color(Color)> |
A procedure that filters a given unpremultiplied color to produce a new unpremultiplied color.
Definition at line 25 of file color_filter.h.
|
default |
|
virtualdefault |
|
pure virtual |
|
pure virtual |
Returns a function that can be used to filter unpremultiplied Impeller Colors on the CPU.
Implemented in impeller::ComposedColorFilter, impeller::LinearToSrgbColorFilter, impeller::SrgbToLinearColorFilter, impeller::MatrixColorFilter, and impeller::BlendColorFilter.
|
static |
Definition at line 23 of file color_filter.cc.
Referenced by impeller::testing::TEST_P(), and impeller::ToColorFilter().
|
static |
Definition at line 40 of file color_filter.cc.
Referenced by impeller::Paint::GetColorFilter().
|
static |
Definition at line 36 of file color_filter.cc.
Referenced by impeller::testing::TEST_P(), and impeller::ToColorFilter().
|
static |
Definition at line 28 of file color_filter.cc.
Referenced by impeller::Paint::GetColorFilter(), impeller::testing::TEST_P(), and impeller::ToColorFilter().
|
static |
Definition at line 32 of file color_filter.cc.
Referenced by impeller::testing::TEST_P(), and impeller::ToColorFilter().
|
pure virtual |
Wraps the given filter input with a GPU-based filter that will perform the color operation. The given input will first be rendered to a texture and then filtered.
Note that this operation has no consideration for the original geometry mask of the filter input. And the entire input texture is treated as color information.
Implemented in impeller::ComposedColorFilter, impeller::LinearToSrgbColorFilter, impeller::SrgbToLinearColorFilter, impeller::MatrixColorFilter, and impeller::BlendColorFilter.