Flutter Engine
The Flutter Engine
Functions
GrSWMaskHelper.cpp File Reference
#include "src/gpu/ganesh/GrSWMaskHelper.h"
#include "include/core/SkBitmap.h"
#include "include/core/SkColor.h"
#include "include/gpu/GrRecordingContext.h"
#include "src/core/SkBlitter_A8.h"
#include "src/gpu/ganesh/GrCaps.h"
#include "src/gpu/ganesh/GrProxyProvider.h"
#include "src/gpu/ganesh/GrRecordingContextPriv.h"
#include "src/gpu/ganesh/GrTextureProxy.h"
#include "src/gpu/ganesh/SkGr.h"
#include "src/gpu/ganesh/SurfaceContext.h"
#include "src/gpu/ganesh/geometry/GrStyledShape.h"

Go to the source code of this file.

Functions

static SkPaint get_paint (GrAA aa, uint8_t alpha)
 

Function Documentation

◆ get_paint()

static SkPaint get_paint ( GrAA  aa,
uint8_t  alpha 
)
static

Definition at line 22 of file GrSWMaskHelper.cpp.

22 {
24 paint.setBlendMode(SkBlendMode::kSrc); // "Replace" mode
25 paint.setAntiAlias(GrAA::kYes == aa);
26 // SkPaint's color is unpremul so this will produce alpha in every channel.
27 paint.setColor(SkColorSetARGB(alpha, 255, 255, 255));
28 return paint;
29}
static constexpr SkColor SkColorSetARGB(U8CPU a, U8CPU r, U8CPU g, U8CPU b)
Definition: SkColor.h:49
const Paint & paint
Definition: color_source.cc:38