Flutter Engine
The Flutter Engine
Public Member Functions | Static Public Member Functions | List of all members
SkRasterPipelineBlitter Class Referencefinal
Inheritance diagram for SkRasterPipelineBlitter:
SkBlitter

Public Member Functions

 SkRasterPipelineBlitter (SkPixmap dst, SkArenaAlloc *alloc)
 
void blitH (int x, int y, int w) override
 Blit a horizontal run of one or more pixels. More...
 
void blitAntiH (int x, int y, const SkAlpha[], const int16_t[]) override
 
void blitAntiH2 (int x, int y, U8CPU a0, U8CPU a1) override
 
void blitAntiV2 (int x, int y, U8CPU a0, U8CPU a1) override
 
void blitMask (const SkMask &, const SkIRect &clip) override
 
void blitRect (int x, int y, int width, int height) override
 Blit a solid rectangle one or more pixels wide. More...
 
void blitV (int x, int y, int height, SkAlpha alpha) override
 Blit a vertical run of pixels with a constant alpha value. More...
 
- Public Member Functions inherited from SkBlitter
virtual ~SkBlitter ()
 
virtual void blitH (int x, int y, int width)=0
 Blit a horizontal run of one or more pixels. More...
 
virtual void blitAntiH (int x, int y, const SkAlpha antialias[], const int16_t runs[])=0
 
virtual void blitV (int x, int y, int height, SkAlpha alpha)
 Blit a vertical run of pixels with a constant alpha value. More...
 
virtual void blitRect (int x, int y, int width, int height)
 Blit a solid rectangle one or more pixels wide. More...
 
virtual void blitAntiRect (int x, int y, int width, int height, SkAlpha leftAlpha, SkAlpha rightAlpha)
 
void blitFatAntiRect (const SkRect &rect)
 
virtual void blitMask (const SkMask &, const SkIRect &clip)
 
virtual void blitAntiH2 (int x, int y, U8CPU a0, U8CPU a1)
 
virtual void blitAntiV2 (int x, int y, U8CPU a0, U8CPU a1)
 
virtual bool isNullBlitter () const
 
virtual int requestRowsPreserved () const
 
virtual void * allocBlitMemory (size_t sz)
 
void blitRectRegion (const SkIRect &rect, const SkRegion &clip)
 
void blitRegion (const SkRegion &clip)
 

Static Public Member Functions

static SkBlitterCreate (const SkPixmap &dst, const SkPaint &paint, const SkColor4f &dstPaintColor, SkArenaAlloc *alloc, const SkRasterPipeline &shaderPipeline, bool is_opaque, bool is_constant, const SkShader *clipShader)
 
- Static Public Member Functions inherited from SkBlitter
static bool UseLegacyBlitter (const SkPixmap &, const SkPaint &, const SkMatrix &)
 
static SkBlitterChoose (const SkPixmap &dst, const SkMatrix &ctm, const SkPaint &paint, SkArenaAlloc *, bool drawCoverage, sk_sp< SkShader > clipShader, const SkSurfaceProps &props)
 
static SkBlitterChooseSprite (const SkPixmap &dst, const SkPaint &, const SkPixmap &src, int left, int top, SkArenaAlloc *, sk_sp< SkShader > clipShader)
 

Additional Inherited Members

- Protected Attributes inherited from SkBlitter
SkAutoMalloc fBlitMemory
 

Detailed Description

Definition at line 47 of file SkRasterPipelineBlitter.cpp.

Constructor & Destructor Documentation

◆ SkRasterPipelineBlitter()

SkRasterPipelineBlitter::SkRasterPipelineBlitter ( SkPixmap  dst,
SkArenaAlloc alloc 
)
inline

Definition at line 59 of file SkRasterPipelineBlitter.cpp.

61 : fDst(std::move(dst))
62 , fAlloc(alloc)
63 , fColorPipeline(alloc)
64 , fBlendPipeline(alloc)
65 {}
dst
Definition: cp.py:12

Member Function Documentation

◆ blitAntiH()

