Flutter Engine
The Flutter Engine
|
#include <GrPaint.h>
Public Member Functions | |
GrPaint ()=default | |
~GrPaint ()=default | |
void | setColor4f (const SkPMColor4f &color) |
const SkPMColor4f & | getColor4f () const |
void | setXPFactory (const GrXPFactory *xpFactory) |
void | setPorterDuffXPFactory (SkBlendMode mode) |
void | setCoverageSetOpXPFactory (SkRegion::Op, bool invertCoverage=false) |
void | setColorFragmentProcessor (std::unique_ptr< GrFragmentProcessor > fp) |
void | setCoverageFragmentProcessor (std::unique_ptr< GrFragmentProcessor > fp) |
bool | hasColorFragmentProcessor () const |
int | hasCoverageFragmentProcessor () const |
int | numTotalFragmentProcessors () const |
const GrXPFactory * | getXPFactory () const |
GrFragmentProcessor * | getColorFragmentProcessor () const |
GrFragmentProcessor * | getCoverageFragmentProcessor () const |
bool | usesLocalCoords () const |
bool | isConstantBlendedColor (SkPMColor4f *constantColor) const |
bool | isTrivial () const |
Static Public Member Functions | |
static GrPaint | Clone (const GrPaint &src) |
Friends | |
class | GrProcessorSet |
void | assert_alive (GrPaint &p) |
The paint describes how color and coverage are computed at each pixel by GrContext draw functions and the how color is blended with the destination pixel.
The paint allows installation of custom color and coverage stages. New types of stages are created by subclassing GrProcessor.
The primitive color computation starts with the color specified by setColor(). This color is the input to the first color stage. Each color stage feeds its output to the next color stage.
Fractional pixel coverage follows a similar flow. The GrGeometryProcessor (specified elsewhere) provides the initial coverage which is passed to the first coverage fragment processor, which feeds its output to next coverage fragment processor.
setXPFactory is used to control blending between the output color and dest. It also implements the application of fractional coverage from the coverage pipeline.
|
default |
|
default |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
bool GrPaint::isConstantBlendedColor | ( | SkPMColor4f * | constantColor | ) | const |
Returns true if the paint's output color will be constant after blending. If the result is true, constantColor will be updated to contain the constant color. Note that we can conflate coverage and color, so the actual values written to pixels with partial coverage may still not seem constant, even if this function returns true.
Definition at line 36 of file GrPaint.cpp.
|
inline |
|
inline |
Definition at line 84 of file GrPaint.h.
|
inline |
|
inline |
|
inline |
void GrPaint::setCoverageSetOpXPFactory | ( | SkRegion::Op | regionOp, |
bool | invertCoverage = false |
||
) |
Definition at line 32 of file GrPaint.cpp.
void GrPaint::setPorterDuffXPFactory | ( | SkBlendMode | mode | ) |
Definition at line 28 of file GrPaint.cpp.
|
inline |
|
inline |
Definition at line 97 of file GrPaint.h.
|
friend |
|
friend |