Flutter Engine
The Flutter Engine
Classes | Functions
SkBlitter_A8.h File Reference
#include "include/core/SkColor.h"
#include "include/core/SkPixmap.h"
#include "include/core/SkRefCnt.h"
#include "src/core/SkBlitter.h"
#include <cstdint>

Go to the source code of this file.

Classes

class  SkA8_Coverage_Blitter
 

Functions

SkBlitterSkA8Blitter_Choose (const SkPixmap &dst, const SkMatrix &ctm, const SkPaint &paint, SkArenaAlloc *, bool drawCoverage, sk_sp< SkShader > clipShader, const SkSurfaceProps &)
 

Function Documentation

◆ SkA8Blitter_Choose()

SkBlitter * SkA8Blitter_Choose ( const SkPixmap dst,
const SkMatrix ctm,
const SkPaint paint,
SkArenaAlloc alloc,
bool  drawCoverage,
sk_sp< SkShader clipShader,
const SkSurfaceProps  
)

Definition at line 286 of file SkBlitter_A8.cpp.

292 {
293 if (dst.colorType() != SkColorType::kAlpha_8_SkColorType) {
294 return nullptr;
295 }
296 if (paint.getShader() || paint.getColorFilter()) {
297 return nullptr;
298 }
299 if (clipShader) {
300 return nullptr; // would not be hard to support ...?
301 }
302
303 if (drawCoverage) {
304 return alloc->make<SkA8_Coverage_Blitter>(dst, paint);
305 } else {
306 // we only support certain blendmodes...
307 auto mode = paint.asBlendMode();
308 if (mode && find_a8_rowproc_pair(*mode)) {
309 return alloc->make<SkA8_Blitter>(dst, paint);
310 }
311 }
312 return nullptr;
313}
static const A8_RowBlitBWPair * find_a8_rowproc_pair(SkBlendMode bm)
@ kAlpha_8_SkColorType
pixel with alpha in 8-bit byte
Definition: SkColorType.h:21
auto make(Ctor &&ctor) -> decltype(ctor(nullptr))
Definition: SkArenaAlloc.h:120
const Paint & paint
Definition: color_source.cc:38
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive mode
Definition: switches.h:228
dst
Definition: cp.py:12