void SkRasterPipelineBlitter::blitAntiH ( int  x,
int  y,
const  antialias[],
const int16_t  runs[] 
)
overridevirtual

Blit a horizontal run of antialiased pixels; runs[] is a sparse zero-terminated run-length encoding of spans of constant alpha values. The runs[] and antialias[] work together to represent long runs of pixels with the same alphas. The runs[] contains the number of pixels with the same alpha, and antialias[] contain the coverage value for that number of pixels. The runs[] (and antialias[]) are encoded in a clever way. The runs array is zero terminated, and has enough entries for each pixel plus one, in most cases some of the entries will not contain valid data. An entry in the runs array contains the number of pixels (np) that have the same alpha value. The next np value is found np entries away. For example, if runs[0] = 7, then the next valid entry will by at runs[7]. The runs array and antialias[] are coupled by index. So, if the np entry is at runs[45] = 12 then the alpha value can be found at antialias[45] = 0x88. This would mean to use an alpha value of 0x88 for the next 12 pixels starting at pixel 45.

Implements SkBlitter.

Definition at line 433 of file SkRasterPipelineBlitter.cpp.

433 {
434 if (!fBlitAntiH) {
435 SkRasterPipeline p(fAlloc);
436 p.extend(fColorPipeline);
437 p.appendClampIfNormalized(fDst.info());
438 if (fBlendMode.has_value() &&
439 SkBlendMode_ShouldPreScaleCoverage(*fBlendMode, /*rgb_coverage=*/false)) {
440 p.append(SkRasterPipelineOp::scale_1_float, &fCurrentCoverage);
441 this->appendClipScale(&p);
442 this->appendLoadDst(&p);
443 p.extend(fBlendPipeline);
444 } else {
445 this->appendLoadDst(&p);
446 p.extend(fBlendPipeline);
447 p.append(SkRasterPipelineOp::lerp_1_float, &fCurrentCoverage);
448 this->appendClipLerp(&p);
449 }
450
451 this->appendStore(&p);
452 fBlitAntiH = p.compile();
453 }
454
455 for (int16_t run = *runs; run > 0; run = *runs) {
456 switch (*aa) {
457 case 0x00: break;
458 case 0xff:this->blitRectWithTrace(x,y,run, 1, false); break;
459 default:
460 fCurrentCoverage = *aa * (1/255.0f);
461 fBlitAntiH(x,y,run,1);
462 }
463 x += run;
464 runs += run;
465 aa += run;
466 }
467}
bool SkBlendMode_ShouldPreScaleCoverage(SkBlendMode mode, bool rgb_coverage)
Definition: SkBlendMode.cpp:21
const SkImageInfo & info() const
Definition: SkPixmap.h:135
double y
double x
Definition: run.py:1
def run(cmd)
Definition: run.py:14

◆ blitAntiH2()

void SkRasterPipelineBlitter::blitAntiH2 ( int  x,
int  y,
U8CPU  a0,
U8CPU  a1 
)
overridevirtual

Reimplemented from SkBlitter.

Definition at line 469 of file SkRasterPipelineBlitter.cpp.

469 {
470 SkIRect clip = {x,y, x+2,y+1};
471 uint8_t coverage[] = { (uint8_t)a0, (uint8_t)a1 };
473 this->blitMask(mask, clip);
474}
static SkPath clip(const SkPath &path, const SkHalfPlane &plane)
Definition: SkPath.cpp:3892
void blitMask(const SkMask &, const SkIRect &clip) override
Definition: SkRect.h:32
Definition: SkMask.h:25
@ kA8_Format
8bits per pixel mask (e.g. antialiasing)
Definition: SkMask.h:28

◆ blitAntiV2()

void SkRasterPipelineBlitter::blitAntiV2 ( int  x,
int  y,
U8CPU  a0,
U8CPU  a1 
)
overridevirtual

Reimplemented from SkBlitter.

Definition at line 476 of file SkRasterPipelineBlitter.cpp.

476 {
477 SkIRect clip = {x,y, x+1,y+2};
478 uint8_t coverage[] = { (uint8_t)a0, (uint8_t)a1 };
480 this->blitMask(mask, clip);
481}

