Lines Matching defs:paint
35 inline bool use_shader(bool textureIsAlphaOnly, const SkPaint& paint) {
36 return textureIsAlphaOnly && paint.getShader();
319 * Checks whether the paint is compatible with using SurfaceDrawContext::drawTexture. It is more
322 bool can_use_draw_texture(const SkPaint& paint, bool useCubicResampler, SkMipmapMode mm) {
323 return (!paint.getColorFilter() && !paint.getShader() && !paint.getMaskFilter() &&
324 !paint.getImageFilter() && !paint.getBlender() && !useCubicResampler &&
343 const SkPaint& paint,
373 SkPMColor4f color = texture_color(paint.getColor4f(), 1.f, srcColorInfo.colorType(), dstInfo);
385 paint.getBlendMode_or(SkBlendMode::kSrcOver),
400 paint.getBlendMode_or(SkBlendMode::kSrcOver),
417 const SkPaint& paint,
431 can_use_draw_texture(paint, sampling.useCubic, sampling.mipmap)) {
443 paint,
456 const SkMaskFilter* mf = paint.getMaskFilter();
461 bool canUseTextureCoordsAsLocalCoords = !use_shader(image.isAlphaOnly(), paint) && !mf;
514 if (const auto* shader = as_SB(paint.getShader())) {
523 // Multiply the input (paint) color by the texture (alpha)
530 rContext, sdc->colorInfo(), paint, matrixProvider, std::move(fp), &grPaint)) {
535 // Can draw the image directly (any mask filter on the paint was converted to an FP already)
578 const SkPaint& paint,
659 paint,
711 const SkPaint& paint) {
712 SkASSERT(!paint.getMaskFilter() && !paint.getImageFilter());
720 GrAA aa = fSurfaceDrawContext->chooseAA(paint);
739 paint,
759 const SkPaint& paint,
829 paint,
843 paint,
858 const SkSamplingOptions& sampling, const SkPaint& paint,
861 if (!can_use_draw_texture(paint, sampling.useCubic, sampling.mipmap)) {
862 // Send every entry through drawImageQuad() to handle the more complicated paint
869 SkTCopyOnFirstWrite<SkPaint> entryPaint(paint);
871 auto paintAlpha = paint.getAlphaf();
889 SkBlendMode mode = paint.getBlendMode_or(SkBlendMode::kSrcOver);
949 SkTCopyOnFirstWrite<SkPaint> entryPaint(paint);
951 auto paintAlpha = paint.getAlphaf();
969 textures[i].fColor = texture_color(paint.getColor4f(), set[i].fAlpha,