| Flutter Impeller |

pipelines.h
Go to the documentation of this file.
1 // Copyright 2013 The Flutter Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef FLUTTER_IMPELLER_ENTITY_CONTENTS_PIPELINES_H_
6 #define FLUTTER_IMPELLER_ENTITY_CONTENTS_PIPELINES_H_
7
8 #include "flutter/fml/build_config.h"
9 #include "impeller/entity/advanced_blend.frag.h"
10 #include "impeller/entity/advanced_blend.vert.h"
11 #include "impeller/entity/border_mask_blur.frag.h"
12 #include "impeller/entity/circle.frag.h"
13 #include "impeller/entity/circle.vert.h"
14 #include "impeller/entity/clip.frag.h"
15 #include "impeller/entity/clip.vert.h"
16 #include "impeller/entity/color_matrix_color_filter.frag.h"
17 #include "impeller/entity/conical_gradient_fill_conical.frag.h"
18 #include "impeller/entity/conical_gradient_fill_radial.frag.h"
19 #include "impeller/entity/conical_gradient_fill_strip.frag.h"
20 #include "impeller/entity/conical_gradient_fill_strip_radial.frag.h"
21 #include "impeller/entity/conical_gradient_ssbo_fill.frag.h"
22 #include "impeller/entity/conical_gradient_uniform_fill_conical.frag.h"
23 #include "impeller/entity/conical_gradient_uniform_fill_radial.frag.h"
24 #include "impeller/entity/conical_gradient_uniform_fill_strip.frag.h"
25 #include "impeller/entity/conical_gradient_uniform_fill_strip_radial.frag.h"
26 #include "impeller/entity/fast_gradient.frag.h"
27 #include "impeller/entity/fast_gradient.vert.h"
28 #include "impeller/entity/filter_position.vert.h"
29 #include "impeller/entity/filter_position_uv.vert.h"
30 #include "impeller/entity/framebuffer_blend.frag.h"
31 #include "impeller/entity/framebuffer_blend.vert.h"
32 #include "impeller/entity/gaussian.frag.h"
33 #include "impeller/entity/glyph_atlas.frag.h"
34 #include "impeller/entity/glyph_atlas.vert.h"
35 #include "impeller/entity/gradient_fill.vert.h"
36 #include "impeller/entity/line.frag.h"
37 #include "impeller/entity/line.vert.h"
38 #include "impeller/entity/linear_gradient_fill.frag.h"
39 #include "impeller/entity/linear_gradient_ssbo_fill.frag.h"
40 #include "impeller/entity/linear_gradient_uniform_fill.frag.h"
41 #include "impeller/entity/linear_to_srgb_filter.frag.h"
42 #include "impeller/entity/morphology_filter.frag.h"
43 #include "impeller/entity/porter_duff_blend.frag.h"
44 #include "impeller/entity/porter_duff_blend.vert.h"
45 #include "impeller/entity/radial_gradient_fill.frag.h"
46 #include "impeller/entity/radial_gradient_ssbo_fill.frag.h"
47 #include "impeller/entity/radial_gradient_uniform_fill.frag.h"
48 #include "impeller/entity/rrect_blur.frag.h"
49 #include "impeller/entity/rrect_like_blur.vert.h"
50 #include "impeller/entity/rsuperellipse_blur.frag.h"
51 #include "impeller/entity/shadow_vertices.frag.h"
52 #include "impeller/entity/shadow_vertices.vert.h"
53 #include "impeller/entity/solid_fill.frag.h"
54 #include "impeller/entity/solid_fill.vert.h"
55 #include "impeller/entity/srgb_to_linear_filter.frag.h"
56 #include "impeller/entity/sweep_gradient_fill.frag.h"
57 #include "impeller/entity/sweep_gradient_ssbo_fill.frag.h"
58 #include "impeller/entity/sweep_gradient_uniform_fill.frag.h"
59 #include "impeller/entity/texture_downsample.frag.h"
60 #include "impeller/entity/texture_downsample_bounded.frag.h"
61 #include "impeller/entity/texture_fill.frag.h"
62 #include "impeller/entity/texture_fill.vert.h"
63 #include "impeller/entity/texture_fill_strict_src.frag.h"
64 #include "impeller/entity/texture_uv_fill.vert.h"
65 #include "impeller/entity/tiled_texture_fill.frag.h"
66 #include "impeller/entity/vertices_uber_1.frag.h"
67 #include "impeller/entity/vertices_uber_2.frag.h"
68 #include "impeller/entity/yuv_to_rgb_filter.frag.h"
69 #include "impeller/renderer/pipeline.h"
70
71 #ifdef IMPELLER_ENABLE_OPENGLES
72 #include "impeller/entity/texture_downsample_gles.frag.h"
73 #include "impeller/entity/tiled_texture_fill_external.frag.h"
74 #endif // IMPELLER_ENABLE_OPENGLES
75
76 // TODO(gaaclarke): These should be split up into different files.
77 namespace impeller {
78
79 template <typename T>
80 using GradientPipelineHandle =
81 RenderPipelineHandle<GradientFillVertexShader, T>;
82
83 using AdvancedBlendPipelineHandle =
84 RenderPipelineHandle<AdvancedBlendVertexShader,
85 AdvancedBlendFragmentShader>;
86
87 using FramebufferBlendPipelineHandle =
88 RenderPipelineHandle<FramebufferBlendVertexShader,
89 FramebufferBlendFragmentShader>;
90
91 // clang-format off
92 using BlendColorBurnPipeline = AdvancedBlendPipelineHandle;
93 using BlendColorDodgePipeline = AdvancedBlendPipelineHandle;
94 using BlendColorPipeline = AdvancedBlendPipelineHandle;
95 using BlendDarkenPipeline = AdvancedBlendPipelineHandle;
96 using BlendDifferencePipeline = AdvancedBlendPipelineHandle;
97 using BlendExclusionPipeline = AdvancedBlendPipelineHandle;
98 using BlendHardLightPipeline = AdvancedBlendPipelineHandle;
99 using BlendHuePipeline = AdvancedBlendPipelineHandle;
100 using BlendLightenPipeline = AdvancedBlendPipelineHandle;
101 using BlendLuminosityPipeline = AdvancedBlendPipelineHandle;
102 using BlendMultiplyPipeline = AdvancedBlendPipelineHandle;
103 using BlendOverlayPipeline = AdvancedBlendPipelineHandle;
104 using BlendSaturationPipeline = AdvancedBlendPipelineHandle;
105 using BlendScreenPipeline = AdvancedBlendPipelineHandle;
106 using BlendSoftLightPipeline = AdvancedBlendPipelineHandle;
107 using BorderMaskBlurPipeline = RenderPipelineHandle<FilterPositionUvVertexShader, BorderMaskBlurFragmentShader>;
108 using CirclePipeline = RenderPipelineHandle<CircleVertexShader, CircleFragmentShader>;
109 using ClipPipeline = RenderPipelineHandle<ClipVertexShader, ClipFragmentShader>;
110 using ColorMatrixColorFilterPipeline = RenderPipelineHandle<FilterPositionUvVertexShader, ColorMatrixColorFilterFragmentShader>;
111 using ConicalGradientFillConicalPipeline = GradientPipelineHandle<ConicalGradientFillConicalFragmentShader>;
112 using ConicalGradientFillRadialPipeline = GradientPipelineHandle<ConicalGradientFillRadialFragmentShader>;
113 using ConicalGradientFillStripPipeline = GradientPipelineHandle<ConicalGradientFillStripFragmentShader>;
114 using ConicalGradientFillStripRadialPipeline = GradientPipelineHandle<ConicalGradientFillStripRadialFragmentShader>;
115 using ConicalGradientSSBOFillPipeline = GradientPipelineHandle<ConicalGradientSsboFillFragmentShader>;
116 using ConicalGradientUniformFillConicalPipeline = GradientPipelineHandle<ConicalGradientUniformFillConicalFragmentShader>;
117 using ConicalGradientUniformFillRadialPipeline = GradientPipelineHandle<ConicalGradientUniformFillRadialFragmentShader>;
118 using ConicalGradientUniformFillStripPipeline = GradientPipelineHandle<ConicalGradientUniformFillStripFragmentShader>;
119 using ConicalGradientUniformFillStripRadialPipeline = GradientPipelineHandle<ConicalGradientUniformFillStripRadialFragmentShader>;
120 using FastGradientPipeline = RenderPipelineHandle<FastGradientVertexShader, FastGradientFragmentShader>;
121 using FramebufferBlendColorBurnPipeline = FramebufferBlendPipelineHandle;
122 using FramebufferBlendColorDodgePipeline = FramebufferBlendPipelineHandle;
123 using FramebufferBlendColorPipeline = FramebufferBlendPipelineHandle;
124 using FramebufferBlendDarkenPipeline = FramebufferBlendPipelineHandle;
125 using FramebufferBlendDifferencePipeline = FramebufferBlendPipelineHandle;
126 using FramebufferBlendExclusionPipeline = FramebufferBlendPipelineHandle;
127 using FramebufferBlendHardLightPipeline = FramebufferBlendPipelineHandle;
128 using FramebufferBlendHuePipeline = FramebufferBlendPipelineHandle;
129 using FramebufferBlendLightenPipeline = FramebufferBlendPipelineHandle;
130 using FramebufferBlendLuminosityPipeline = FramebufferBlendPipelineHandle;
131 using FramebufferBlendMultiplyPipeline = FramebufferBlendPipelineHandle;
132 using FramebufferBlendOverlayPipeline = FramebufferBlendPipelineHandle;
133 using FramebufferBlendSaturationPipeline = FramebufferBlendPipelineHandle;
134 using FramebufferBlendScreenPipeline = FramebufferBlendPipelineHandle;
135 using FramebufferBlendSoftLightPipeline = FramebufferBlendPipelineHandle;
136 using GaussianBlurPipeline = RenderPipelineHandle<FilterPositionUvVertexShader, GaussianFragmentShader>;
137 using GlyphAtlasPipeline = RenderPipelineHandle<GlyphAtlasVertexShader, GlyphAtlasFragmentShader>;
138 using LinePipeline = RenderPipelineHandle<LineVertexShader, LineFragmentShader>;
139 using LinearGradientFillPipeline = GradientPipelineHandle<LinearGradientFillFragmentShader>;
140 using LinearGradientSSBOFillPipeline = GradientPipelineHandle<LinearGradientSsboFillFragmentShader>;
141 using LinearGradientUniformFillPipeline = GradientPipelineHandle<LinearGradientUniformFillFragmentShader>;
142 using LinearToSrgbFilterPipeline = RenderPipelineHandle<FilterPositionVertexShader, LinearToSrgbFilterFragmentShader>;
143 using MorphologyFilterPipeline = RenderPipelineHandle<FilterPositionUvVertexShader, MorphologyFilterFragmentShader>;
144 using PorterDuffBlendPipeline = RenderPipelineHandle<PorterDuffBlendVertexShader, PorterDuffBlendFragmentShader>;
145 using RadialGradientFillPipeline = GradientPipelineHandle<RadialGradientFillFragmentShader>;
146 using RadialGradientSSBOFillPipeline = GradientPipelineHandle<RadialGradientSsboFillFragmentShader>;
147 using RadialGradientUniformFillPipeline = GradientPipelineHandle<RadialGradientUniformFillFragmentShader>;
148 using RRectBlurPipeline = RenderPipelineHandle<RrectLikeBlurVertexShader, RrectBlurFragmentShader>;
149 using RSuperellipseBlurPipeline = RenderPipelineHandle<RrectLikeBlurVertexShader, RsuperellipseBlurFragmentShader>;
150 using ShadowVerticesShader = RenderPipelineHandle<ShadowVerticesVertexShader, ShadowVerticesFragmentShader>;
151 using SolidFillPipeline = RenderPipelineHandle<SolidFillVertexShader, SolidFillFragmentShader>;
152 using SrgbToLinearFilterPipeline = RenderPipelineHandle<FilterPositionVertexShader, SrgbToLinearFilterFragmentShader>;
153 using SweepGradientFillPipeline = GradientPipelineHandle<SweepGradientFillFragmentShader>;
154 using SweepGradientSSBOFillPipeline = GradientPipelineHandle<SweepGradientSsboFillFragmentShader>;
155 using SweepGradientUniformFillPipeline = GradientPipelineHandle<SweepGradientUniformFillFragmentShader>;
156 using TextureDownsamplePipeline = RenderPipelineHandle<TextureFillVertexShader, TextureDownsampleFragmentShader>;
157 using TextureDownsampleBoundedPipeline = RenderPipelineHandle<TextureFillVertexShader, TextureDownsampleBoundedFragmentShader>;
158 using TexturePipeline = RenderPipelineHandle<TextureFillVertexShader, TextureFillFragmentShader>;
159 using TextureStrictSrcPipeline = RenderPipelineHandle<TextureFillVertexShader, TextureFillStrictSrcFragmentShader>;
160 using TiledTexturePipeline = RenderPipelineHandle<TextureUvFillVertexShader, TiledTextureFillFragmentShader>;
161 using VerticesUber1Shader = RenderPipelineHandle<PorterDuffBlendVertexShader, VerticesUber1FragmentShader>;
162 using VerticesUber2Shader = RenderPipelineHandle<PorterDuffBlendVertexShader, VerticesUber2FragmentShader>;
163 using YUVToRGBFilterPipeline = RenderPipelineHandle<FilterPositionVertexShader, YuvToRgbFilterFragmentShader>;
164 // clang-format on
165
166 #ifdef IMPELLER_ENABLE_OPENGLES
167
168 // Web doesn't support external texture OpenGL extensions
169 #if !defined(FML_OS_EMSCRIPTEN)
170 using TiledTextureExternalPipeline =
171 RenderPipelineHandle<TextureFillVertexShader,
172 TiledTextureFillExternalFragmentShader>;
173 using TiledTextureUvExternalPipeline =
174 RenderPipelineHandle<TextureUvFillVertexShader,
175 TiledTextureFillExternalFragmentShader>;
176 #endif
177
178 using TextureDownsampleGlesPipeline =
179 RenderPipelineHandle<TextureFillVertexShader,
180 TextureDownsampleGlesFragmentShader>;
181 #endif // IMPELLER_ENABLE_OPENGLES
182 } // namespace impeller
183
184 #endif // FLUTTER_IMPELLER_ENTITY_CONTENTS_PIPELINES_H_
impeller::RenderPipelineHandle
Definition: pipeline.h:166
impeller
Definition: allocation.cc:12
impeller::AdvancedBlendPipelineHandle
RenderPipelineHandle< AdvancedBlendVertexShader, AdvancedBlendFragmentShader > AdvancedBlendPipelineHandle
Definition: pipelines.h:85
impeller::FramebufferBlendPipelineHandle
RenderPipelineHandle< FramebufferBlendVertexShader, FramebufferBlendFragmentShader > FramebufferBlendPipelineHandle
Definition: pipelines.h:89
pipeline.h