◆ blitH()

void SkRasterPipelineBlitter::blitH ( int  x,
int  y,
int  width 
)
overridevirtual

Blit a horizontal run of one or more pixels.

Implements SkBlitter.

Definition at line 387 of file SkRasterPipelineBlitter.cpp.

387 {
388 this->blitRect(x,y,w,1);
389}
void blitRect(int x, int y, int width, int height) override
Blit a solid rectangle one or more pixels wide.
SkScalar w

◆ blitMask()

void SkRasterPipelineBlitter::blitMask ( const SkMask mask,
const SkIRect clip 
)
overridevirtual

Blit a pattern of pixels defined by a rectangle-clipped mask; typically used for text.

Reimplemented from SkBlitter.

Definition at line 491 of file SkRasterPipelineBlitter.cpp.

491 {
492 if (mask.fFormat == SkMask::kBW_Format) {
493 // TODO: native BW masks?
494 return INHERITED::blitMask(mask, clip);
495 }
496
497 // ARGB and SDF masks shouldn't make it here.
500 || mask.fFormat == SkMask::k3D_Format);
501
502 auto extract_mask_plane = [&mask](int plane, SkRasterPipeline_MemoryCtx* ctx) {
503 // LCD is 16-bit per pixel; A8 and 3D are 8-bit per pixel.
504 size_t bpp = mask.fFormat == SkMask::kLCD16_Format ? 2 : 1;
505
506 // Select the right mask plane. Usually plane == 0 and this is just mask.fImage.
507 auto ptr = (uintptr_t)mask.fImage
508 + plane * mask.computeImageSize();
509
510 // Update ctx to point "into" this current mask, but lined up with fDstPtr at (0,0).
511 // This sort of trickery upsets UBSAN (pointer-overflow) so our ptr must be a uintptr_t.
512 // mask.fRowBytes is a uint32_t, which would break our addressing math on 64-bit builds.
513 size_t rowBytes = mask.fRowBytes;
514 ctx->stride = rowBytes / bpp;
515 ctx->pixels = (void*)(ptr - mask.fBounds.left() * bpp
516 - mask.fBounds.top() * rowBytes);
517 };
518
519 extract_mask_plane(0, &fMaskPtr);
520 if (mask.fFormat == SkMask::k3D_Format) {
521 extract_mask_plane(1, &fEmbossCtx.mul);
522 extract_mask_plane(2, &fEmbossCtx.add);
523 }
524
525 // Lazily build whichever pipeline we need, specialized for each mask format.
526 if (mask.fFormat == SkMask::kA8_Format && !fBlitMaskA8) {
527 SkRasterPipeline p(fAlloc);
528 p.extend(fColorPipeline);
529 p.appendClampIfNormalized(fDst.info());
530 if (fBlendMode.has_value() &&
531 SkBlendMode_ShouldPreScaleCoverage(*fBlendMode, /*rgb_coverage=*/false)) {
532 p.append(SkRasterPipelineOp::scale_u8, &fMaskPtr);
533 this->appendClipScale(&p);
534 this->appendLoadDst(&p);
535 p.extend(fBlendPipeline);
536 } else {
537 this->appendLoadDst(&p);
538 p.extend(fBlendPipeline);
539 p.append(SkRasterPipelineOp::lerp_u8, &fMaskPtr);
540 this->appendClipLerp(&p);
541 }
542 this->appendStore(&p);
543 fBlitMaskA8 = p.compile();
544 }
545 if (mask.fFormat == SkMask::kLCD16_Format && !fBlitMaskLCD16) {
546 SkRasterPipeline p(fAlloc);
547 p.extend(fColorPipeline);
548 p.appendClampIfNormalized(fDst.info());
549 if (fBlendMode.has_value() &&
550 SkBlendMode_ShouldPreScaleCoverage(*fBlendMode, /*rgb_coverage=*/true)) {
551 // Somewhat unusually, scale_565 needs dst loaded first.
552 this->appendLoadDst(&p);
553 p.append(SkRasterPipelineOp::scale_565, &fMaskPtr);
554 this->appendClipScale(&p);
555 p.extend(fBlendPipeline);
556 } else {
557 this->appendLoadDst(&p);
558 p.extend(fBlendPipeline);
559 p.append(SkRasterPipelineOp::lerp_565, &fMaskPtr);
560 this->appendClipLerp(&p);
561 }
562 this->appendStore(&p);
563 fBlitMaskLCD16 = p.compile();
564 }
565 if (mask.fFormat == SkMask::k3D_Format && !fBlitMask3D) {
566 SkRasterPipeline p(fAlloc);
567 p.extend(fColorPipeline);
568 // This bit is where we differ from kA8_Format:
569 p.append(SkRasterPipelineOp::emboss, &fEmbossCtx);
570 // Now onward just as kA8.
571 p.appendClampIfNormalized(fDst.info());
572 if (fBlendMode.has_value() &&
573 SkBlendMode_ShouldPreScaleCoverage(*fBlendMode, /*rgb_coverage=*/false)) {
574 p.append(SkRasterPipelineOp::scale_u8, &fMaskPtr);
575 this->appendClipScale(&p);
576 this->appendLoadDst(&p);
577 p.extend(fBlendPipeline);
578 } else {
579 this->appendLoadDst(&p);
580 p.extend(fBlendPipeline);
581 p.append(SkRasterPipelineOp::lerp_u8, &fMaskPtr);
582 this->appendClipLerp(&p);
583 }
584 this->appendStore(&p);
585 fBlitMask3D = p.compile();
586 }
587
588 std::function<void(size_t,size_t,size_t,size_t)>* blitter = nullptr;
589 switch (mask.fFormat) {
590 case SkMask::kA8_Format: blitter = &fBlitMaskA8; break;
591 case SkMask::kLCD16_Format: blitter = &fBlitMaskLCD16; break;
592 case SkMask::k3D_Format: blitter = &fBlitMask3D; break;
593 default:
594 SkASSERT(false);
595 return;
596 }
597
598 SkASSERT(blitter);
599 (*blitter)(clip.left(),clip.top(), clip.width(),clip.height());
600}
#define SkASSERT(cond)
Definition: SkAssert.h:116
virtual void blitMask(const SkMask &, const SkIRect &clip)
Definition: SkBlitter.cpp:201
Dart_NativeFunction function
Definition: fuchsia.cc:51
constexpr int32_t top() const
Definition: SkRect.h:120
constexpr int32_t left() const
Definition: SkRect.h:113
const uint32_t fRowBytes
Definition: SkMask.h:43
@ k3D_Format
3 8bit per pixl planes: alpha, mul, add
Definition: SkMask.h:29
@ kLCD16_Format
565 alpha for r/g/b
Definition: SkMask.h:31
@ kBW_Format
1bit per pixel mask (e.g. monochrome)
Definition: SkMask.h:27
uint8_t const *const fImage
Definition: SkMask.h:41
const SkIRect fBounds
Definition: SkMask.h:42
size_t computeImageSize() const
Definition: SkMask.cpp:30
const Format fFormat
Definition: SkMask.h:44
SkRasterPipeline_MemoryCtx add
SkRasterPipeline_MemoryCtx mul

