40 bool withPrimitiveBlender,
43 if (!(r->drawTypes() & drawTypes)) {
47 if (r->emitsPrimitiveColor() != withPrimitiveBlender) {
59 for (
auto&&
s : r->steps()) {
60 SkASSERT(!
s->performsShading() ||
s->emitsPrimitiveColor() == withPrimitiveBlender);
63 : UniquePaintParamsID::InvalidID();
72 SKGPU_LOG_W(
"Failed to create GraphicsPipeline in precompile!");
95 SKGPU_LOG_W(
"Failed to create GraphicsPipeline in precompile!");
107 auto rtEffectDict = std::make_unique<RuntimeEffectDictionary>();
111 caps, dict, rtEffectDict.get(), ci,
nullptr, {0, 0});
124 for (
bool withPrimitiveBlender : {
true,
false }) {
127 withPrimitiveBlender,
138 bool withPrimitiveBlender,
140 const Caps* caps = keyContext.
caps();
164 { .0f, .0f, .0f, .0f },
172 { .0f, .0f, .0f, .0f },
180 { .0f, .0f, .0f, .0f },
188 { .0f, .0f, .0f, .0f },
193 options.priv().buildCombinations(
197 withPrimitiveBlender,
201 bool withPrimitiveBlender,
209 withPrimitiveBlender,
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
#define SKGPU_LOG_W(fmt,...)
@ kPremul_SkAlphaType
pixel components are premultiplied by alpha
@ kRGBA_8888_SkColorType
pixel with 8 bits for red, green, blue, alpha; in 32-bit word
SkColorType colorType() const
skgpu::Swizzle getWriteSwizzle(SkColorType, const TextureInfo &) const
virtual TextureInfo getDefaultSampledTextureInfo(SkColorType, Mipmapped mipmapped, Protected, Renderable) const =0
const RendererProvider * rendererProvider() const
const Caps * caps() const
ResourceProvider * resourceProvider() const
const ShaderCodeDictionary * shaderCodeDictionary() const
RuntimeEffectDictionary * rtEffectDict() const
const SkColorInfo & dstColorInfo() const
const Caps * caps() const
SkSpan< const Renderer *const > renderers() const
sk_sp< GraphicsPipeline > findOrCreateGraphicsPipeline(const RuntimeEffectDictionary *, const GraphicsPipelineDesc &, const RenderPassDesc &)
void Precompile(Context *context, const PaintOptions &paintOptions, DrawTypeFlags drawTypes=kMostCommon)
void PrecompileCombinations(Context *context, const PaintOptions &options, const KeyContext &keyContext, DrawTypeFlags drawTypes, bool withPrimitiveBlender, Coverage coverage)
static RenderPassDesc Make(const Caps *caps, const TextureInfo &targetInfo, LoadOp loadOp, StoreOp storeOp, SkEnumBitMask< DepthStencilFlags > depthStencilFlags, const std::array< float, 4 > &clearColor, bool requiresMSAA, Swizzle writeSwizzle)