Lines Matching refs:paint
647 const SkPaint& paint,
657 if (paint.isDither()) {
662 const SkMaskFilterBase* mf = as_MFB(paint.getMaskFilter());
663 const auto mode = paint.asBlendMode();
675 if (!paint.getShader() && mode != SkBlendMode::kSrcOver) {
682 if (cs && !paint.getShader()) {
683 if (!paint.getColor4f().fitsInBytes() || !cs->isSRGB()) {
706 // We may tweak the original paint as we go.
707 SkTCopyOnFirstWrite<SkPaint> paint(origPaint);
709 if (auto mode = paint->asBlendMode()) {
712 switch (SkInterpretXfermode(*paint, SkColorTypeIsAlwaysOpaque(device.colorType()))) {
714 paint.writable()->setBlendMode(SkBlendMode::kSrcOver);
725 SkPaint* p = paint.writable();
733 if (paint->getColorFilter()) {
734 SkPaintPriv::RemoveColorFilter(paint.writable(), device.colorSpace());
736 SkASSERT(!paint->getColorFilter());
740 SkASSERT(!paint->getShader());
741 SkASSERT(paint->isSrcOver());
742 return alloc->make<SkA8_Coverage_Blitter>(device, *paint);
747 if (paint->isDither() && !SkPaintPriv::ShouldDither(*paint, device.colorType())) {
748 paint.writable()->setDither(false);
752 if (auto blitter = SkVMBlitter::Make(device, *paint, matrixProvider,
761 if (auto blitter = SkCreateRasterPipelineBlitter(device, *paint, matrixProvider,
765 if (auto blitter = SkVMBlitter::Make(device, *paint, matrixProvider,
774 if (clipShader || !UseLegacyBlitter(device, *paint, ctm)) {
783 SkASSERT(paint->getShader() || paint->asBlendMode() == SkBlendMode::kSrcOver);
787 if (paint->getShader()) {
788 shaderContext = as_SB(paint->getShader())->makeContext(
789 {*paint, ctm, nullptr, device.colorType(), device.colorSpace()},
801 return alloc->make<SkARGB32_Shader_Blitter>(device, *paint, shaderContext);
802 } else if (paint->getColor() == SK_ColorBLACK) {
803 return alloc->make<SkARGB32_Black_Blitter>(device, *paint);
804 } else if (paint->getAlpha() == 0xFF) {
805 return alloc->make<SkARGB32_Opaque_Blitter>(device, *paint);
807 return alloc->make<SkARGB32_Blitter>(device, *paint);
811 if (shaderContext && SkRGB565_Shader_Blitter::Supports(device, *paint)) {
812 return alloc->make<SkRGB565_Shader_Blitter>(device, *paint, shaderContext);
825 SkShaderBlitter::SkShaderBlitter(const SkPixmap& device, const SkPaint& paint,
828 , fShader(paint.getShader())