#include <content_context.h>
Public Types | |
enum class | StencilMode : uint8_t { kIgnore , kStencilNonZeroFill , kStencilEvenOddFill , kCoverCompare , kCoverCompareInverted , kOverdrawPreventionIncrement , kOverdrawPreventionRestore } |
Public Member Functions | |
constexpr uint64_t | ToKey () const |
void | ApplyToPipelineDescriptor (PipelineDescriptor &desc) const |
Pipeline state configuration.
Each unique combination of these options requires a different pipeline state object to be built. This struct is used as a key for the per-pipeline variant cache.
When adding fields to this key, reliant features should take care to limit the combinatorical explosion of variations. A sufficiently complicated Flutter application may easily require building hundreds of PSOs in total, but they shouldn't require e.g. 10s of thousands.
Definition at line 40 of file content_context.h.
|
strong |
Definition at line 41 of file content_context.h.
void impeller::ContentContextOptions::ApplyToPipelineDescriptor | ( | PipelineDescriptor & | desc | ) | const |
Definition at line 310 of file content_context.cc.
References impeller::ColorAttachmentDescriptor::alpha_blend_op, blend_mode, impeller::ColorAttachmentDescriptor::blending_enabled, impeller::PipelineDescriptor::ClearDepthAttachment(), impeller::PipelineDescriptor::ClearStencilAttachments(), color_attachment_pixel_format, impeller::ColorAttachmentDescriptor::color_blend_op, impeller::DepthAttachmentDescriptor::depth_compare, depth_compare, impeller::StencilAttachmentDescriptor::depth_stencil_pass, impeller::DepthAttachmentDescriptor::depth_write_enabled, depth_write_enabled, impeller::ColorAttachmentDescriptor::dst_alpha_blend_factor, impeller::ColorAttachmentDescriptor::dst_color_blend_factor, impeller::ColorAttachmentDescriptor::format, impeller::PipelineDescriptor::GetColorAttachmentDescriptor(), impeller::PipelineDescriptor::GetDepthStencilAttachmentDescriptor(), impeller::PipelineDescriptor::GetFrontStencilAttachmentDescriptor(), has_depth_stencil_attachments, is_for_rrect_blur_clear, impeller::kAdd, impeller::kAll, impeller::kAlways, impeller::kClear, kCoverCompare, kCoverCompareInverted, impeller::kDecrementWrap, impeller::kDestinationAlpha, impeller::kDestinationColor, impeller::kDst, impeller::kDstATop, impeller::kDstIn, impeller::kDstOut, impeller::kDstOver, impeller::kEqual, impeller::kFill, kIgnore, impeller::kIncrementClamp, impeller::kIncrementWrap, impeller::kKeep, impeller::Entity::kLastPipelineBlendMode, impeller::kLess, impeller::kModulate, impeller::kNone, impeller::kNotEqual, impeller::kOne, impeller::kOneMinusDestinationAlpha, impeller::kOneMinusSourceAlpha, kOverdrawPreventionIncrement, kOverdrawPreventionRestore, impeller::kPlus, impeller::kReverseSubtract, impeller::kSetToReferenceValue, impeller::kSourceAlpha, impeller::kSourceColor, impeller::kSrc, impeller::kSrcATop, impeller::kSrcIn, impeller::kSrcOut, impeller::kSrcOver, kStencilEvenOddFill, kStencilNonZeroFill, impeller::kXor, impeller::kZero, primitive_type, sample_count, impeller::PipelineDescriptor::SetColorAttachmentDescriptor(), impeller::PipelineDescriptor::SetDepthStencilAttachmentDescriptor(), impeller::PipelineDescriptor::SetPolygonMode(), impeller::PipelineDescriptor::SetPrimitiveType(), impeller::PipelineDescriptor::SetSampleCount(), impeller::PipelineDescriptor::SetStencilAttachmentDescriptors(), impeller::ColorAttachmentDescriptor::src_alpha_blend_factor, impeller::ColorAttachmentDescriptor::src_color_blend_factor, impeller::StencilAttachmentDescriptor::stencil_compare, impeller::StencilAttachmentDescriptor::stencil_failure, stencil_mode, VALIDATION_LOG, and impeller::ColorAttachmentDescriptor::write_mask.
|
inlineconstexpr |
Definition at line 103 of file content_context.h.
References blend_mode, color_attachment_pixel_format, depth_compare, depth_write_enabled, has_depth_stencil_attachments, is_for_rrect_blur_clear, primitive_type, sample_count, and stencil_mode.
Referenced by impeller::testing::TEST_P().
BlendMode impeller::ContentContextOptions::blend_mode = BlendMode::kSrcOver |
Definition at line 94 of file content_context.h.
Referenced by ApplyToPipelineDescriptor(), impeller::OptionsFromPassAndEntity(), impeller::testing::TEST_P(), and ToKey().
PixelFormat impeller::ContentContextOptions::color_attachment_pixel_format = PixelFormat::kUnknown |
Definition at line 98 of file content_context.h.
Referenced by ApplyToPipelineDescriptor(), impeller::RuntimeEffectContents::BootstrapShader(), impeller::OptionsFromPass(), and ToKey().
CompareFunction impeller::ContentContextOptions::depth_compare = CompareFunction::kAlways |
Definition at line 95 of file content_context.h.
Referenced by ApplyToPipelineDescriptor(), impeller::OptionsFromPass(), and ToKey().
bool impeller::ContentContextOptions::depth_write_enabled = false |
Definition at line 100 of file content_context.h.
Referenced by ApplyToPipelineDescriptor(), and ToKey().
bool impeller::ContentContextOptions::has_depth_stencil_attachments = true |
Definition at line 99 of file content_context.h.
Referenced by ApplyToPipelineDescriptor(), impeller::OptionsFromPass(), impeller::testing::TEST_P(), and ToKey().
bool impeller::ContentContextOptions::is_for_rrect_blur_clear = false |
Definition at line 101 of file content_context.h.
Referenced by ApplyToPipelineDescriptor(), impeller::SolidRRectLikeBlurContents::Render(), and ToKey().
PrimitiveType impeller::ContentContextOptions::primitive_type = PrimitiveType::kTriangle |
Definition at line 97 of file content_context.h.
Referenced by ApplyToPipelineDescriptor(), impeller::SolidRRectLikeBlurContents::Render(), impeller::testing::TEST_P(), and ToKey().
SampleCount impeller::ContentContextOptions::sample_count = SampleCount::kCount1 |
Definition at line 93 of file content_context.h.
Referenced by ApplyToPipelineDescriptor(), impeller::ContentContext::ContentContext(), impeller::CreateDefaultPipeline(), impeller::OptionsFromPass(), and ToKey().
StencilMode impeller::ContentContextOptions::stencil_mode = ContentContextOptions::StencilMode::kIgnore |
Definition at line 96 of file content_context.h.
Referenced by ApplyToPipelineDescriptor(), impeller::OptionsFromPass(), and ToKey().