Flutter Impeller
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< TessellatorGetTessellator () 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 > > GetKernelDecalPipeline (ContentContextOptions opts) const
 
std::shared_ptr< Pipeline< PipelineDescriptor > > GetKernelPipeline (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< ContextGetContext () const
 
const CapabilitiesGetDeviceCapabilities () const
 
void SetWireframe (bool wireframe)
 
fml::StatusOr< RenderTargetMakeSubpass (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...
 
fml::StatusOr< RenderTargetMakeSubpass (const std::string &label, const RenderTarget &subpass_target, const SubpassCallback &subpass_callback) const
 Makes a subpass that will render to subpass_target. More...
 
std::shared_ptr< LazyGlyphAtlasGetLazyGlyphAtlas () const
 
std::shared_ptr< RenderTargetAllocatorGetRenderTargetCache () const
 

Detailed Description

Definition at line 332 of file content_context.h.

Member Typedef Documentation

◆ SubpassCallback

Definition at line 708 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 173 of file content_context.cc.

177  : context_(std::move(context)),
178  lazy_glyph_atlas_(
179  std::make_shared<LazyGlyphAtlas>(std::move(typographer_context))),
180  tessellator_(std::make_shared<Tessellator>()),
181 #if IMPELLER_ENABLE_3D
182  scene_context_(std::make_shared<scene::SceneContext>(context_)),
183 #endif // IMPELLER_ENABLE_3D
184  render_target_cache_(render_target_allocator == nullptr
185  ? std::make_shared<RenderTargetCache>(
186  context_->GetResourceAllocator())
187  : std::move(render_target_allocator)) {
188  if (!context_ || !context_->IsValid()) {
189  return;
190  }
191  auto options = ContentContextOptions{
192  .sample_count = SampleCount::kCount4,
193  .color_attachment_pixel_format =
194  context_->GetCapabilities()->GetDefaultColorFormat()};
195  auto options_trianglestrip = ContentContextOptions{
196  .sample_count = SampleCount::kCount4,
197  .primitive_type = PrimitiveType::kTriangleStrip,
198  .color_attachment_pixel_format =
199  context_->GetCapabilities()->GetDefaultColorFormat()};
200  const auto supports_decal = static_cast<Scalar>(
201  context_->GetCapabilities()->SupportsDecalSamplerAddressMode());
202 
203 #ifdef IMPELLER_DEBUG
204  checkerboard_pipelines_.CreateDefault(*context_, options);
205 #endif // IMPELLER_DEBUG
206 
207  solid_fill_pipelines_.CreateDefault(*context_, options);
208 
209  if (context_->GetCapabilities()->SupportsSSBO()) {
210  linear_gradient_ssbo_fill_pipelines_.CreateDefault(*context_, options);
211  radial_gradient_ssbo_fill_pipelines_.CreateDefault(*context_, options);
212  conical_gradient_ssbo_fill_pipelines_.CreateDefault(*context_, options);
213  sweep_gradient_ssbo_fill_pipelines_.CreateDefault(*context_, options);
214  } else {
215  linear_gradient_fill_pipelines_.CreateDefault(*context_, options);
216  radial_gradient_fill_pipelines_.CreateDefault(*context_, options);
217  conical_gradient_fill_pipelines_.CreateDefault(*context_, options);
218  sweep_gradient_fill_pipelines_.CreateDefault(*context_, options);
219  }
220 
221  if (context_->GetCapabilities()->SupportsFramebufferFetch()) {
222  framebuffer_blend_color_pipelines_.CreateDefault(
223  *context_, options_trianglestrip,
224  {static_cast<Scalar>(BlendSelectValues::kColor), supports_decal},
226  framebuffer_blend_colorburn_pipelines_.CreateDefault(
227  *context_, options_trianglestrip,
228  {static_cast<Scalar>(BlendSelectValues::kColorBurn), supports_decal},
230  framebuffer_blend_colordodge_pipelines_.CreateDefault(
231  *context_, options_trianglestrip,
232  {static_cast<Scalar>(BlendSelectValues::kColorDodge), supports_decal},
234  framebuffer_blend_darken_pipelines_.CreateDefault(
235  *context_, options_trianglestrip,
236  {static_cast<Scalar>(BlendSelectValues::kDarken), supports_decal},
238  framebuffer_blend_difference_pipelines_.CreateDefault(
239  *context_, options_trianglestrip,
240  {static_cast<Scalar>(BlendSelectValues::kDifference), supports_decal},
242  framebuffer_blend_exclusion_pipelines_.CreateDefault(
243  *context_, options_trianglestrip,
244  {static_cast<Scalar>(BlendSelectValues::kExclusion), supports_decal},
246  framebuffer_blend_hardlight_pipelines_.CreateDefault(
247  *context_, options_trianglestrip,
248  {static_cast<Scalar>(BlendSelectValues::kHardLight), supports_decal},
250  framebuffer_blend_hue_pipelines_.CreateDefault(
251  *context_, options_trianglestrip,
252  {static_cast<Scalar>(BlendSelectValues::kHue), supports_decal},
254  framebuffer_blend_lighten_pipelines_.CreateDefault(
255  *context_, options_trianglestrip,
256  {static_cast<Scalar>(BlendSelectValues::kLighten), supports_decal},
258  framebuffer_blend_luminosity_pipelines_.CreateDefault(
259  *context_, options_trianglestrip,
260  {static_cast<Scalar>(BlendSelectValues::kLuminosity), supports_decal},
262  framebuffer_blend_multiply_pipelines_.CreateDefault(
263  *context_, options_trianglestrip,
264  {static_cast<Scalar>(BlendSelectValues::kMultiply), supports_decal},
266  framebuffer_blend_overlay_pipelines_.CreateDefault(
267  *context_, options_trianglestrip,
268  {static_cast<Scalar>(BlendSelectValues::kOverlay), supports_decal},
270  framebuffer_blend_saturation_pipelines_.CreateDefault(
271  *context_, options_trianglestrip,
272  {static_cast<Scalar>(BlendSelectValues::kSaturation), supports_decal},
274  framebuffer_blend_screen_pipelines_.CreateDefault(
275  *context_, options_trianglestrip,
276  {static_cast<Scalar>(BlendSelectValues::kScreen), supports_decal},
278  framebuffer_blend_softlight_pipelines_.CreateDefault(
279  *context_, options_trianglestrip,
280  {static_cast<Scalar>(BlendSelectValues::kSoftLight), supports_decal},
282  }
283 
284  blend_color_pipelines_.CreateDefault(
285  *context_, options_trianglestrip,
286  {static_cast<Scalar>(BlendSelectValues::kColor), supports_decal});
287  blend_colorburn_pipelines_.CreateDefault(
288  *context_, options_trianglestrip,
289  {static_cast<Scalar>(BlendSelectValues::kColorBurn), supports_decal});
290  blend_colordodge_pipelines_.CreateDefault(
291  *context_, options_trianglestrip,
292  {static_cast<Scalar>(BlendSelectValues::kColorDodge), supports_decal});
293  blend_darken_pipelines_.CreateDefault(
294  *context_, options_trianglestrip,
295  {static_cast<Scalar>(BlendSelectValues::kDarken), supports_decal});
296  blend_difference_pipelines_.CreateDefault(
297  *context_, options_trianglestrip,
298  {static_cast<Scalar>(BlendSelectValues::kDifference), supports_decal});
299  blend_exclusion_pipelines_.CreateDefault(
300  *context_, options_trianglestrip,
301  {static_cast<Scalar>(BlendSelectValues::kExclusion), supports_decal});
302  blend_hardlight_pipelines_.CreateDefault(
303  *context_, options_trianglestrip,
304  {static_cast<Scalar>(BlendSelectValues::kHardLight), supports_decal});
305  blend_hue_pipelines_.CreateDefault(
306  *context_, options_trianglestrip,
307  {static_cast<Scalar>(BlendSelectValues::kHue), supports_decal});
308  blend_lighten_pipelines_.CreateDefault(
309  *context_, options_trianglestrip,
310  {static_cast<Scalar>(BlendSelectValues::kLighten), supports_decal});
311  blend_luminosity_pipelines_.CreateDefault(
312  *context_, options_trianglestrip,
313  {static_cast<Scalar>(BlendSelectValues::kLuminosity), supports_decal});
314  blend_multiply_pipelines_.CreateDefault(
315  *context_, options_trianglestrip,
316  {static_cast<Scalar>(BlendSelectValues::kMultiply), supports_decal});
317  blend_overlay_pipelines_.CreateDefault(
318  *context_, options_trianglestrip,
319  {static_cast<Scalar>(BlendSelectValues::kOverlay), supports_decal});
320  blend_saturation_pipelines_.CreateDefault(
321  *context_, options_trianglestrip,
322  {static_cast<Scalar>(BlendSelectValues::kSaturation), supports_decal});
323  blend_screen_pipelines_.CreateDefault(
324  *context_, options_trianglestrip,
325  {static_cast<Scalar>(BlendSelectValues::kScreen), supports_decal});
326  blend_softlight_pipelines_.CreateDefault(
327  *context_, options_trianglestrip,
328  {static_cast<Scalar>(BlendSelectValues::kSoftLight), supports_decal});
329 
330  rrect_blur_pipelines_.CreateDefault(*context_, options_trianglestrip);
331  texture_blend_pipelines_.CreateDefault(*context_, options);
332  texture_pipelines_.CreateDefault(*context_, options);
333  position_uv_pipelines_.CreateDefault(*context_, options);
334  tiled_texture_pipelines_.CreateDefault(*context_, options);
335  gaussian_blur_noalpha_decal_pipelines_.CreateDefault(*context_,
336  options_trianglestrip);
337  gaussian_blur_noalpha_nodecal_pipelines_.CreateDefault(*context_,
338  options_trianglestrip);
339  kernel_decal_pipelines_.CreateDefault(*context_, options_trianglestrip);
340  kernel_nodecal_pipelines_.CreateDefault(*context_, options_trianglestrip);
341  border_mask_blur_pipelines_.CreateDefault(*context_, options_trianglestrip);
342  morphology_filter_pipelines_.CreateDefault(*context_, options_trianglestrip,
343  {supports_decal});
344  color_matrix_color_filter_pipelines_.CreateDefault(*context_,
345  options_trianglestrip);
346  linear_to_srgb_filter_pipelines_.CreateDefault(*context_,
347  options_trianglestrip);
348  srgb_to_linear_filter_pipelines_.CreateDefault(*context_,
349  options_trianglestrip);
350  glyph_atlas_pipelines_.CreateDefault(*context_, options);
351  glyph_atlas_color_pipelines_.CreateDefault(*context_, options);
352  geometry_color_pipelines_.CreateDefault(*context_, options);
353  yuv_to_rgb_filter_pipelines_.CreateDefault(*context_, options_trianglestrip);
354  porter_duff_blend_pipelines_.CreateDefault(*context_, options_trianglestrip,
355  {supports_decal});
356  // GLES only shader that is unsupported on macOS.
357 #if defined(IMPELLER_ENABLE_OPENGLES) && !defined(FML_OS_MACOSX)
358  if (GetContext()->GetBackendType() == Context::BackendType::kOpenGLES) {
359  texture_external_pipelines_.CreateDefault(*context_, options);
360  }
361  if (GetContext()->GetBackendType() == Context::BackendType::kOpenGLES) {
362  tiled_texture_external_pipelines_.CreateDefault(*context_, options);
363  }
364 #endif // IMPELLER_ENABLE_OPENGLES
365  if (context_->GetCapabilities()->SupportsCompute()) {
366  auto pipeline_desc =
368  point_field_compute_pipelines_ =
369  context_->GetPipelineLibrary()->GetPipeline(pipeline_desc).Get();
370 
371  auto uv_pipeline_desc =
373  uv_compute_pipelines_ =
374  context_->GetPipelineLibrary()->GetPipeline(uv_pipeline_desc).Get();
375  }
376 
377  /// Setup default clip pipeline.
378 
379  auto clip_pipeline_descriptor =
381  if (!clip_pipeline_descriptor.has_value()) {
382  return;
383  }
384  ContentContextOptions{
385  .sample_count = SampleCount::kCount4,
386  .color_attachment_pixel_format =
387  context_->GetCapabilities()->GetDefaultColorFormat()}
388  .ApplyToPipelineDescriptor(*clip_pipeline_descriptor);
389  // Disable write to all color attachments.
390  auto clip_color_attachments =
391  clip_pipeline_descriptor->GetColorAttachmentDescriptors();
392  for (auto& color_attachment : clip_color_attachments) {
393  color_attachment.second.write_mask =
394  static_cast<uint64_t>(ColorWriteMask::kNone);
395  }
396  clip_pipeline_descriptor->SetColorAttachmentDescriptors(
397  std::move(clip_color_attachments));
398  clip_pipelines_.SetDefault(options, std::make_unique<ClipPipeline>(
399  *context_, clip_pipeline_descriptor));
400 
401  is_valid_ = true;
402 }

References GetContext(), impeller::kColor, impeller::kColorBurn, impeller::kColorDodge, impeller::kCount4, impeller::kDarken, impeller::kDifference, impeller::kExclusion, impeller::kHardLight, impeller::kHue, impeller::kLighten, impeller::kLuminosity, impeller::kMultiply, impeller::kNone, impeller::Context::kOpenGLES, impeller::kOverlay, impeller::kSaturation, impeller::kScreen, impeller::kSoftLight, impeller::kTriangleStrip, impeller::kYes, 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 528 of file content_context.h.

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

◆ GetBlendColorDodgePipeline()

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

Definition at line 533 of file content_context.h.

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

◆ GetBlendColorPipeline()

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

Definition at line 523 of file content_context.h.

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

◆ GetBlendDarkenPipeline()

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

Definition at line 538 of file content_context.h.

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

◆ GetBlendDifferencePipeline()

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

Definition at line 543 of file content_context.h.

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

◆ GetBlendExclusionPipeline()

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

Definition at line 548 of file content_context.h.

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

◆ GetBlendHardLightPipeline()

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

Definition at line 553 of file content_context.h.

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

◆ GetBlendHuePipeline()

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

Definition at line 558 of file content_context.h.

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

◆ GetBlendLightenPipeline()

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

Definition at line 563 of file content_context.h.

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

◆ GetBlendLuminosityPipeline()

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

Definition at line 568 of file content_context.h.

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

◆ GetBlendMultiplyPipeline()

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

Definition at line 573 of file content_context.h.

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

◆ GetBlendOverlayPipeline()

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

Definition at line 578 of file content_context.h.

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

◆ GetBlendPipeline()

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

Definition at line 410 of file content_context.h.

411  {
412  return GetPipeline(texture_blend_pipelines_, opts);
413  }

Referenced by impeller::PipelineBlend().

◆ GetBlendSaturationPipeline()

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

Definition at line 583 of file content_context.h.

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

◆ GetBlendScreenPipeline()

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

Definition at line 588 of file content_context.h.

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

◆ GetBlendSoftLightPipeline()

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

Definition at line 593 of file content_context.h.

594  {
595  return GetPipeline(blend_softlight_pipelines_, opts);
596  }

◆ GetBorderMaskBlurPipeline()

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

Definition at line 466 of file content_context.h.

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

◆ GetClipPipeline()

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

Definition at line 491 of file content_context.h.

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

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 477 of file content_context.h.

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

◆ GetConicalGradientFillPipeline()

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

Definition at line 390 of file content_context.h.

391  {
392  return GetPipeline(conical_gradient_fill_pipelines_, opts);
393  }

◆ GetConicalGradientSSBOFillPipeline()

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

Definition at line 374 of file content_context.h.

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

References GetDeviceCapabilities().

◆ GetContext()

◆ GetDeviceCapabilities()

◆ GetFramebufferBlendColorBurnPipeline()

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

Definition at line 606 of file content_context.h.

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

References GetDeviceCapabilities().

◆ GetFramebufferBlendColorDodgePipeline()

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

Definition at line 612 of file content_context.h.

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

References GetDeviceCapabilities().

◆ GetFramebufferBlendColorPipeline()

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

Definition at line 600 of file content_context.h.

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

References GetDeviceCapabilities().

◆ GetFramebufferBlendDarkenPipeline()

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

Definition at line 618 of file content_context.h.

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

References GetDeviceCapabilities().

◆ GetFramebufferBlendDifferencePipeline()

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

Definition at line 624 of file content_context.h.

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

References GetDeviceCapabilities().

◆ GetFramebufferBlendExclusionPipeline()

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

Definition at line 630 of file content_context.h.

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

References GetDeviceCapabilities().

◆ GetFramebufferBlendHardLightPipeline()

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

Definition at line 636 of file content_context.h.

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

References GetDeviceCapabilities().

◆ GetFramebufferBlendHuePipeline()

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

Definition at line 641 of file content_context.h.

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

References GetDeviceCapabilities().

◆ GetFramebufferBlendLightenPipeline()

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

Definition at line 648 of file content_context.h.

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

References GetDeviceCapabilities().

◆ GetFramebufferBlendLuminosityPipeline()

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

Definition at line 654 of file content_context.h.

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

References GetDeviceCapabilities().

◆ GetFramebufferBlendMultiplyPipeline()

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

Definition at line 660 of file content_context.h.

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

References GetDeviceCapabilities().

◆ GetFramebufferBlendOverlayPipeline()

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

Definition at line 666 of file content_context.h.

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

References GetDeviceCapabilities().

◆ GetFramebufferBlendSaturationPipeline()

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

Definition at line 672 of file content_context.h.

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

References GetDeviceCapabilities().

◆ GetFramebufferBlendScreenPipeline()

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

Definition at line 678 of file content_context.h.

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

References GetDeviceCapabilities().

◆ GetFramebufferBlendSoftLightPipeline()

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

Definition at line 684 of file content_context.h.

684  {
685  FML_DCHECK(GetDeviceCapabilities().SupportsFramebufferFetch());
686  return GetPipeline(framebuffer_blend_softlight_pipelines_, opts);
687  }

References GetDeviceCapabilities().

◆ GetGaussianBlurDecalPipeline()

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

Definition at line 446 of file content_context.h.

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

◆ GetGaussianBlurPipeline()

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

Definition at line 451 of file content_context.h.

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

◆ GetGeometryColorPipeline()

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

Definition at line 506 of file content_context.h.

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

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 501 of file content_context.h.

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

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

◆ GetGlyphAtlasPipeline()

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

Definition at line 496 of file content_context.h.

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

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

◆ GetKernelDecalPipeline()

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

Definition at line 456 of file content_context.h.

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

◆ GetKernelPipeline()

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

Definition at line 461 of file content_context.h.

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

◆ GetLazyGlyphAtlas()

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

Definition at line 724 of file content_context.h.

724  {
725  return lazy_glyph_atlas_;
726  }

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 356 of file content_context.h.

357  {
358  return GetPipeline(linear_gradient_fill_pipelines_, opts);
359  }

◆ GetLinearGradientSSBOFillPipeline()

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

Definition at line 362 of file content_context.h.

362  {
363  FML_DCHECK(GetDeviceCapabilities().SupportsSSBO());
364  return GetPipeline(linear_gradient_ssbo_fill_pipelines_, opts);
365  }

References GetDeviceCapabilities().

◆ GetLinearToSrgbFilterPipeline()

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

Definition at line 481 of file content_context.h.

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

◆ GetMorphologyFilterPipeline()

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

Definition at line 471 of file content_context.h.

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

◆ GetPointComputePipeline()

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

Definition at line 689 of file content_context.h.

690  {
691  FML_DCHECK(GetDeviceCapabilities().SupportsCompute());
692  return point_field_compute_pipelines_;
693  }

References GetDeviceCapabilities().

◆ GetPorterDuffBlendPipeline()

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

Definition at line 516 of file content_context.h.

517  {
518  return GetPipeline(porter_duff_blend_pipelines_, opts);
519  }

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

◆ GetPositionUVPipeline()

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

Definition at line 436 of file content_context.h.

437  {
438  return GetPipeline(position_uv_pipelines_, opts);
439  }

◆ GetRadialGradientFillPipeline()

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

Definition at line 385 of file content_context.h.

386  {
387  return GetPipeline(radial_gradient_fill_pipelines_, opts);
388  }

◆ GetRadialGradientSSBOFillPipeline()

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

Definition at line 368 of file content_context.h.

368  {
369  FML_DCHECK(GetDeviceCapabilities().SupportsSSBO());
370  return GetPipeline(radial_gradient_ssbo_fill_pipelines_, opts);
371  }

References GetDeviceCapabilities().

◆ GetRenderTargetCache()

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

Definition at line 728 of file content_context.h.

728  {
729  return render_target_cache_;
730  }

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 395 of file content_context.h.

396  {
397  return GetPipeline(rrect_blur_pipelines_, opts);
398  }

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

◆ GetSolidFillPipeline()

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

Definition at line 405 of file content_context.h.

406  {
407  return GetPipeline(solid_fill_pipelines_, opts);
408  }

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 486 of file content_context.h.

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

◆ GetSweepGradientFillPipeline()

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

Definition at line 400 of file content_context.h.

401  {
402  return GetPipeline(sweep_gradient_fill_pipelines_, opts);
403  }

◆ GetSweepGradientSSBOFillPipeline()

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

Definition at line 380 of file content_context.h.

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

References GetDeviceCapabilities().

◆ GetTessellator()

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

Definition at line 475 of file content_context.cc.

475  {
476  return tessellator_;
477 }

◆ GetTexturePipeline()

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

Definition at line 415 of file content_context.h.

416  {
417  return GetPipeline(texture_pipelines_, opts);
418  }

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 441 of file content_context.h.

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

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

◆ GetUvComputePipeline()

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

Definition at line 695 of file content_context.h.

696  {
697  FML_DCHECK(GetDeviceCapabilities().SupportsCompute());
698  return uv_compute_pipelines_;
699  }

References GetDeviceCapabilities().

◆ GetYUVToRGBFilterPipeline()

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

Definition at line 511 of file content_context.h.

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

◆ IsValid()

bool impeller::ContentContext::IsValid ( ) const

Definition at line 406 of file content_context.cc.

406  {
407  return is_valid_;
408 }

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

◆ MakeSubpass() [1/2]

fml::StatusOr< RenderTarget > impeller::ContentContext::MakeSubpass ( const std::string &  label,
const RenderTarget subpass_target,
const SubpassCallback subpass_callback 
) const

Makes a subpass that will render to subpass_target.

Definition at line 435 of file content_context.cc.

438  {
439  std::shared_ptr<Context> context = GetContext();
440 
441  auto subpass_texture = subpass_target.GetRenderTargetTexture();
442  if (!subpass_texture) {
443  return fml::Status(fml::StatusCode::kUnknown, "");
444  }
445 
446  auto sub_command_buffer = context->CreateCommandBuffer();
447  sub_command_buffer->SetLabel(SPrintF("%s CommandBuffer", label.c_str()));
448  if (!sub_command_buffer) {
449  return fml::Status(fml::StatusCode::kUnknown, "");
450  }
451 
452  auto sub_renderpass = sub_command_buffer->CreateRenderPass(subpass_target);
453  if (!sub_renderpass) {
454  return fml::Status(fml::StatusCode::kUnknown, "");
455  }
456  sub_renderpass->SetLabel(SPrintF("%s RenderPass", label.c_str()));
457 
458  if (!subpass_callback(*this, *sub_renderpass)) {
459  return fml::Status(fml::StatusCode::kUnknown, "");
460  }
461 
462  if (!sub_command_buffer->EncodeAndSubmit(sub_renderpass)) {
463  return fml::Status(fml::StatusCode::kUnknown, "");
464  }
465 
466  return subpass_target;
467 }

References GetContext(), impeller::RenderTarget::GetRenderTargetTexture(), and impeller::SPrintF().

◆ MakeSubpass() [2/2]

fml::StatusOr< RenderTarget > 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 410 of file content_context.cc.

414  {
415  std::shared_ptr<Context> context = GetContext();
416  RenderTarget subpass_target;
417  if (context->GetCapabilities()->SupportsOffscreenMSAA() && msaa_enabled) {
418  subpass_target = RenderTarget::CreateOffscreenMSAA(
419  *context, *GetRenderTargetCache(), texture_size,
420  SPrintF("%s Offscreen", label.c_str()),
422  std::nullopt // stencil_attachment_config
423  );
424  } else {
425  subpass_target = RenderTarget::CreateOffscreen(
426  *context, *GetRenderTargetCache(), texture_size,
427  SPrintF("%s Offscreen", label.c_str()),
429  std::nullopt // stencil_attachment_config
430  );
431  }
432  return MakeSubpass(label, subpass_target, subpass_callback);
433 }

References impeller::RenderTarget::CreateOffscreen(), impeller::RenderTarget::CreateOffscreenMSAA(), GetContext(), GetRenderTargetCache(), 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 487 of file content_context.cc.

487  {
488  wireframe_ = wireframe;
489 }

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


The documentation for this class was generated from the following files:
impeller::BlendSelectValues::kSaturation
@ kSaturation
impeller::kColor
@ kColor
impeller::Scalar
float Scalar
Definition: scalar.h:18
impeller::BlendSelectValues::kColorBurn
@ kColorBurn
impeller::RenderTarget::kDefaultColorAttachmentConfig
static constexpr AttachmentConfig kDefaultColorAttachmentConfig
Definition: render_target.h:66
impeller::BlendSelectValues::kMultiply
@ kMultiply
impeller::ContentContext::MakeSubpass
fml::StatusOr< RenderTarget > 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 t...
Definition: content_context.cc:410
impeller::RenderTarget::kDefaultColorAttachmentConfigMSAA
static constexpr AttachmentConfigMSAA kDefaultColorAttachmentConfigMSAA
Definition: render_target.h:72
impeller::BlendSelectValues::kSoftLight
@ kSoftLight
impeller::BlendSelectValues::kDifference
@ kDifference
impeller::BlendSelectValues::kDarken
@ kDarken
impeller::BlendSelectValues::kExclusion
@ kExclusion
impeller::PrimitiveType::kTriangleStrip
@ kTriangleStrip
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:40
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:479
impeller::ColorWriteMask::kNone
@ kNone
impeller::ContentContext::GetRenderTargetCache
std::shared_ptr< RenderTargetAllocator > GetRenderTargetCache() const
Definition: content_context.h:728
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:483
impeller::BlendSelectValues::kHardLight
@ kHardLight
impeller::BlendSelectValues::kScreen
@ kScreen
impeller::BlendSelectValues::kLighten
@ kLighten
impeller::BlendSelectValues::kHue
@ kHue
impeller::SampleCount::kCount4
@ kCount4
impeller::BlendSelectValues::kLuminosity
@ kLuminosity
impeller::UseSubpassInput::kYes
@ kYes
impeller::PipelineBuilder::MakeDefaultPipelineDescriptor
static std::optional< PipelineDescriptor > MakeDefaultPipelineDescriptor(const Context &context, const std::vector< Scalar > &constants={})
Create a default pipeline descriptor using the combination reflected shader information....
Definition: pipeline_builder.h:51
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:265
impeller::BlendSelectValues::kColorDodge
@ kColorDodge
impeller::BlendSelectValues::kOverlay
@ kOverlay