◆ blitRect()

void SkRasterPipelineBlitter::blitRect ( int  x,
int  y,
int  width,
int  height 
)
overridevirtual

Blit a solid rectangle one or more pixels wide.

Reimplemented from SkBlitter.

Definition at line 391 of file SkRasterPipelineBlitter.cpp.

391 {
392 this->blitRectWithTrace(x, y, w, h, true);
393}
SkScalar h

◆ blitV()

void SkRasterPipelineBlitter::blitV ( int  x,
int  y,
int  height,
SkAlpha  alpha 
)
overridevirtual

Blit a vertical run of pixels with a constant alpha value.

Reimplemented from SkBlitter.

Definition at line 483 of file SkRasterPipelineBlitter.cpp.

483 {
484 SkIRect clip = {x,y, x+1,y+height};
485 SkMask mask(&alpha, clip,
486 0, // so we reuse the 1 "row" for all of height
488 this->blitMask(mask, clip);
489}
int32_t height

◆ Create()

SkBlitter * SkRasterPipelineBlitter::Create ( const SkPixmap dst,
const SkPaint paint,
const SkColor4f dstPaintColor,
SkArenaAlloc alloc,
const SkRasterPipeline shaderPipeline,
bool  is_opaque,
bool  is_constant,
const SkShader clipShader 
)
static

Definition at line 175 of file SkRasterPipelineBlitter.cpp.

182 {
183 auto blitter = alloc->make<SkRasterPipelineBlitter>(dst, alloc);
184
185 // Our job in this factory is to fill out the blitter's color and blend pipelines.
186 // The color pipeline is the common front of the full blit pipeline. The blend pipeline is just
187 // the portion that does the actual blending math (and assumes that src and dst are already
188 // loaded).
189 //
190 // The full blit pipelines are each constructed lazily on first use, and include the color
191 // pipeline, reading the dst, the blend pipeline, coverage, dithering, and writing the dst.
192
193 // Start with the color pipeline
194 auto colorPipeline = &blitter->fColorPipeline;
195
196 if (clipShader) {
197 auto clipP = colorPipeline;
199 SkColorSpace* clipCS = nullptr;
200 SkSurfaceProps props{}; // default OK; clipShader doesn't render text
201 SkStageRec rec = {clipP, alloc, clipCT, clipCS, SkColors::kBlack, props};
202 if (as_SB(clipShader)->appendRootStages(rec, SkMatrix::I())) {
203 struct Storage {
204 // large enough for highp (float) or lowp(U16)
206 };
207 auto storage = alloc->make<Storage>();
208 clipP->append(SkRasterPipelineOp::store_src_a, storage->fA);
209 blitter->fClipShaderBuffer = storage->fA;
210 is_constant = false;
211 } else {
212 return nullptr;
213 }
214 }
215
216 // Let's get the shader in first.
217 colorPipeline->extend(shaderPipeline);
218
219 // If there's a color filter it comes next.
220 if (auto colorFilter = paint.getColorFilter()) {
221 SkSurfaceProps props{}; // default OK; colorFilter doesn't render text
222 SkStageRec rec = {
223 colorPipeline, alloc, dst.colorType(), dst.colorSpace(), dstPaintColor, props};
224 if (!as_CFB(colorFilter)->appendStages(rec, is_opaque)) {
225 return nullptr;
226 }
227 is_opaque = is_opaque && as_CFB(colorFilter)->isAlphaUnchanged();
228 }
229
230 // Not all formats make sense to dither (think, F16). We set their dither rate
231 // to zero. We only dither non-constant shaders, so is_constant won't change here.
232 if (paint.isDither() && !is_constant) {
233 switch (dst.info().colorType()) {
235 blitter->fDitherRate = 1 / 15.0f;
236 break;
238 blitter->fDitherRate = 1 / 63.0f;
239 break;
246 blitter->fDitherRate = 1 / 255.0f;
247 break;
254 blitter->fDitherRate = 1 / 1023.0f;
255 break;
256
269 blitter->fDitherRate = 0.0f;
270 break;
271 }
272 if (blitter->fDitherRate > 0.0f) {
273 colorPipeline->append(SkRasterPipelineOp::dither, &blitter->fDitherRate);
274 }
275 }
276
277 // Optimization: A pipeline that's still constant here can collapse back into a constant color.
278 if (is_constant) {
279 SkColor4f constantColor;
280 SkRasterPipeline_MemoryCtx constantColorPtr = { &constantColor, 0 };
281 // We could remove this clamp entirely, but if the destination is 8888, doing the clamp
282 // here allows the color pipeline to still run in lowp (we'll use uniform_color, rather than
283 // unbounded_uniform_color).
284 colorPipeline->appendClampIfNormalized(dst.info());
285 colorPipeline->append(SkRasterPipelineOp::store_f32, &constantColorPtr);
286 colorPipeline->run(0,0,1,1);
287 colorPipeline->reset();
288 colorPipeline->appendConstantColor(alloc, constantColor);
289
290 is_opaque = constantColor.fA == 1.0f;
291 }
292
293 // Now we'll build the blend pipeline
294 auto blendPipeline = &blitter->fBlendPipeline;
295
296 sk_sp<SkBlender> blender = paint.refBlender();
297 if (!blender) {
299 }
300
301 // We can strength-reduce SrcOver into Src when opaque.
302 if (is_opaque && as_BB(blender)->asBlendMode() == SkBlendMode::kSrcOver) {
304 }
305
306 // When we're drawing a constant color in Src mode, we can sometimes just memset.
307 // (The previous two optimizations help find more opportunities for this one.)
308 if (is_constant && as_BB(blender)->asBlendMode() == SkBlendMode::kSrc &&
309 dst.info().bytesPerPixel() <= static_cast<int>(sizeof(blitter->fMemsetColor))) {
310 // Run our color pipeline all the way through to produce what we'd memset when we can.
311 // Not all blits can memset, so we need to keep colorPipeline too.
313 p.extend(*colorPipeline);
314 blitter->fDstPtr = SkRasterPipeline_MemoryCtx{&blitter->fMemsetColor, 0};
315 blitter->appendStore(&p);
316 p.run(0,0,1,1);
317
318 switch (blitter->fDst.shiftPerPixel()) {
319 case 0: blitter->fMemset2D = [](SkPixmap* dst, int x,int y, int w,int h, uint64_t c) {
320 void* p = dst->writable_addr(x,y);
321 while (h --> 0) {
322 memset(p, c, w);
323 p = SkTAddOffset<void>(p, dst->rowBytes());
324 }
325 }; break;
326
327 case 1: blitter->fMemset2D = [](SkPixmap* dst, int x,int y, int w,int h, uint64_t c) {
328 SkOpts::rect_memset16(dst->writable_addr16(x,y), c, w, dst->rowBytes(), h);
329 }; break;
330
331 case 2: blitter->fMemset2D = [](SkPixmap* dst, int x,int y, int w,int h, uint64_t c) {
332 SkOpts::rect_memset32(dst->writable_addr32(x,y), c, w, dst->rowBytes(), h);
333 }; break;
334
335 case 3: blitter->fMemset2D = [](SkPixmap* dst, int x,int y, int w,int h, uint64_t c) {
336 SkOpts::rect_memset64(dst->writable_addr64(x,y), c, w, dst->rowBytes(), h);
337 }; break;
338
339 // TODO(F32)?
340 }
341 }
342
343 {
344 SkSurfaceProps props{}; // default OK; blender doesn't render text
345 SkStageRec rec = {
346 blendPipeline, alloc, dst.colorType(), dst.colorSpace(), dstPaintColor, props};
347 if (!as_BB(blender)->appendStages(rec)) {
348 return nullptr;
349 }
350 blitter->fBlendMode = as_BB(blender)->asBlendMode();
351 }
352
353 blitter->fDstPtr = SkRasterPipeline_MemoryCtx{
354 blitter->fDst.writable_addr(),
355 blitter->fDst.rowBytesAsPixels(),
356 };
357
358 return blitter;
359}
@ kSrcOver
r = s + (1-sa)*d
SkBlenderBase * as_BB(SkBlender *blend)
Definition: SkBlenderBase.h:69
static SkColorFilterBase * as_CFB(SkColorFilter *filter)
SkColorType
Definition: SkColorType.h:19
@ kR16G16B16A16_unorm_SkColorType
pixel with a little endian uint16_t for red, green, blue
Definition: SkColorType.h:50
@ kRGBA_10x6_SkColorType
pixel with 10 used bits (most significant) followed by 6 unused
Definition: SkColorType.h:33
@ kR8_unorm_SkColorType
Definition: SkColorType.h:54
@ kBGR_101010x_SkColorType
pixel with 10 bits each for blue, green, red; in 32-bit word
Definition: SkColorType.h:30
@ kARGB_4444_SkColorType
pixel with 4 bits for alpha, red, green, blue; in 16-bit word
Definition: SkColorType.h:23
@ kR8G8_unorm_SkColorType
pixel with a uint8_t for red and green
Definition: SkColorType.h:43
@ kBGRA_8888_SkColorType
pixel with 8 bits for blue, green, red, alpha; in 32-bit word
Definition: SkColorType.h:26
@ kA16_unorm_SkColorType
pixel with a little endian uint16_t for alpha
Definition: SkColorType.h:48
@ kRGBA_F16_SkColorType
pixel with half floats for red, green, blue, alpha;
Definition: SkColorType.h:38
@ kAlpha_8_SkColorType
pixel with alpha in 8-bit byte
Definition: SkColorType.h:21
@ kRGB_101010x_SkColorType
pixel with 10 bits each for red, green, blue; in 32-bit word
Definition: SkColorType.h:29
@ kSRGBA_8888_SkColorType
Definition: SkColorType.h:53
@ kGray_8_SkColorType
pixel with grayscale level in 8-bit byte
Definition: SkColorType.h:35
@ kRGB_565_SkColorType
pixel with 5 bits red, 6 bits green, 5 bits blue, in 16-bit word
Definition: SkColorType.h:22
@ kBGRA_10101010_XR_SkColorType
pixel with 10 bits each for blue, green, red, alpha; in 64-bit word, extended range
Definition: SkColorType.h:32
@ kRGBA_8888_SkColorType
pixel with 8 bits for red, green, blue, alpha; in 32-bit word
Definition: SkColorType.h:24
@ kRGB_888x_SkColorType
pixel with 8 bits each for red, green, blue; in 32-bit word
Definition: SkColorType.h:25
@ kBGRA_1010102_SkColorType
10 bits for blue, green, red; 2 bits for alpha; in 32-bit word
Definition: SkColorType.h:28
@ kA16_float_SkColorType
pixel with a half float for alpha
Definition: SkColorType.h:45
@ kRGBA_F32_SkColorType
pixel using C float for red, green, blue, alpha; in 128-bit word
Definition: SkColorType.h:40
@ kRGBA_1010102_SkColorType
10 bits for red, green, blue; 2 bits for alpha; in 32-bit word
Definition: SkColorType.h:27
@ kBGR_101010x_XR_SkColorType
pixel with 10 bits each for blue, green, red; in 32-bit word, extended range
Definition: SkColorType.h:31
@ kR16G16_unorm_SkColorType
pixel with a little endian uint16_t for red and green
Definition: SkColorType.h:49
@ kRGBA_F16Norm_SkColorType
pixel with half floats in [0,1] for red, green, blue, alpha;
Definition: SkColorType.h:36
@ kUnknown_SkColorType
uninitialized
Definition: SkColorType.h:20
@ kR16G16_float_SkColorType
pixel with a half float for red and green
Definition: SkColorType.h:46
static constexpr int SkRasterPipeline_kMaxStride
SkShaderBase * as_SB(SkShader *shader)
Definition: SkShaderBase.h:412
auto make(Ctor &&ctor) -> decltype(ctor(nullptr))
Definition: SkArenaAlloc.h:120
virtual std::optional< SkBlendMode > asBlendMode() const
Definition: SkBlenderBase.h:45
static sk_sp< SkBlender > Mode(SkBlendMode mode)
virtual bool appendStages(const SkStageRec &rec, bool shaderIsOpaque) const =0
bool isAlphaUnchanged() const
static const SkMatrix & I()
Definition: SkMatrix.cpp:1544
bool appendRootStages(const SkStageRec &rec, const SkMatrix &ctm) const
const Paint & paint
Definition: color_source.cc:38
constexpr SkColor4f kBlack
Definition: SkColor.h:435
void(* rect_memset32)(uint32_t[], uint32_t, int, size_t, int)
void(* rect_memset16)(uint16_t[], uint16_t, int, size_t, int)
void(* rect_memset64)(uint64_t[], uint64_t, int, size_t, int)

The documentation for this class was generated from the following file: