5#ifndef FLUTTER_IMPELLER_ENTITY_CONTENTS_CONTENT_CONTEXT_H_
6#define FLUTTER_IMPELLER_ENTITY_CONTENTS_CONTENT_CONTEXT_H_
8#include <initializer_list>
11#include <unordered_map>
13#include "flutter/fml/logging.h"
14#include "flutter/fml/status_or.h"
26#include "impeller/entity/border_mask_blur.frag.h"
27#include "impeller/entity/clip.frag.h"
28#include "impeller/entity/clip.vert.h"
29#include "impeller/entity/color_matrix_color_filter.frag.h"
30#include "impeller/entity/conical_gradient_fill.frag.h"
31#include "impeller/entity/fast_gradient.frag.h"
32#include "impeller/entity/fast_gradient.vert.h"
33#include "impeller/entity/filter_position.vert.h"
34#include "impeller/entity/filter_position_uv.vert.h"
35#include "impeller/entity/gaussian.frag.h"
36#include "impeller/entity/glyph_atlas.frag.h"
37#include "impeller/entity/glyph_atlas.vert.h"
38#include "impeller/entity/gradient_fill.vert.h"
39#include "impeller/entity/linear_gradient_fill.frag.h"
40#include "impeller/entity/linear_to_srgb_filter.frag.h"
41#include "impeller/entity/morphology_filter.frag.h"
42#include "impeller/entity/porter_duff_blend.frag.h"
43#include "impeller/entity/porter_duff_blend.vert.h"
44#include "impeller/entity/radial_gradient_fill.frag.h"
45#include "impeller/entity/rrect_blur.frag.h"
46#include "impeller/entity/rrect_blur.vert.h"
47#include "impeller/entity/solid_fill.frag.h"
48#include "impeller/entity/solid_fill.vert.h"
49#include "impeller/entity/srgb_to_linear_filter.frag.h"
50#include "impeller/entity/sweep_gradient_fill.frag.h"
51#include "impeller/entity/texture_fill.frag.h"
52#include "impeller/entity/texture_fill.vert.h"
53#include "impeller/entity/texture_fill_strict_src.frag.h"
54#include "impeller/entity/texture_uv_fill.vert.h"
55#include "impeller/entity/tiled_texture_fill.frag.h"
56#include "impeller/entity/yuv_to_rgb_filter.frag.h"
58#include "impeller/entity/conical_gradient_ssbo_fill.frag.h"
59#include "impeller/entity/linear_gradient_ssbo_fill.frag.h"
60#include "impeller/entity/radial_gradient_ssbo_fill.frag.h"
61#include "impeller/entity/sweep_gradient_ssbo_fill.frag.h"
63#include "impeller/entity/advanced_blend.frag.h"
64#include "impeller/entity/advanced_blend.vert.h"
66#include "impeller/entity/framebuffer_blend.frag.h"
67#include "impeller/entity/framebuffer_blend.vert.h"
69#include "impeller/entity/vertices_uber.frag.h"
71#ifdef IMPELLER_ENABLE_OPENGLES
72#include "impeller/entity/tiled_texture_fill_external.frag.h"
85 LinearGradientFillFragmentShader>;
90 RadialGradientFillFragmentShader>;
93 ConicalGradientFillFragmentShader>;
96 SweepGradientFillFragmentShader>;
99 LinearGradientSsboFillFragmentShader>;
102 ConicalGradientSsboFillFragmentShader>;
105 RadialGradientSsboFillFragmentShader>;
108 SweepGradientSsboFillFragmentShader>;
115 TextureFillStrictSrcFragmentShader>;
118 TiledTextureFillFragmentShader>;
123 BorderMaskBlurFragmentShader>;
126 MorphologyFilterFragmentShader>;
129 ColorMatrixColorFilterFragmentShader>;
132 LinearToSrgbFilterFragmentShader>;
135 SrgbToLinearFilterFragmentShader>;
138 YuvToRgbFilterFragmentShader>;
145 PorterDuffBlendFragmentShader>;
150 AdvancedBlendFragmentShader>;
153 AdvancedBlendFragmentShader>;
156 AdvancedBlendFragmentShader>;
158 AdvancedBlendFragmentShader>;
161 AdvancedBlendFragmentShader>;
164 AdvancedBlendFragmentShader>;
167 AdvancedBlendFragmentShader>;
169 AdvancedBlendFragmentShader>;
171 AdvancedBlendFragmentShader>;
174 AdvancedBlendFragmentShader>;
176 AdvancedBlendFragmentShader>;
178 AdvancedBlendFragmentShader>;
181 AdvancedBlendFragmentShader>;
183 AdvancedBlendFragmentShader>;
186 AdvancedBlendFragmentShader>;
190 FramebufferBlendFragmentShader>;
193 FramebufferBlendFragmentShader>;
196 FramebufferBlendFragmentShader>;
199 FramebufferBlendFragmentShader>;
202 FramebufferBlendFragmentShader>;
205 FramebufferBlendFragmentShader>;
208 FramebufferBlendFragmentShader>;
211 FramebufferBlendFragmentShader>;
214 FramebufferBlendFragmentShader>;
217 FramebufferBlendFragmentShader>;
220 FramebufferBlendFragmentShader>;
223 FramebufferBlendFragmentShader>;
226 FramebufferBlendFragmentShader>;
229 FramebufferBlendFragmentShader>;
232 FramebufferBlendFragmentShader>;
236 VerticesUberFragmentShader>;
238#ifdef IMPELLER_ENABLE_OPENGLES
239using TiledTextureExternalPipeline =
241 TiledTextureFillExternalFragmentShader>;
284 kCoverCompareInverted,
299 kOverdrawPreventionIncrement,
304 kOverdrawPreventionRestore,
364class RenderTargetCache;
369 std::shared_ptr<Context> context,
370 std::shared_ptr<TypographerContext> typographer_context,
371 std::shared_ptr<RenderTargetAllocator> render_target_allocator =
nullptr);
377#if IMPELLER_ENABLE_3D
378 std::shared_ptr<scene::SceneContext> GetSceneContext()
const;
385 return GetPipeline(fast_gradient_pipelines_, opts);
390 return GetPipeline(linear_gradient_fill_pipelines_, opts);
393 std::shared_ptr<Pipeline<PipelineDescriptor>>
396 return GetPipeline(linear_gradient_ssbo_fill_pipelines_, opts);
399 std::shared_ptr<Pipeline<PipelineDescriptor>>
402 return GetPipeline(radial_gradient_ssbo_fill_pipelines_, opts);
405 std::shared_ptr<Pipeline<PipelineDescriptor>>
408 return GetPipeline(conical_gradient_ssbo_fill_pipelines_, opts);
411 std::shared_ptr<Pipeline<PipelineDescriptor>>
414 return GetPipeline(sweep_gradient_ssbo_fill_pipelines_, opts);
419 return GetPipeline(radial_gradient_fill_pipelines_, opts);
424 return GetPipeline(conical_gradient_fill_pipelines_, opts);
429 return GetPipeline(rrect_blur_pipelines_, opts);
434 return GetPipeline(sweep_gradient_fill_pipelines_, opts);
439 return GetPipeline(solid_fill_pipelines_, opts);
444 return GetPipeline(texture_pipelines_, opts);
449 return GetPipeline(texture_strict_src_pipelines_, opts);
452#ifdef IMPELLER_ENABLE_OPENGLES
453 std::shared_ptr<Pipeline<PipelineDescriptor>> GetTiledTextureExternalPipeline(
457 return GetPipeline(tiled_texture_external_pipelines_, opts);
463 return GetPipeline(tiled_texture_pipelines_, opts);
468 return GetPipeline(gaussian_blur_pipelines_, opts);
473 return GetPipeline(border_mask_blur_pipelines_, opts);
478 return GetPipeline(morphology_filter_pipelines_, opts);
481 std::shared_ptr<Pipeline<PipelineDescriptor>>
483 return GetPipeline(color_matrix_color_filter_pipelines_, opts);
488 return GetPipeline(linear_to_srgb_filter_pipelines_, opts);
493 return GetPipeline(srgb_to_linear_filter_pipelines_, opts);
498 return GetPipeline(clip_pipelines_, opts);
503 return GetPipeline(glyph_atlas_pipelines_, opts);
508 return GetPipeline(yuv_to_rgb_filter_pipelines_, opts);
513 return GetPipeline(porter_duff_blend_pipelines_, opts);
520 return GetPipeline(blend_color_pipelines_, opts);
525 return GetPipeline(blend_colorburn_pipelines_, opts);
530 return GetPipeline(blend_colordodge_pipelines_, opts);
535 return GetPipeline(blend_darken_pipelines_, opts);
540 return GetPipeline(blend_difference_pipelines_, opts);
545 return GetPipeline(blend_exclusion_pipelines_, opts);
550 return GetPipeline(blend_hardlight_pipelines_, opts);
555 return GetPipeline(blend_hue_pipelines_, opts);
560 return GetPipeline(blend_lighten_pipelines_, opts);
565 return GetPipeline(blend_luminosity_pipelines_, opts);
570 return GetPipeline(blend_multiply_pipelines_, opts);
575 return GetPipeline(blend_overlay_pipelines_, opts);
580 return GetPipeline(blend_saturation_pipelines_, opts);
585 return GetPipeline(blend_screen_pipelines_, opts);
590 return GetPipeline(blend_softlight_pipelines_, opts);
594 std::shared_ptr<Pipeline<PipelineDescriptor>>
597 return GetPipeline(framebuffer_blend_color_pipelines_, opts);
600 std::shared_ptr<Pipeline<PipelineDescriptor>>
603 return GetPipeline(framebuffer_blend_colorburn_pipelines_, opts);
606 std::shared_ptr<Pipeline<PipelineDescriptor>>
609 return GetPipeline(framebuffer_blend_colordodge_pipelines_, opts);
612 std::shared_ptr<Pipeline<PipelineDescriptor>>
615 return GetPipeline(framebuffer_blend_darken_pipelines_, opts);
618 std::shared_ptr<Pipeline<PipelineDescriptor>>
621 return GetPipeline(framebuffer_blend_difference_pipelines_, opts);
624 std::shared_ptr<Pipeline<PipelineDescriptor>>
627 return GetPipeline(framebuffer_blend_exclusion_pipelines_, opts);
630 std::shared_ptr<Pipeline<PipelineDescriptor>>
633 return GetPipeline(framebuffer_blend_hardlight_pipelines_, opts);
639 return GetPipeline(framebuffer_blend_hue_pipelines_, opts);
642 std::shared_ptr<Pipeline<PipelineDescriptor>>
645 return GetPipeline(framebuffer_blend_lighten_pipelines_, opts);
648 std::shared_ptr<Pipeline<PipelineDescriptor>>
651 return GetPipeline(framebuffer_blend_luminosity_pipelines_, opts);
654 std::shared_ptr<Pipeline<PipelineDescriptor>>
657 return GetPipeline(framebuffer_blend_multiply_pipelines_, opts);
660 std::shared_ptr<Pipeline<PipelineDescriptor>>
663 return GetPipeline(framebuffer_blend_overlay_pipelines_, opts);
666 std::shared_ptr<Pipeline<PipelineDescriptor>>
669 return GetPipeline(framebuffer_blend_saturation_pipelines_, opts);
672 std::shared_ptr<Pipeline<PipelineDescriptor>>
675 return GetPipeline(framebuffer_blend_screen_pipelines_, opts);
678 std::shared_ptr<Pipeline<PipelineDescriptor>>
681 return GetPipeline(framebuffer_blend_softlight_pipelines_, opts);
686 return GetPipeline(vertices_uber_shader_, opts);
705 std::string_view label,
707 const std::shared_ptr<CommandBuffer>& command_buffer,
709 bool msaa_enabled =
true,
710 bool depth_stencil_enabled =
false,
711 int32_t mip_count = 1)
const;
715 std::string_view label,
717 const std::shared_ptr<CommandBuffer>& command_buffer,
721 return lazy_glyph_atlas_;
725 return render_target_cache_;
738 const std::string& unique_entrypoint_name,
741 create_callback)
const;
746 const std::string& unique_entrypoint_name)
const;
755 std::shared_ptr<Context> context_;
756 std::shared_ptr<LazyGlyphAtlas> lazy_glyph_atlas_;
764 void InitializeCommonlyUsedShadersIfNeeded()
const;
766 struct RuntimeEffectPipelineKey {
767 std::string unique_entrypoint_name;
778 constexpr bool operator()(
const RuntimeEffectPipelineKey& lhs,
779 const RuntimeEffectPipelineKey& rhs)
const {
780 return lhs.unique_entrypoint_name == rhs.unique_entrypoint_name &&
786 mutable std::unordered_map<RuntimeEffectPipelineKey,
787 std::shared_ptr<Pipeline<PipelineDescriptor>>,
789 RuntimeEffectPipelineKey::Equal>
790 runtime_effect_pipelines_;
805 template <
class PipelineHandleT>
808 Variants() =
default;
811 std::unique_ptr<PipelineHandleT> pipeline) {
812 pipelines_[
options] = std::move(pipeline);
815 void SetDefault(
const ContentContextOptions&
options,
816 std::unique_ptr<PipelineHandleT> pipeline) {
818 Set(
options, std::move(pipeline));
821 void CreateDefault(
const Context& context,
822 const ContentContextOptions&
options,
823 const std::initializer_list<Scalar>& constants = {}) {
824 auto desc = PipelineHandleT::Builder::MakeDefaultPipelineDescriptor(
826 if (!
desc.has_value()) {
831 SetDefault(
options, std::make_unique<PipelineHandleT>(context,
desc));
834 PipelineHandleT*
Get(
const ContentContextOptions&
options)
const {
835 if (
auto found = pipelines_.find(
options); found != pipelines_.end()) {
836 return found->second.get();
841 PipelineHandleT* GetDefault()
const {
842 if (!default_options_.has_value()) {
845 return Get(default_options_.value());
848 size_t GetPipelineCount()
const {
return pipelines_.size(); }
851 std::optional<ContentContextOptions> default_options_;
852 std::unordered_map<ContentContextOptions,
853 std::unique_ptr<PipelineHandleT>,
855 ContentContextOptions::Equal>
858 Variants(
const Variants&) =
delete;
860 Variants& operator=(
const Variants&) =
delete;
867 mutable Variants<SolidFillPipeline> solid_fill_pipelines_;
868 mutable Variants<FastGradientPipeline> fast_gradient_pipelines_;
869 mutable Variants<LinearGradientFillPipeline> linear_gradient_fill_pipelines_;
870 mutable Variants<RadialGradientFillPipeline> radial_gradient_fill_pipelines_;
871 mutable Variants<ConicalGradientFillPipeline>
872 conical_gradient_fill_pipelines_;
873 mutable Variants<SweepGradientFillPipeline> sweep_gradient_fill_pipelines_;
874 mutable Variants<LinearGradientSSBOFillPipeline>
875 linear_gradient_ssbo_fill_pipelines_;
876 mutable Variants<RadialGradientSSBOFillPipeline>
877 radial_gradient_ssbo_fill_pipelines_;
878 mutable Variants<ConicalGradientSSBOFillPipeline>
879 conical_gradient_ssbo_fill_pipelines_;
880 mutable Variants<SweepGradientSSBOFillPipeline>
881 sweep_gradient_ssbo_fill_pipelines_;
882 mutable Variants<RRectBlurPipeline> rrect_blur_pipelines_;
883 mutable Variants<TexturePipeline> texture_pipelines_;
884 mutable Variants<TextureStrictSrcPipeline> texture_strict_src_pipelines_;
885#ifdef IMPELLER_ENABLE_OPENGLES
886 mutable Variants<TiledTextureExternalPipeline>
887 tiled_texture_external_pipelines_;
889 mutable Variants<TiledTexturePipeline> tiled_texture_pipelines_;
890 mutable Variants<GaussianBlurPipeline> gaussian_blur_pipelines_;
891 mutable Variants<BorderMaskBlurPipeline> border_mask_blur_pipelines_;
892 mutable Variants<MorphologyFilterPipeline> morphology_filter_pipelines_;
893 mutable Variants<ColorMatrixColorFilterPipeline>
894 color_matrix_color_filter_pipelines_;
895 mutable Variants<LinearToSrgbFilterPipeline> linear_to_srgb_filter_pipelines_;
896 mutable Variants<SrgbToLinearFilterPipeline> srgb_to_linear_filter_pipelines_;
897 mutable Variants<ClipPipeline> clip_pipelines_;
898 mutable Variants<GlyphAtlasPipeline> glyph_atlas_pipelines_;
899 mutable Variants<YUVToRGBFilterPipeline> yuv_to_rgb_filter_pipelines_;
900 mutable Variants<PorterDuffBlendPipeline> porter_duff_blend_pipelines_;
902 mutable Variants<BlendColorPipeline> blend_color_pipelines_;
903 mutable Variants<BlendColorBurnPipeline> blend_colorburn_pipelines_;
904 mutable Variants<BlendColorDodgePipeline> blend_colordodge_pipelines_;
905 mutable Variants<BlendDarkenPipeline> blend_darken_pipelines_;
906 mutable Variants<BlendDifferencePipeline> blend_difference_pipelines_;
907 mutable Variants<BlendExclusionPipeline> blend_exclusion_pipelines_;
908 mutable Variants<BlendHardLightPipeline> blend_hardlight_pipelines_;
909 mutable Variants<BlendHuePipeline> blend_hue_pipelines_;
910 mutable Variants<BlendLightenPipeline> blend_lighten_pipelines_;
911 mutable Variants<BlendLuminosityPipeline> blend_luminosity_pipelines_;
912 mutable Variants<BlendMultiplyPipeline> blend_multiply_pipelines_;
913 mutable Variants<BlendOverlayPipeline> blend_overlay_pipelines_;
914 mutable Variants<BlendSaturationPipeline> blend_saturation_pipelines_;
915 mutable Variants<BlendScreenPipeline> blend_screen_pipelines_;
916 mutable Variants<BlendSoftLightPipeline> blend_softlight_pipelines_;
918 mutable Variants<FramebufferBlendColorPipeline>
919 framebuffer_blend_color_pipelines_;
920 mutable Variants<FramebufferBlendColorBurnPipeline>
921 framebuffer_blend_colorburn_pipelines_;
922 mutable Variants<FramebufferBlendColorDodgePipeline>
923 framebuffer_blend_colordodge_pipelines_;
924 mutable Variants<FramebufferBlendDarkenPipeline>
925 framebuffer_blend_darken_pipelines_;
926 mutable Variants<FramebufferBlendDifferencePipeline>
927 framebuffer_blend_difference_pipelines_;
928 mutable Variants<FramebufferBlendExclusionPipeline>
929 framebuffer_blend_exclusion_pipelines_;
930 mutable Variants<FramebufferBlendHardLightPipeline>
931 framebuffer_blend_hardlight_pipelines_;
932 mutable Variants<FramebufferBlendHuePipeline>
933 framebuffer_blend_hue_pipelines_;
934 mutable Variants<FramebufferBlendLightenPipeline>
935 framebuffer_blend_lighten_pipelines_;
936 mutable Variants<FramebufferBlendLuminosityPipeline>
937 framebuffer_blend_luminosity_pipelines_;
938 mutable Variants<FramebufferBlendMultiplyPipeline>
939 framebuffer_blend_multiply_pipelines_;
940 mutable Variants<FramebufferBlendOverlayPipeline>
941 framebuffer_blend_overlay_pipelines_;
942 mutable Variants<FramebufferBlendSaturationPipeline>
943 framebuffer_blend_saturation_pipelines_;
944 mutable Variants<FramebufferBlendScreenPipeline>
945 framebuffer_blend_screen_pipelines_;
946 mutable Variants<FramebufferBlendSoftLightPipeline>
947 framebuffer_blend_softlight_pipelines_;
948 mutable Variants<VerticesUberShader> vertices_uber_shader_;
950 template <
class TypedPipeline>
951 std::shared_ptr<Pipeline<PipelineDescriptor>> GetPipeline(
952 Variants<TypedPipeline>& container,
953 ContentContextOptions opts)
const {
954 TypedPipeline* pipeline = CreateIfNeeded(container, opts);
958 return pipeline->WaitAndGet();
961 template <
class RenderPipelineHandleT>
962 RenderPipelineHandleT* CreateIfNeeded(
963 Variants<RenderPipelineHandleT>& container,
964 ContentContextOptions opts)
const {
970 opts.wireframe =
true;
973 if (RenderPipelineHandleT* found = container.Get(opts)) {
977 RenderPipelineHandleT* default_handle = container.GetDefault();
982 std::shared_ptr<Pipeline<PipelineDescriptor>> pipeline =
983 default_handle->WaitAndGet();
988 auto variant_future = pipeline->CreateVariant(
989 false, [&opts, variants_count = container.GetPipelineCount()](
990 PipelineDescriptor&
desc) {
991 opts.ApplyToPipelineDescriptor(desc);
993 SPrintF(
"%s V#%zu", desc.GetLabel().c_str(), variants_count));
995 std::unique_ptr<RenderPipelineHandleT> variant =
996 std::make_unique<RenderPipelineHandleT>(std::move(variant_future));
997 container.Set(opts, std::move(variant));
998 return container.Get(opts);
1001 bool is_valid_ =
false;
1002 std::shared_ptr<Tessellator> tessellator_;
1003#if IMPELLER_ENABLE_3D
1004 std::shared_ptr<scene::SceneContext> scene_context_;
1006 std::shared_ptr<RenderTargetAllocator> render_target_cache_;
1007 std::shared_ptr<HostBuffer> host_buffer_;
1008 std::shared_ptr<Texture> empty_texture_;
1009 bool wireframe_ =
false;
std::shared_ptr< Pipeline< PipelineDescriptor > > GetFramebufferBlendColorDodgePipeline(ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > GetConicalGradientSSBOFillPipeline(ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > GetFramebufferBlendColorBurnPipeline(ContentContextOptions opts) const
void ClearCachedRuntimeEffectPipeline(const std::string &unique_entrypoint_name) const
std::shared_ptr< Pipeline< PipelineDescriptor > > GetFramebufferBlendMultiplyPipeline(ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > GetLinearGradientSSBOFillPipeline(ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > GetRadialGradientFillPipeline(ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > GetBlendSoftLightPipeline(ContentContextOptions opts) const
std::shared_ptr< Tessellator > GetTessellator() const
std::shared_ptr< Pipeline< PipelineDescriptor > > GetFramebufferBlendHuePipeline(ContentContextOptions opts) const
std::shared_ptr< Texture > GetEmptyTexture() const
std::shared_ptr< Pipeline< PipelineDescriptor > > GetBlendScreenPipeline(ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > GetBlendSaturationPipeline(ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > GetBorderMaskBlurPipeline(ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > GetTiledTexturePipeline(ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > GetFramebufferBlendDifferencePipeline(ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > GetSweepGradientFillPipeline(ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > GetBlendDarkenPipeline(ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > GetFramebufferBlendDarkenPipeline(ContentContextOptions opts) const
const std::shared_ptr< RenderTargetAllocator > & GetRenderTargetCache() const
std::shared_ptr< Pipeline< PipelineDescriptor > > GetFramebufferBlendExclusionPipeline(ContentContextOptions opts) const
ContentContext(std::shared_ptr< Context > context, std::shared_ptr< TypographerContext > typographer_context, std::shared_ptr< RenderTargetAllocator > render_target_allocator=nullptr)
std::shared_ptr< Pipeline< PipelineDescriptor > > GetBlendOverlayPipeline(ContentContextOptions opts) const
const std::shared_ptr< LazyGlyphAtlas > & GetLazyGlyphAtlas() const
fml::StatusOr< RenderTarget > MakeSubpass(std::string_view label, ISize texture_size, const std::shared_ptr< CommandBuffer > &command_buffer, const SubpassCallback &subpass_callback, bool msaa_enabled=true, bool depth_stencil_enabled=false, int32_t mip_count=1) const
Creates a new texture of size texture_size and calls subpass_callback with a RenderPass for drawing t...
const Capabilities & GetDeviceCapabilities() const
std::shared_ptr< Pipeline< PipelineDescriptor > > GetRadialGradientSSBOFillPipeline(ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > GetFramebufferBlendSaturationPipeline(ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > GetFramebufferBlendOverlayPipeline(ContentContextOptions opts) const
HostBuffer & GetTransientsBuffer() const
Retrieve the currnent host buffer for transient storage.
std::shared_ptr< Pipeline< PipelineDescriptor > > GetFramebufferBlendHardLightPipeline(ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > GetTexturePipeline(ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > GetBlendLuminosityPipeline(ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > GetGaussianBlurPipeline(ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > GetFramebufferBlendColorPipeline(ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > GetBlendHuePipeline(ContentContextOptions opts) const
void SetWireframe(bool wireframe)
std::shared_ptr< Pipeline< PipelineDescriptor > > GetGlyphAtlasPipeline(ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > GetFastGradientPipeline(ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > GetFramebufferBlendLuminosityPipeline(ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > GetCachedRuntimeEffectPipeline(const std::string &unique_entrypoint_name, const ContentContextOptions &options, const std::function< std::shared_ptr< Pipeline< PipelineDescriptor > >()> &create_callback) const
std::shared_ptr< Pipeline< PipelineDescriptor > > GetDrawVerticesUberShader(ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > GetLinearToSrgbFilterPipeline(ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > GetBlendColorBurnPipeline(ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > GetBlendColorDodgePipeline(ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > GetBlendColorPipeline(ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > GetBlendExclusionPipeline(ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > GetFramebufferBlendLightenPipeline(ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > GetSrgbToLinearFilterPipeline(ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > GetSolidFillPipeline(ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > GetColorMatrixColorFilterPipeline(ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > GetConicalGradientFillPipeline(ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > GetBlendDifferencePipeline(ContentContextOptions opts) const
std::function< bool(const ContentContext &, RenderPass &)> SubpassCallback
std::shared_ptr< Pipeline< PipelineDescriptor > > GetBlendHardLightPipeline(ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > GetRRectBlurPipeline(ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > GetClipPipeline(ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > GetLinearGradientFillPipeline(ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > GetYUVToRGBFilterPipeline(ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > GetMorphologyFilterPipeline(ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > GetPorterDuffBlendPipeline(ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > GetBlendMultiplyPipeline(ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > GetFramebufferBlendScreenPipeline(ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > GetSweepGradientSSBOFillPipeline(ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > GetTextureStrictSrcPipeline(ContentContextOptions opts) const
std::shared_ptr< Context > GetContext() const
std::shared_ptr< Pipeline< PipelineDescriptor > > GetBlendLightenPipeline(ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > GetFramebufferBlendSoftLightPipeline(ContentContextOptions opts) const
Render passes encode render commands directed as one specific render target into an underlying comman...
#define FML_CHECK(condition)
#define FML_DCHECK(condition)
Dart_NativeFunction function
const GrXPFactory * Get(SkBlendMode mode)
static uint32_t Hash(uint32_t key)
constexpr std::size_t HashCombine()
PrimitiveType
Decides how backend draws pixels based on input vertices.
PixelFormat
The Pixel formats supported by Impeller. The naming convention denotes the usage of the component,...
@ kAlways
Comparison test passes always passes.
constexpr bool operator()(const ContentContextOptions &lhs, const ContentContextOptions &rhs) const
constexpr uint64_t operator()(const ContentContextOptions &o) const
PrimitiveType primitive_type
bool has_depth_stencil_attachments
void ApplyToPipelineDescriptor(PipelineDescriptor &desc) const
PixelFormat color_attachment_pixel_format
bool is_for_rrect_blur_clear
CompareFunction depth_compare
constexpr bool operator()(const RuntimeEffectPipelineKey &lhs, const RuntimeEffectPipelineKey &rhs) const
std::size_t operator()(const RuntimeEffectPipelineKey &key) const