| Flutter Impeller |

Public Types | Public Member Functions | List of all members
impeller::ContentContext Class Reference

`#include <content_context.h>`

## Public Types
using | SubpassCallback = std::function< bool(const ContentContext &, RenderPass &)>

## Public Member Functions
| ContentContext (std::shared_ptr< Context > context, std::shared_ptr< TypographerContext > typographer_context, std::shared_ptr< RenderTargetAllocator > render_target_allocator=nullptr)
| ~ContentContext ()
bool | IsValid () const
std::shared_ptr< Tessellator > | GetTessellator () const
std::shared_ptr< Pipeline< PipelineDescriptor > > | GetLinearGradientFillPipeline (ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > | GetLinearGradientSSBOFillPipeline (ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > | GetRadialGradientSSBOFillPipeline (ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > | GetConicalGradientSSBOFillPipeline (ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > | GetSweepGradientSSBOFillPipeline (ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > | GetRadialGradientFillPipeline (ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > | GetConicalGradientFillPipeline (ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > | GetRRectBlurPipeline (ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > | GetSweepGradientFillPipeline (ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > | GetSolidFillPipeline (ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > | GetBlendPipeline (ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > | GetTexturePipeline (ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > | GetPositionUVPipeline (ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > | GetTiledTexturePipeline (ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > | GetGaussianBlurDecalPipeline (ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > | GetGaussianBlurPipeline (ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > | GetBorderMaskBlurPipeline (ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > | GetMorphologyFilterPipeline (ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > | GetColorMatrixColorFilterPipeline (ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > | GetLinearToSrgbFilterPipeline (ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > | GetSrgbToLinearFilterPipeline (ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > | GetClipPipeline (ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > | GetGlyphAtlasPipeline (ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > | GetGlyphAtlasColorPipeline (ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > | GetGeometryColorPipeline (ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > | GetYUVToRGBFilterPipeline (ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > | GetPorterDuffBlendPipeline (ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > | GetBlendColorPipeline (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 > > | GetBlendDarkenPipeline (ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > | GetBlendDifferencePipeline (ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > | GetBlendExclusionPipeline (ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > | GetBlendHardLightPipeline (ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > | GetBlendHuePipeline (ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > | GetBlendLightenPipeline (ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > | GetBlendLuminosityPipeline (ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > | GetBlendMultiplyPipeline (ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > | GetBlendOverlayPipeline (ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > | GetBlendSaturationPipeline (ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > | GetBlendScreenPipeline (ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > | GetBlendSoftLightPipeline (ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > | GetFramebufferBlendColorPipeline (ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > | GetFramebufferBlendColorBurnPipeline (ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > | GetFramebufferBlendColorDodgePipeline (ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > | GetFramebufferBlendDarkenPipeline (ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > | GetFramebufferBlendDifferencePipeline (ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > | GetFramebufferBlendExclusionPipeline (ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > | GetFramebufferBlendHardLightPipeline (ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > | GetFramebufferBlendHuePipeline (ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > | GetFramebufferBlendLightenPipeline (ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > | GetFramebufferBlendLuminosityPipeline (ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > | GetFramebufferBlendMultiplyPipeline (ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > | GetFramebufferBlendOverlayPipeline (ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > | GetFramebufferBlendSaturationPipeline (ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > | GetFramebufferBlendScreenPipeline (ContentContextOptions opts) const
std::shared_ptr< Pipeline< PipelineDescriptor > > | GetFramebufferBlendSoftLightPipeline (ContentContextOptions opts) const
std::shared_ptr< Pipeline< ComputePipelineDescriptor > > | GetPointComputePipeline () const
std::shared_ptr< Pipeline< ComputePipelineDescriptor > > | GetUvComputePipeline () const
std::shared_ptr< Context > | GetContext () const
const Capabilities & | GetDeviceCapabilities () const
void | SetWireframe (bool wireframe)
std::shared_ptr< Texture > | MakeSubpass (const std::string &label, ISize texture_size, const SubpassCallback &subpass_callback, bool msaa_enabled=true) const
| Creates a new texture of size `texture_size` and calls `subpass_callback` with a `RenderPass` for drawing to the texture. More...
std::shared_ptr< LazyGlyphAtlas > | GetLazyGlyphAtlas () const
std::shared_ptr< RenderTargetAllocator > | GetRenderTargetCache () const

## Detailed Description

Definition at line 344 of file content_context.h.

## Member Typedef Documentation

## ◆ SubpassCallback

using impeller::ContentContext::SubpassCallback = std::function<bool(const ContentContext&, RenderPass&)>

Definition at line 703 of file content_context.h.

## Constructor & Destructor Documentation

## ◆ ContentContext()

impeller::ContentContext::ContentContext | ( | std::shared_ptr< Context > | context,
|  | std::shared_ptr< TypographerContext > | typographer_context,
|  | std::shared_ptr< RenderTargetAllocator > | render_target_allocator = `nullptr`
| ) |  |
| explicit

Setup default clip pipeline.

Definition at line 172 of file content_context.cc.

176 : context_(std::move(context)),
177 lazy_glyph_atlas_(
178 std::make_shared<LazyGlyphAtlas>(std::move(typographer_context))),
179 tessellator_(std::make_shared<Tessellator>()),
180 #if IMPELLER_ENABLE_3D
181 scene_context_(std::make_shared<scene::SceneContext>(context_)),
182 #endif // IMPELLER_ENABLE_3D
183 render_target_cache_(render_target_allocator == nullptr
184 ? std::make_shared<RenderTargetCache>(
185 context_->GetResourceAllocator())
186 : std::move(render_target_allocator)) {
187 if (!context_ || !context_->IsValid()) {
188 return;
189 }
190 default_options_ = ContentContextOptions{
191 .sample_count = SampleCount::kCount4,
192 .color_attachment_pixel_format =
193 context_->GetCapabilities()->GetDefaultColorFormat()};
194
195 #ifdef IMPELLER_DEBUG
196 checkerboard_pipelines_[default_options_] =
197 CreateDefaultPipeline<CheckerboardPipeline>(*context_);
198 #endif // IMPELLER_DEBUG
199
200 solid_fill_pipelines_[default_options_] =
201 CreateDefaultPipeline<SolidFillPipeline>(*context_);
202
203 if (context_->GetCapabilities()->SupportsSSBO()) {
204 linear_gradient_ssbo_fill_pipelines_[default_options_] =
205 CreateDefaultPipeline<LinearGradientSSBOFillPipeline>(*context_);
206 radial_gradient_ssbo_fill_pipelines_[default_options_] =
207 CreateDefaultPipeline<RadialGradientSSBOFillPipeline>(*context_);
208 conical_gradient_ssbo_fill_pipelines_[default_options_] =
209 CreateDefaultPipeline<ConicalGradientSSBOFillPipeline>(*context_);
210 sweep_gradient_ssbo_fill_pipelines_[default_options_] =
211 CreateDefaultPipeline<SweepGradientSSBOFillPipeline>(*context_);
212 } else {
213 linear_gradient_fill_pipelines_[default_options_] =
214 CreateDefaultPipeline<LinearGradientFillPipeline>(*context_);
215 radial_gradient_fill_pipelines_[default_options_] =
216 CreateDefaultPipeline<RadialGradientFillPipeline>(*context_);
217 conical_gradient_fill_pipelines_[default_options_] =
218 CreateDefaultPipeline<ConicalGradientFillPipeline>(*context_);
219 sweep_gradient_fill_pipelines_[default_options_] =
220 CreateDefaultPipeline<SweepGradientFillPipeline>(*context_);
221 }
222
223 if (context_->GetCapabilities()->SupportsFramebufferFetch()) {
224 framebuffer_blend_color_pipelines_[default_options_] =
225 CreateDefaultPipeline<FramebufferBlendColorPipeline>(*context_);
226 framebuffer_blend_colorburn_pipelines_[default_options_] =
227 CreateDefaultPipeline<FramebufferBlendColorBurnPipeline>(*context_);
228 framebuffer_blend_colordodge_pipelines_[default_options_] =
229 CreateDefaultPipeline<FramebufferBlendColorDodgePipeline>(*context_);
230 framebuffer_blend_darken_pipelines_[default_options_] =
231 CreateDefaultPipeline<FramebufferBlendDarkenPipeline>(*context_);
232 framebuffer_blend_difference_pipelines_[default_options_] =
233 CreateDefaultPipeline<FramebufferBlendDifferencePipeline>(*context_);
234 framebuffer_blend_exclusion_pipelines_[default_options_] =
235 CreateDefaultPipeline<FramebufferBlendExclusionPipeline>(*context_);
236 framebuffer_blend_hardlight_pipelines_[default_options_] =
237 CreateDefaultPipeline<FramebufferBlendHardLightPipeline>(*context_);
238 framebuffer_blend_hue_pipelines_[default_options_] =
239 CreateDefaultPipeline<FramebufferBlendHuePipeline>(*context_);
240 framebuffer_blend_lighten_pipelines_[default_options_] =
241 CreateDefaultPipeline<FramebufferBlendLightenPipeline>(*context_);
242 framebuffer_blend_luminosity_pipelines_[default_options_] =
243 CreateDefaultPipeline<FramebufferBlendLuminosityPipeline>(*context_);
244 framebuffer_blend_multiply_pipelines_[default_options_] =
245 CreateDefaultPipeline<FramebufferBlendMultiplyPipeline>(*context_);
246 framebuffer_blend_overlay_pipelines_[default_options_] =
247 CreateDefaultPipeline<FramebufferBlendOverlayPipeline>(*context_);
248 framebuffer_blend_saturation_pipelines_[default_options_] =
249 CreateDefaultPipeline<FramebufferBlendSaturationPipeline>(*context_);
250 framebuffer_blend_screen_pipelines_[default_options_] =
251 CreateDefaultPipeline<FramebufferBlendScreenPipeline>(*context_);
252 framebuffer_blend_softlight_pipelines_[default_options_] =
253 CreateDefaultPipeline<FramebufferBlendSoftLightPipeline>(*context_);
254 }
255
256 blend_color_pipelines_[default_options_] =
257 CreateDefaultPipeline<BlendColorPipeline>(*context_);
258 blend_colorburn_pipelines_[default_options_] =
259 CreateDefaultPipeline<BlendColorBurnPipeline>(*context_);
260 blend_colordodge_pipelines_[default_options_] =
261 CreateDefaultPipeline<BlendColorDodgePipeline>(*context_);
262 blend_darken_pipelines_[default_options_] =
263 CreateDefaultPipeline<BlendDarkenPipeline>(*context_);
264 blend_difference_pipelines_[default_options_] =
265 CreateDefaultPipeline<BlendDifferencePipeline>(*context_);
266 blend_exclusion_pipelines_[default_options_] =
267 CreateDefaultPipeline<BlendExclusionPipeline>(*context_);
268 blend_hardlight_pipelines_[default_options_] =
269 CreateDefaultPipeline<BlendHardLightPipeline>(*context_);
270 blend_hue_pipelines_[default_options_] =
271 CreateDefaultPipeline<BlendHuePipeline>(*context_);
272 blend_lighten_pipelines_[default_options_] =
273 CreateDefaultPipeline<BlendLightenPipeline>(*context_);
274 blend_luminosity_pipelines_[default_options_] =
275 CreateDefaultPipeline<BlendLuminosityPipeline>(*context_);
276 blend_multiply_pipelines_[default_options_] =
277 CreateDefaultPipeline<BlendMultiplyPipeline>(*context_);
278 blend_overlay_pipelines_[default_options_] =
279 CreateDefaultPipeline<BlendOverlayPipeline>(*context_);
280 blend_saturation_pipelines_[default_options_] =
281 CreateDefaultPipeline<BlendSaturationPipeline>(*context_);
282 blend_screen_pipelines_[default_options_] =
283 CreateDefaultPipeline<BlendScreenPipeline>(*context_);
284 blend_softlight_pipelines_[default_options_] =
285 CreateDefaultPipeline<BlendSoftLightPipeline>(*context_);
286
287 rrect_blur_pipelines_[default_options_] =
288 CreateDefaultPipeline<RRectBlurPipeline>(*context_);
289 texture_blend_pipelines_[default_options_] =
290 CreateDefaultPipeline<BlendPipeline>(*context_);
291 texture_pipelines_[default_options_] =
292 CreateDefaultPipeline<TexturePipeline>(*context_);
293 position_uv_pipelines_[default_options_] =
294 CreateDefaultPipeline<PositionUVPipeline>(*context_);
295 tiled_texture_pipelines_[default_options_] =
296 CreateDefaultPipeline<TiledTexturePipeline>(*context_);
297 gaussian_blur_noalpha_decal_pipelines_[default_options_] =
298 CreateDefaultPipeline<GaussianBlurDecalPipeline>(*context_);
299 gaussian_blur_noalpha_nodecal_pipelines_[default_options_] =
300 CreateDefaultPipeline<GaussianBlurPipeline>(*context_);
301 border_mask_blur_pipelines_[default_options_] =
302 CreateDefaultPipeline<BorderMaskBlurPipeline>(*context_);
303 morphology_filter_pipelines_[default_options_] =
304 CreateDefaultPipeline<MorphologyFilterPipeline>(*context_);
305 color_matrix_color_filter_pipelines_[default_options_] =
306 CreateDefaultPipeline<ColorMatrixColorFilterPipeline>(*context_);
307 linear_to_srgb_filter_pipelines_[default_options_] =
308 CreateDefaultPipeline<LinearToSrgbFilterPipeline>(*context_);
309 srgb_to_linear_filter_pipelines_[default_options_] =
310 CreateDefaultPipeline<SrgbToLinearFilterPipeline>(*context_);
311 glyph_atlas_pipelines_[default_options_] =
312 CreateDefaultPipeline<GlyphAtlasPipeline>(*context_);
313 glyph_atlas_color_pipelines_[default_options_] =
314 CreateDefaultPipeline<GlyphAtlasColorPipeline>(*context_);
315 geometry_color_pipelines_[default_options_] =
316 CreateDefaultPipeline<GeometryColorPipeline>(*context_);
317 yuv_to_rgb_filter_pipelines_[default_options_] =
318 CreateDefaultPipeline<YUVToRGBFilterPipeline>(*context_);
319 porter_duff_blend_pipelines_[default_options_] =
320 CreateDefaultPipeline<PorterDuffBlendPipeline>(*context_);
321 // GLES only shader.
322 #ifdef IMPELLER_ENABLE_OPENGLES
323 if (GetContext()->GetBackendType() == Context::BackendType::kOpenGLES) {
324 texture_external_pipelines_[default_options_] =
325 CreateDefaultPipeline<TextureExternalPipeline>(*context_);
326 }
327 #endif // IMPELLER_ENABLE_OPENGLES
328 if (context_->GetCapabilities()->SupportsCompute()) {
329 auto pipeline_desc =
330 PointsComputeShaderPipeline::MakeDefaultPipelineDescriptor(*context_);
331 point_field_compute_pipelines_ =
332 context_->GetPipelineLibrary()->GetPipeline(pipeline_desc).Get();
333
334 auto uv_pipeline_desc =
335 UvComputeShaderPipeline::MakeDefaultPipelineDescriptor(*context_);
336 uv_compute_pipelines_ =
337 context_->GetPipelineLibrary()->GetPipeline(uv_pipeline_desc).Get();
338 }
339
340 /// Setup default clip pipeline.
341
342 auto clip_pipeline_descriptor =
343 ClipPipeline::Builder::MakeDefaultPipelineDescriptor(*context_);
344 if (!clip_pipeline_descriptor.has_value()) {
345 return;
346 }
347 ContentContextOptions{
348 .sample_count = SampleCount::kCount4,
349 .color_attachment_pixel_format =
350 context_->GetCapabilities()->GetDefaultColorFormat()}
351 .ApplyToPipelineDescriptor(*clip_pipeline_descriptor);
352 // Disable write to all color attachments.
353 auto clip_color_attachments =
354 clip_pipeline_descriptor->GetColorAttachmentDescriptors();
355 for (auto& color_attachment : clip_color_attachments) {
356 color_attachment.second.write_mask =
357 static_cast<uint64_t>(ColorWriteMask::kNone);
358 }
359 clip_pipeline_descriptor->SetColorAttachmentDescriptors(
360 std::move(clip_color_attachments));
361 clip_pipelines_[default_options_] =
362 std::make_unique<ClipPipeline>(*context_, clip_pipeline_descriptor);
363
364 is_valid_ = true;
365 }

References GetContext(), impeller::kCount4, impeller::kNone, impeller::Context::kOpenGLES, impeller::ComputePipelineBuilder< ComputeShader_ >::MakeDefaultPipelineDescriptor(), impeller::PipelineBuilder< VertexShader_, FragmentShader_ >::MakeDefaultPipelineDescriptor(), and impeller::ContentContextOptions::sample_count.

## ◆ ~ContentContext()

impeller::ContentContext::~ContentContext | ( |  | ) |
| default

## Member Function Documentation

## ◆ GetBlendColorBurnPipeline()

std::shared_ptr<Pipeline<PipelineDescriptor> > impeller::ContentContext::GetBlendColorBurnPipeline | ( | ContentContextOptions | opts | ) | const
| inline

Definition at line 523 of file content_context.h.

524 {
525 return GetPipeline(blend_colorburn_pipelines_, opts);
526 }

## ◆ GetBlendColorDodgePipeline()

std::shared_ptr<Pipeline<PipelineDescriptor> > impeller::ContentContext::GetBlendColorDodgePipeline | ( | ContentContextOptions | opts | ) | const
| inline

Definition at line 528 of file content_context.h.

529 {
530 return GetPipeline(blend_colordodge_pipelines_, opts);
531 }

## ◆ GetBlendColorPipeline()

std::shared_ptr<Pipeline<PipelineDescriptor> > impeller::ContentContext::GetBlendColorPipeline | ( | ContentContextOptions | opts | ) | const
| inline

Definition at line 518 of file content_context.h.

519 {
520 return GetPipeline(blend_color_pipelines_, opts);
521 }

## ◆ GetBlendDarkenPipeline()

std::shared_ptr<Pipeline<PipelineDescriptor> > impeller::ContentContext::GetBlendDarkenPipeline | ( | ContentContextOptions | opts | ) | const
| inline

Definition at line 533 of file content_context.h.

534 {
535 return GetPipeline(blend_darken_pipelines_, opts);
536 }

## ◆ GetBlendDifferencePipeline()

std::shared_ptr<Pipeline<PipelineDescriptor> > impeller::ContentContext::GetBlendDifferencePipeline | ( | ContentContextOptions | opts | ) | const
| inline

Definition at line 538 of file content_context.h.

539 {
540 return GetPipeline(blend_difference_pipelines_, opts);
541 }

## ◆ GetBlendExclusionPipeline()

std::shared_ptr<Pipeline<PipelineDescriptor> > impeller::ContentContext::GetBlendExclusionPipeline | ( | ContentContextOptions | opts | ) | const
| inline

Definition at line 543 of file content_context.h.

544 {
545 return GetPipeline(blend_exclusion_pipelines_, opts);
546 }

## ◆ GetBlendHardLightPipeline()

std::shared_ptr<Pipeline<PipelineDescriptor> > impeller::ContentContext::GetBlendHardLightPipeline | ( | ContentContextOptions | opts | ) | const
| inline

Definition at line 548 of file content_context.h.

549 {
550 return GetPipeline(blend_hardlight_pipelines_, opts);
551 }

## ◆ GetBlendHuePipeline()

std::shared_ptr<Pipeline<PipelineDescriptor> > impeller::ContentContext::GetBlendHuePipeline | ( | ContentContextOptions | opts | ) | const
| inline

Definition at line 553 of file content_context.h.

554 {
555 return GetPipeline(blend_hue_pipelines_, opts);
556 }

## ◆ GetBlendLightenPipeline()

std::shared_ptr<Pipeline<PipelineDescriptor> > impeller::ContentContext::GetBlendLightenPipeline | ( | ContentContextOptions | opts | ) | const
| inline

Definition at line 558 of file content_context.h.

559 {
560 return GetPipeline(blend_lighten_pipelines_, opts);
561 }

## ◆ GetBlendLuminosityPipeline()

std::shared_ptr<Pipeline<PipelineDescriptor> > impeller::ContentContext::GetBlendLuminosityPipeline | ( | ContentContextOptions | opts | ) | const
| inline

Definition at line 563 of file content_context.h.

564 {
565 return GetPipeline(blend_luminosity_pipelines_, opts);
566 }

## ◆ GetBlendMultiplyPipeline()

std::shared_ptr<Pipeline<PipelineDescriptor> > impeller::ContentContext::GetBlendMultiplyPipeline | ( | ContentContextOptions | opts | ) | const
| inline

Definition at line 568 of file content_context.h.

569 {
570 return GetPipeline(blend_multiply_pipelines_, opts);
571 }

## ◆ GetBlendOverlayPipeline()

std::shared_ptr<Pipeline<PipelineDescriptor> > impeller::ContentContext::GetBlendOverlayPipeline | ( | ContentContextOptions | opts | ) | const
| inline

Definition at line 573 of file content_context.h.

574 {
575 return GetPipeline(blend_overlay_pipelines_, opts);
576 }

## ◆ GetBlendPipeline()

std::shared_ptr<Pipeline<PipelineDescriptor> > impeller::ContentContext::GetBlendPipeline | ( | ContentContextOptions | opts | ) | const
| inline

Definition at line 422 of file content_context.h.

423 {
424 return GetPipeline(texture_blend_pipelines_, opts);
425 }

Referenced by impeller::PipelineBlend().

## ◆ GetBlendSaturationPipeline()

std::shared_ptr<Pipeline<PipelineDescriptor> > impeller::ContentContext::GetBlendSaturationPipeline | ( | ContentContextOptions | opts | ) | const
| inline

Definition at line 578 of file content_context.h.

579 {
580 return GetPipeline(blend_saturation_pipelines_, opts);
581 }

## ◆ GetBlendScreenPipeline()

std::shared_ptr<Pipeline<PipelineDescriptor> > impeller::ContentContext::GetBlendScreenPipeline | ( | ContentContextOptions | opts | ) | const
| inline

Definition at line 583 of file content_context.h.

584 {
585 return GetPipeline(blend_screen_pipelines_, opts);
586 }

## ◆ GetBlendSoftLightPipeline()

std::shared_ptr<Pipeline<PipelineDescriptor> > impeller::ContentContext::GetBlendSoftLightPipeline | ( | ContentContextOptions | opts | ) | const
| inline

Definition at line 588 of file content_context.h.

589 {
590 return GetPipeline(blend_softlight_pipelines_, opts);
591 }

## ◆ GetBorderMaskBlurPipeline()

std::shared_ptr<Pipeline<PipelineDescriptor> > impeller::ContentContext::GetBorderMaskBlurPipeline | ( | ContentContextOptions | opts | ) | const
| inline

Definition at line 461 of file content_context.h.

462 {
463 return GetPipeline(border_mask_blur_pipelines_, opts);
464 }

## ◆ GetClipPipeline()

std::shared_ptr<Pipeline<PipelineDescriptor> > impeller::ContentContext::GetClipPipeline | ( | ContentContextOptions | opts | ) | const
| inline

Definition at line 486 of file content_context.h.

487 {
488 return GetPipeline(clip_pipelines_, opts);
489 }

Referenced by impeller::ClipContents::Render(), and impeller::ClipRestoreContents::Render().

## ◆ GetColorMatrixColorFilterPipeline()

std::shared_ptr<Pipeline<PipelineDescriptor> > impeller::ContentContext::GetColorMatrixColorFilterPipeline | ( | ContentContextOptions | opts | ) | const
| inline

Definition at line 472 of file content_context.h.

472 {
473 return GetPipeline(color_matrix_color_filter_pipelines_, opts);
474 }

## ◆ GetConicalGradientFillPipeline()

std::shared_ptr<Pipeline<PipelineDescriptor> > impeller::ContentContext::GetConicalGradientFillPipeline | ( | ContentContextOptions | opts | ) | const
| inline

Definition at line 402 of file content_context.h.

403 {
404 return GetPipeline(conical_gradient_fill_pipelines_, opts);
405 }

## ◆ GetConicalGradientSSBOFillPipeline()

std::shared_ptr<Pipeline<PipelineDescriptor> > impeller::ContentContext::GetConicalGradientSSBOFillPipeline | ( | ContentContextOptions | opts | ) | const
| inline

Definition at line 386 of file content_context.h.

386 {
387 FML_DCHECK(GetDeviceCapabilities().SupportsSSBO());
388 return GetPipeline(conical_gradient_ssbo_fill_pipelines_, opts);
389 }

References GetDeviceCapabilities().

## ◆ GetContext()

std::shared_ptr< Context > impeller::ContentContext::GetContext | ( |  | ) | const

Definition at line 440 of file content_context.cc.

440 {
441 return context_;
442 }

Referenced by impeller::AdvancedBlend(), ContentContext(), impeller::CreateRenderTarget(), impeller::VerticesGeometry::GetPositionBuffer(), impeller::VerticesGeometry::GetPositionColorBuffer(), impeller::VerticesGeometry::GetPositionUVBuffer(), MakeSubpass(), impeller::PipelineBlend(), impeller::SceneContents::Render(), impeller::RuntimeEffectContents::Render(), impeller::TiledTextureContents::Render(), impeller::ClipContents::Render(), impeller::TextContents::Render(), impeller::TextureContents::Render(), impeller::AtlasContents::Render(), impeller::VerticesUVContents::Render(), impeller::EntityPass::Render(), and impeller::AtlasTextureContents::Render().

## ◆ GetDeviceCapabilities()

const Capabilities & impeller::ContentContext::GetDeviceCapabilities | ( |  | ) | const

Definition at line 444 of file content_context.cc.

444 {
445 return *context_->GetCapabilities();
446 }

Referenced by impeller::AdvancedBlend(), impeller::CreateRenderTarget(), GetConicalGradientSSBOFillPipeline(), GetFramebufferBlendColorBurnPipeline(), GetFramebufferBlendColorDodgePipeline(), GetFramebufferBlendColorPipeline(), GetFramebufferBlendDarkenPipeline(), GetFramebufferBlendDifferencePipeline(), GetFramebufferBlendExclusionPipeline(), GetFramebufferBlendHardLightPipeline(), GetFramebufferBlendHuePipeline(), GetFramebufferBlendLightenPipeline(), GetFramebufferBlendLuminosityPipeline(), GetFramebufferBlendMultiplyPipeline(), GetFramebufferBlendOverlayPipeline(), GetFramebufferBlendSaturationPipeline(), GetFramebufferBlendScreenPipeline(), GetFramebufferBlendSoftLightPipeline(), GetLinearGradientSSBOFillPipeline(), GetPointComputePipeline(), GetRadialGradientSSBOFillPipeline(), GetSweepGradientSSBOFillPipeline(), GetUvComputePipeline(), impeller::ConicalGradientContents::Render(), impeller::RadialGradientContents::Render(), impeller::LinearGradientContents::Render(), impeller::SweepGradientContents::Render(), impeller::TiledTextureContents::Render(), and impeller::AtlasContents::Render().

## ◆ GetFramebufferBlendColorBurnPipeline()

std::shared_ptr<Pipeline<PipelineDescriptor> > impeller::ContentContext::GetFramebufferBlendColorBurnPipeline | ( | ContentContextOptions | opts | ) | const
| inline

Definition at line 601 of file content_context.h.

601 {
602 FML_DCHECK(GetDeviceCapabilities().SupportsFramebufferFetch());
603 return GetPipeline(framebuffer_blend_colorburn_pipelines_, opts);
604 }

References GetDeviceCapabilities().

## ◆ GetFramebufferBlendColorDodgePipeline()

std::shared_ptr<Pipeline<PipelineDescriptor> > impeller::ContentContext::GetFramebufferBlendColorDodgePipeline | ( | ContentContextOptions | opts | ) | const
| inline

Definition at line 607 of file content_context.h.

607 {
608 FML_DCHECK(GetDeviceCapabilities().SupportsFramebufferFetch());
609 return GetPipeline(framebuffer_blend_colordodge_pipelines_, opts);
610 }

References GetDeviceCapabilities().

## ◆ GetFramebufferBlendColorPipeline()

std::shared_ptr<Pipeline<PipelineDescriptor> > impeller::ContentContext::GetFramebufferBlendColorPipeline | ( | ContentContextOptions | opts | ) | const
| inline

Definition at line 595 of file content_context.h.

595 {
596 FML_DCHECK(GetDeviceCapabilities().SupportsFramebufferFetch());
597 return GetPipeline(framebuffer_blend_color_pipelines_, opts);
598 }

References GetDeviceCapabilities().

## ◆ GetFramebufferBlendDarkenPipeline()

std::shared_ptr<Pipeline<PipelineDescriptor> > impeller::ContentContext::GetFramebufferBlendDarkenPipeline | ( | ContentContextOptions | opts | ) | const
| inline

Definition at line 613 of file content_context.h.

613 {
614 FML_DCHECK(GetDeviceCapabilities().SupportsFramebufferFetch());
615 return GetPipeline(framebuffer_blend_darken_pipelines_, opts);
616 }

References GetDeviceCapabilities().

## ◆ GetFramebufferBlendDifferencePipeline()

std::shared_ptr<Pipeline<PipelineDescriptor> > impeller::ContentContext::GetFramebufferBlendDifferencePipeline | ( | ContentContextOptions | opts | ) | const
| inline

Definition at line 619 of file content_context.h.

619 {
620 FML_DCHECK(GetDeviceCapabilities().SupportsFramebufferFetch());
621 return GetPipeline(framebuffer_blend_difference_pipelines_, opts);
622 }

References GetDeviceCapabilities().

## ◆ GetFramebufferBlendExclusionPipeline()

std::shared_ptr<Pipeline<PipelineDescriptor> > impeller::ContentContext::GetFramebufferBlendExclusionPipeline | ( | ContentContextOptions | opts | ) | const
| inline

Definition at line 625 of file content_context.h.

625 {
626 FML_DCHECK(GetDeviceCapabilities().SupportsFramebufferFetch());
627 return GetPipeline(framebuffer_blend_exclusion_pipelines_, opts);
628 }

References GetDeviceCapabilities().

## ◆ GetFramebufferBlendHardLightPipeline()

std::shared_ptr<Pipeline<PipelineDescriptor> > impeller::ContentContext::GetFramebufferBlendHardLightPipeline | ( | ContentContextOptions | opts | ) | const
| inline

Definition at line 631 of file content_context.h.

631 {
632 FML_DCHECK(GetDeviceCapabilities().SupportsFramebufferFetch());
633 return GetPipeline(framebuffer_blend_hardlight_pipelines_, opts);
634 }

References GetDeviceCapabilities().

## ◆ GetFramebufferBlendHuePipeline()

std::shared_ptr<Pipeline<PipelineDescriptor> > impeller::ContentContext::GetFramebufferBlendHuePipeline | ( | ContentContextOptions | opts | ) | const
| inline

Definition at line 636 of file content_context.h.

637 {
638 FML_DCHECK(GetDeviceCapabilities().SupportsFramebufferFetch());
639 return GetPipeline(framebuffer_blend_hue_pipelines_, opts);
640 }

References GetDeviceCapabilities().

## ◆ GetFramebufferBlendLightenPipeline()

std::shared_ptr<Pipeline<PipelineDescriptor> > impeller::ContentContext::GetFramebufferBlendLightenPipeline | ( | ContentContextOptions | opts | ) | const
| inline

Definition at line 643 of file content_context.h.

643 {
644 FML_DCHECK(GetDeviceCapabilities().SupportsFramebufferFetch());
645 return GetPipeline(framebuffer_blend_lighten_pipelines_, opts);
646 }

References GetDeviceCapabilities().

## ◆ GetFramebufferBlendLuminosityPipeline()

std::shared_ptr<Pipeline<PipelineDescriptor> > impeller::ContentContext::GetFramebufferBlendLuminosityPipeline | ( | ContentContextOptions | opts | ) | const
| inline

Definition at line 649 of file content_context.h.

649 {
650 FML_DCHECK(GetDeviceCapabilities().SupportsFramebufferFetch());
651 return GetPipeline(framebuffer_blend_luminosity_pipelines_, opts);
652 }

References GetDeviceCapabilities().

## ◆ GetFramebufferBlendMultiplyPipeline()

std::shared_ptr<Pipeline<PipelineDescriptor> > impeller::ContentContext::GetFramebufferBlendMultiplyPipeline | ( | ContentContextOptions | opts | ) | const
| inline

Definition at line 655 of file content_context.h.

655 {
656 FML_DCHECK(GetDeviceCapabilities().SupportsFramebufferFetch());
657 return GetPipeline(framebuffer_blend_multiply_pipelines_, opts);
658 }

References GetDeviceCapabilities().

## ◆ GetFramebufferBlendOverlayPipeline()

std::shared_ptr<Pipeline<PipelineDescriptor> > impeller::ContentContext::GetFramebufferBlendOverlayPipeline | ( | ContentContextOptions | opts | ) | const
| inline

Definition at line 661 of file content_context.h.

661 {
662 FML_DCHECK(GetDeviceCapabilities().SupportsFramebufferFetch());
663 return GetPipeline(framebuffer_blend_overlay_pipelines_, opts);
664 }

References GetDeviceCapabilities().

## ◆ GetFramebufferBlendSaturationPipeline()

std::shared_ptr<Pipeline<PipelineDescriptor> > impeller::ContentContext::GetFramebufferBlendSaturationPipeline | ( | ContentContextOptions | opts | ) | const
| inline

Definition at line 667 of file content_context.h.

667 {
668 FML_DCHECK(GetDeviceCapabilities().SupportsFramebufferFetch());
669 return GetPipeline(framebuffer_blend_saturation_pipelines_, opts);
670 }

References GetDeviceCapabilities().

## ◆ GetFramebufferBlendScreenPipeline()

std::shared_ptr<Pipeline<PipelineDescriptor> > impeller::ContentContext::GetFramebufferBlendScreenPipeline | ( | ContentContextOptions | opts | ) | const
| inline

Definition at line 673 of file content_context.h.

673 {
674 FML_DCHECK(GetDeviceCapabilities().SupportsFramebufferFetch());
675 return GetPipeline(framebuffer_blend_screen_pipelines_, opts);
676 }

References GetDeviceCapabilities().

## ◆ GetFramebufferBlendSoftLightPipeline()

std::shared_ptr<Pipeline<PipelineDescriptor> > impeller::ContentContext::GetFramebufferBlendSoftLightPipeline | ( | ContentContextOptions | opts | ) | const
| inline

Definition at line 679 of file content_context.h.

679 {
680 FML_DCHECK(GetDeviceCapabilities().SupportsFramebufferFetch());
681 return GetPipeline(framebuffer_blend_softlight_pipelines_, opts);
682 }

References GetDeviceCapabilities().

## ◆ GetGaussianBlurDecalPipeline()

std::shared_ptr<Pipeline<PipelineDescriptor> > impeller::ContentContext::GetGaussianBlurDecalPipeline | ( | ContentContextOptions | opts | ) | const
| inline

Definition at line 451 of file content_context.h.

452 {
453 return GetPipeline(gaussian_blur_noalpha_decal_pipelines_, opts);
454 }

## ◆ GetGaussianBlurPipeline()

std::shared_ptr<Pipeline<PipelineDescriptor> > impeller::ContentContext::GetGaussianBlurPipeline | ( | ContentContextOptions | opts | ) | const
| inline

Definition at line 456 of file content_context.h.

457 {
458 return GetPipeline(gaussian_blur_noalpha_nodecal_pipelines_, opts);
459 }

## ◆ GetGeometryColorPipeline()

std::shared_ptr<Pipeline<PipelineDescriptor> > impeller::ContentContext::GetGeometryColorPipeline | ( | ContentContextOptions | opts | ) | const
| inline

Definition at line 501 of file content_context.h.

502 {
503 return GetPipeline(geometry_color_pipelines_, opts);
504 }

Referenced by impeller::VerticesColorContents::Render(), and impeller::AtlasColorContents::Render().

## ◆ GetGlyphAtlasColorPipeline()

std::shared_ptr<Pipeline<PipelineDescriptor> > impeller::ContentContext::GetGlyphAtlasColorPipeline | ( | ContentContextOptions | opts | ) | const
| inline

Definition at line 496 of file content_context.h.

497 {
498 return GetPipeline(glyph_atlas_color_pipelines_, opts);
499 }

Referenced by impeller::TextContents::Render().

## ◆ GetGlyphAtlasPipeline()

std::shared_ptr<Pipeline<PipelineDescriptor> > impeller::ContentContext::GetGlyphAtlasPipeline | ( | ContentContextOptions | opts | ) | const
| inline

Definition at line 491 of file content_context.h.

492 {
493 return GetPipeline(glyph_atlas_pipelines_, opts);
494 }

Referenced by impeller::TextContents::Render().

## ◆ GetLazyGlyphAtlas()

std::shared_ptr<LazyGlyphAtlas> impeller::ContentContext::GetLazyGlyphAtlas | ( |  | ) | const
| inline

Definition at line 712 of file content_context.h.

712 {
713 return lazy_glyph_atlas_;
714 }

Referenced by impeller::TextContents::Render(), and impeller::EntityPass::Render().

## ◆ GetLinearGradientFillPipeline()

std::shared_ptr<Pipeline<PipelineDescriptor> > impeller::ContentContext::GetLinearGradientFillPipeline | ( | ContentContextOptions | opts | ) | const
| inline

Definition at line 368 of file content_context.h.

369 {
370 return GetPipeline(linear_gradient_fill_pipelines_, opts);
371 }

## ◆ GetLinearGradientSSBOFillPipeline()

std::shared_ptr<Pipeline<PipelineDescriptor> > impeller::ContentContext::GetLinearGradientSSBOFillPipeline | ( | ContentContextOptions | opts | ) | const
| inline

Definition at line 374 of file content_context.h.

374 {
375 FML_DCHECK(GetDeviceCapabilities().SupportsSSBO());
376 return GetPipeline(linear_gradient_ssbo_fill_pipelines_, opts);
377 }

References GetDeviceCapabilities().

## ◆ GetLinearToSrgbFilterPipeline()

std::shared_ptr<Pipeline<PipelineDescriptor> > impeller::ContentContext::GetLinearToSrgbFilterPipeline | ( | ContentContextOptions | opts | ) | const
| inline

Definition at line 476 of file content_context.h.

477 {
478 return GetPipeline(linear_to_srgb_filter_pipelines_, opts);
479 }

## ◆ GetMorphologyFilterPipeline()

std::shared_ptr<Pipeline<PipelineDescriptor> > impeller::ContentContext::GetMorphologyFilterPipeline | ( | ContentContextOptions | opts | ) | const
| inline

Definition at line 466 of file content_context.h.

467 {
468 return GetPipeline(morphology_filter_pipelines_, opts);
469 }

## ◆ GetPointComputePipeline()

std::shared_ptr<Pipeline<ComputePipelineDescriptor> > impeller::ContentContext::GetPointComputePipeline | ( |  | ) | const
| inline

Definition at line 684 of file content_context.h.

685 {
686 FML_DCHECK(GetDeviceCapabilities().SupportsCompute());
687 return point_field_compute_pipelines_;
688 }

References GetDeviceCapabilities().

## ◆ GetPorterDuffBlendPipeline()

std::shared_ptr<Pipeline<PipelineDescriptor> > impeller::ContentContext::GetPorterDuffBlendPipeline | ( | ContentContextOptions | opts | ) | const
| inline

Definition at line 511 of file content_context.h.

512 {
513 return GetPipeline(porter_duff_blend_pipelines_, opts);
514 }

Referenced by impeller::AtlasContents::Render().

## ◆ GetPositionUVPipeline()

std::shared_ptr<Pipeline<PipelineDescriptor> > impeller::ContentContext::GetPositionUVPipeline | ( | ContentContextOptions | opts | ) | const
| inline

Definition at line 441 of file content_context.h.

442 {
443 return GetPipeline(position_uv_pipelines_, opts);
444 }

## ◆ GetRadialGradientFillPipeline()

std::shared_ptr<Pipeline<PipelineDescriptor> > impeller::ContentContext::GetRadialGradientFillPipeline | ( | ContentContextOptions | opts | ) | const
| inline

Definition at line 397 of file content_context.h.

398 {
399 return GetPipeline(radial_gradient_fill_pipelines_, opts);
400 }

## ◆ GetRadialGradientSSBOFillPipeline()

std::shared_ptr<Pipeline<PipelineDescriptor> > impeller::ContentContext::GetRadialGradientSSBOFillPipeline | ( | ContentContextOptions | opts | ) | const
| inline

Definition at line 380 of file content_context.h.

380 {
381 FML_DCHECK(GetDeviceCapabilities().SupportsSSBO());
382 return GetPipeline(radial_gradient_ssbo_fill_pipelines_, opts);
383 }

References GetDeviceCapabilities().

## ◆ GetRenderTargetCache()

std::shared_ptr<RenderTargetAllocator> impeller::ContentContext::GetRenderTargetCache | ( |  | ) | const
| inline

Definition at line 716 of file content_context.h.

716 {
717 return render_target_cache_;
718 }

Referenced by impeller::CreateRenderTarget(), MakeSubpass(), impeller::SceneContents::Render(), and impeller::EntityPass::Render().

## ◆ GetRRectBlurPipeline()

std::shared_ptr<Pipeline<PipelineDescriptor> > impeller::ContentContext::GetRRectBlurPipeline | ( | ContentContextOptions | opts | ) | const
| inline

Definition at line 407 of file content_context.h.

408 {
409 return GetPipeline(rrect_blur_pipelines_, opts);
410 }

Referenced by impeller::SolidRRectBlurContents::Render().

## ◆ GetSolidFillPipeline()

std::shared_ptr<Pipeline<PipelineDescriptor> > impeller::ContentContext::GetSolidFillPipeline | ( | ContentContextOptions | opts | ) | const
| inline

Definition at line 417 of file content_context.h.

418 {
419 return GetPipeline(solid_fill_pipelines_, opts);
420 }

Referenced by impeller::SolidColorContents::Render(), and impeller::testing::TEST_P().

## ◆ GetSrgbToLinearFilterPipeline()

std::shared_ptr<Pipeline<PipelineDescriptor> > impeller::ContentContext::GetSrgbToLinearFilterPipeline | ( | ContentContextOptions | opts | ) | const
| inline

Definition at line 481 of file content_context.h.

482 {
483 return GetPipeline(srgb_to_linear_filter_pipelines_, opts);
484 }

## ◆ GetSweepGradientFillPipeline()

std::shared_ptr<Pipeline<PipelineDescriptor> > impeller::ContentContext::GetSweepGradientFillPipeline | ( | ContentContextOptions | opts | ) | const
| inline

Definition at line 412 of file content_context.h.

413 {
414 return GetPipeline(sweep_gradient_fill_pipelines_, opts);
415 }

## ◆ GetSweepGradientSSBOFillPipeline()

std::shared_ptr<Pipeline<PipelineDescriptor> > impeller::ContentContext::GetSweepGradientSSBOFillPipeline | ( | ContentContextOptions | opts | ) | const
| inline

Definition at line 392 of file content_context.h.

392 {
393 FML_DCHECK(GetDeviceCapabilities().SupportsSSBO());
394 return GetPipeline(sweep_gradient_ssbo_fill_pipelines_, opts);
395 }

References GetDeviceCapabilities().

## ◆ GetTessellator()

std::shared_ptr< Tessellator > impeller::ContentContext::GetTessellator | ( |  | ) | const

Definition at line 436 of file content_context.cc.

436 {
437 return tessellator_;
438 }

## ◆ GetTexturePipeline()

std::shared_ptr<Pipeline<PipelineDescriptor> > impeller::ContentContext::GetTexturePipeline | ( | ContentContextOptions | opts | ) | const
| inline

Definition at line 427 of file content_context.h.

428 {
429 return GetPipeline(texture_pipelines_, opts);
430 }

Referenced by impeller::TiledTextureContents::Render(), impeller::TextureContents::Render(), impeller::VerticesUVContents::Render(), and impeller::AtlasTextureContents::Render().

## ◆ GetTiledTexturePipeline()

std::shared_ptr<Pipeline<PipelineDescriptor> > impeller::ContentContext::GetTiledTexturePipeline | ( | ContentContextOptions | opts | ) | const
| inline

Definition at line 446 of file content_context.h.

447 {
448 return GetPipeline(tiled_texture_pipelines_, opts);
449 }

Referenced by impeller::TiledTextureContents::Render().

## ◆ GetUvComputePipeline()

std::shared_ptr<Pipeline<ComputePipelineDescriptor> > impeller::ContentContext::GetUvComputePipeline | ( |  | ) | const
| inline

Definition at line 690 of file content_context.h.

691 {
692 FML_DCHECK(GetDeviceCapabilities().SupportsCompute());
693 return uv_compute_pipelines_;
694 }

References GetDeviceCapabilities().

## ◆ GetYUVToRGBFilterPipeline()

std::shared_ptr<Pipeline<PipelineDescriptor> > impeller::ContentContext::GetYUVToRGBFilterPipeline | ( | ContentContextOptions | opts | ) | const
| inline

Definition at line 506 of file content_context.h.

507 {
508 return GetPipeline(yuv_to_rgb_filter_pipelines_, opts);
509 }

## ◆ IsValid()

bool impeller::ContentContext::IsValid | ( |  | ) | const

Definition at line 369 of file content_context.cc.

369 {
370 return is_valid_;
371 }

Referenced by impeller::EntityPlayground::OpenPlaygroundHere(), and impeller::testing::TEST_P().

## ◆ MakeSubpass()

std::shared_ptr< Texture > impeller::ContentContext::MakeSubpass | ( | const std::string & | label,
|  | ISize | texture_size,
|  | const SubpassCallback & | subpass_callback,
|  | bool | msaa_enabled = `true`
| ) |  | const

Creates a new texture of size `texture_size` and calls `subpass_callback` with a `RenderPass` for drawing to the texture.

Definition at line 373 of file content_context.cc.

377 {
378 auto context = GetContext();
379
380 RenderTarget subpass_target;
381 if (context->GetCapabilities()->SupportsOffscreenMSAA() && msaa_enabled) {
382 subpass_target = RenderTarget::CreateOffscreenMSAA(
383 *context, *GetRenderTargetCache(), texture_size,
384 SPrintF("%s Offscreen", label.c_str()),
385 RenderTarget::kDefaultColorAttachmentConfigMSAA //
386 #ifndef FML_OS_ANDROID // Reduce PSO variants for Vulkan.
387 ,
388 std::nullopt // stencil_attachment_config
389 #endif // FML_OS_ANDROID
390 );
391 } else {
392 subpass_target = RenderTarget::CreateOffscreen(
393 *context, *GetRenderTargetCache(), texture_size,
394 SPrintF("%s Offscreen", label.c_str()),
395 RenderTarget::kDefaultColorAttachmentConfig //
396 #ifndef FML_OS_ANDROID // Reduce PSO variants for Vulkan.
397 ,
398 std::nullopt // stencil_attachment_config
399 #endif // FML_OS_ANDROID
400 );
401 }
402 auto subpass_texture = subpass_target.GetRenderTargetTexture();
403 if (!subpass_texture) {
404 return nullptr;
405 }
406
407 auto sub_command_buffer = context->CreateCommandBuffer();
408 sub_command_buffer->SetLabel(SPrintF("%s CommandBuffer", label.c_str()));
409 if (!sub_command_buffer) {
410 return nullptr;
411 }
412
413 auto sub_renderpass = sub_command_buffer->CreateRenderPass(subpass_target);
414 if (!sub_renderpass) {
415 return nullptr;
416 }
417 sub_renderpass->SetLabel(SPrintF("%s RenderPass", label.c_str()));
418
419 if (!subpass_callback(*this, *sub_renderpass)) {
420 return nullptr;
421 }
422
423 if (!sub_command_buffer->SubmitCommandsAsync(std::move(sub_renderpass))) {
424 return nullptr;
425 }
426
427 return subpass_texture;
428 }

References impeller::RenderTarget::CreateOffscreen(), impeller::RenderTarget::CreateOffscreenMSAA(), GetContext(), GetRenderTargetCache(), impeller::RenderTarget::GetRenderTargetTexture(), impeller::RenderTarget::kDefaultColorAttachmentConfig, impeller::RenderTarget::kDefaultColorAttachmentConfigMSAA, and impeller::SPrintF().

Referenced by impeller::AdvancedBlend(), impeller::PipelineBlend(), and impeller::Contents::RenderToSnapshot().

## ◆ SetWireframe()

void impeller::ContentContext::SetWireframe | ( | bool | wireframe | ) |

Definition at line 448 of file content_context.cc.

448 {
449 wireframe_ = wireframe;
450 }

Referenced by impeller::EntityPlayground::OpenPlaygroundHere(), and impeller::AiksInspector::RenderInspector().

The documentation for this class was generated from the following files:

- impeller/entity/contents/content_context.h
- impeller/entity/contents/content_context.cc

impeller::RenderTarget::kDefaultColorAttachmentConfig
static constexpr AttachmentConfig kDefaultColorAttachmentConfig
Definition: render_target.h:65
impeller::RenderTarget::kDefaultColorAttachmentConfigMSAA
static constexpr AttachmentConfigMSAA kDefaultColorAttachmentConfigMSAA
Definition: render_target.h:71
impeller::SampleCount::kCount4
@ kCount4
impeller::ComputePipelineBuilder::MakeDefaultPipelineDescriptor
static std::optional< ComputePipelineDescriptor > MakeDefaultPipelineDescriptor(const Context &context)
Create a default pipeline descriptor using the combination reflected shader information....
Definition: compute_pipeline_builder.h:43
impeller::Context::BackendType::kOpenGLES
@ kOpenGLES
impeller::SPrintF
std::string SPrintF(const char *format,...)
Definition: strings.cc:12
impeller::ContentContext::GetContext
std::shared_ptr< Context > GetContext() const
Definition: content_context.cc:440
impeller::ColorWriteMask::kNone
@ kNone
impeller::ContentContext::GetRenderTargetCache
std::shared_ptr< RenderTargetAllocator > GetRenderTargetCache() const
Definition: content_context.h:716
impeller::RenderTarget::CreateOffscreen
static RenderTarget CreateOffscreen(const Context &context, RenderTargetAllocator &allocator, ISize size, const std::string &label="Offscreen", AttachmentConfig color_attachment_config=kDefaultColorAttachmentConfig, std::optional< AttachmentConfig > stencil_attachment_config=kDefaultStencilAttachmentConfig)
Definition: render_target.cc:223
impeller::ContentContext::GetDeviceCapabilities
const Capabilities & GetDeviceCapabilities() const
Definition: content_context.cc:444
impeller::PipelineBuilder::MakeDefaultPipelineDescriptor
static std::optional< PipelineDescriptor > MakeDefaultPipelineDescriptor(const Context &context)
Create a default pipeline descriptor using the combination reflected shader information....
Definition: pipeline_builder.h:50
impeller::ContentContextOptions::sample_count
SampleCount sample_count
Definition: content_context.h:303
impeller::RenderTarget::CreateOffscreenMSAA
static RenderTarget CreateOffscreenMSAA(const Context &context, RenderTargetAllocator &allocator, ISize size, const std::string &label="Offscreen MSAA", AttachmentConfigMSAA color_attachment_config=kDefaultColorAttachmentConfigMSAA, std::optional< AttachmentConfig > stencil_attachment_config=kDefaultStencilAttachmentConfig)
Definition: render_target.cc:270