Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Classes | 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< 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 > > GetTexturePipeline (ContentContextOptions opts) const
 
std::shared_ptr< Pipeline< PipelineDescriptor > > GetTextureStrictSrcPipeline (ContentContextOptions opts) const
 
std::shared_ptr< Pipeline< PipelineDescriptor > > GetTiledTexturePipeline (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 > > 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< PipelineDescriptor > > GetDrawVerticesUberShader (ContentContextOptions opts) const
 
std::shared_ptr< TextureGetEmptyTexture () const
 
std::shared_ptr< ContextGetContext () const
 
const CapabilitiesGetDeviceCapabilities () const
 
void SetWireframe (bool wireframe)
 
fml::StatusOr< RenderTargetMakeSubpass (std::string_view label, ISize texture_size, const std::shared_ptr< CommandBuffer > &command_buffer, const SubpassCallback &subpass_callback, bool msaa_enabled=true, bool depth_stencil_enabled=false, int32_t mip_count=1) const
 Creates a new texture of size texture_size and calls subpass_callback with a RenderPass for drawing to the texture.
 
fml::StatusOr< RenderTargetMakeSubpass (std::string_view label, const RenderTarget &subpass_target, const std::shared_ptr< CommandBuffer > &command_buffer, const SubpassCallback &subpass_callback) const
 Makes a subpass that will render to subpass_target.
 
const std::shared_ptr< LazyGlyphAtlas > & GetLazyGlyphAtlas () const
 
const std::shared_ptr< RenderTargetAllocator > & GetRenderTargetCache () const
 
std::shared_ptr< Pipeline< PipelineDescriptor > > GetCachedRuntimeEffectPipeline (const std::string &unique_entrypoint_name, const ContentContextOptions &options, const std::function< std::shared_ptr< Pipeline< PipelineDescriptor > >()> &create_callback) const
 
void ClearCachedRuntimeEffectPipeline (const std::string &unique_entrypoint_name) const
 
HostBufferGetTransientsBuffer () const
 Retrieve the currnent host buffer for transient storage.
 

Detailed Description

Definition at line 375 of file content_context.h.

Member Typedef Documentation

◆ SubpassCallback

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

243 : context_(std::move(context)),
244 lazy_glyph_atlas_(
245 std::make_shared<LazyGlyphAtlas>(std::move(typographer_context))),
246 tessellator_(std::make_shared<Tessellator>()),
247#if IMPELLER_ENABLE_3D
248 scene_context_(std::make_shared<scene::SceneContext>(context_)),
249#endif // IMPELLER_ENABLE_3D
250 render_target_cache_(render_target_allocator == nullptr
251 ? std::make_shared<RenderTargetCache>(
252 context_->GetResourceAllocator())
253 : std::move(render_target_allocator)),
254 host_buffer_(HostBuffer::Create(context_->GetResourceAllocator())) {
255 if (!context_ || !context_->IsValid()) {
256 return;
257 }
258
259 {
260 TextureDescriptor desc;
261 desc.storage_mode = StorageMode::kHostVisible;
263 desc.size = ISize{1, 1};
264 empty_texture_ = GetContext()->GetResourceAllocator()->CreateTexture(desc);
266 if (!empty_texture_->SetContents(data.data(), 4)) {
267 VALIDATION_LOG << "Failed to create empty texture.";
268 }
269 }
270
271 auto options = ContentContextOptions{
272 .sample_count = SampleCount::kCount4,
273 .color_attachment_pixel_format =
274 context_->GetCapabilities()->GetDefaultColorFormat()};
275 auto options_trianglestrip = ContentContextOptions{
276 .sample_count = SampleCount::kCount4,
277 .primitive_type = PrimitiveType::kTriangleStrip,
278 .color_attachment_pixel_format =
279 context_->GetCapabilities()->GetDefaultColorFormat()};
280 const auto supports_decal = static_cast<Scalar>(
281 context_->GetCapabilities()->SupportsDecalSamplerAddressMode());
282
283#ifdef IMPELLER_DEBUG
284 checkerboard_pipelines_.CreateDefault(*context_, options);
285#endif // IMPELLER_DEBUG
286
287 {
288 solid_fill_pipelines_.CreateDefault(*context_, options);
289 texture_pipelines_.CreateDefault(*context_, options);
290
291 if (context_->GetCapabilities()->SupportsSSBO()) {
292 linear_gradient_ssbo_fill_pipelines_.CreateDefault(*context_, options);
293 radial_gradient_ssbo_fill_pipelines_.CreateDefault(*context_, options);
294 conical_gradient_ssbo_fill_pipelines_.CreateDefault(*context_, options);
295 sweep_gradient_ssbo_fill_pipelines_.CreateDefault(*context_, options);
296 } else {
297 linear_gradient_fill_pipelines_.CreateDefault(*context_, options);
298 radial_gradient_fill_pipelines_.CreateDefault(*context_, options);
299 conical_gradient_fill_pipelines_.CreateDefault(*context_, options);
300 sweep_gradient_fill_pipelines_.CreateDefault(*context_, options);
301 }
302
303 /// Setup default clip pipeline.
304
305 auto clip_pipeline_descriptor =
306 ClipPipeline::Builder::MakeDefaultPipelineDescriptor(*context_);
307 if (!clip_pipeline_descriptor.has_value()) {
308 return;
309 }
310 ContentContextOptions{
311 .sample_count = SampleCount::kCount4,
312 .color_attachment_pixel_format =
313 context_->GetCapabilities()->GetDefaultColorFormat()}
314 .ApplyToPipelineDescriptor(*clip_pipeline_descriptor);
315 // Disable write to all color attachments.
316 auto clip_color_attachments =
317 clip_pipeline_descriptor->GetColorAttachmentDescriptors();
318 for (auto& color_attachment : clip_color_attachments) {
319 color_attachment.second.write_mask = ColorWriteMaskBits::kNone;
320 }
321 clip_pipeline_descriptor->SetColorAttachmentDescriptors(
322 std::move(clip_color_attachments));
323 clip_pipelines_.SetDefault(
324 options,
325 std::make_unique<ClipPipeline>(*context_, clip_pipeline_descriptor));
326 }
327
328 if (context_->GetCapabilities()->SupportsFramebufferFetch()) {
329 framebuffer_blend_color_pipelines_.CreateDefault(
330 *context_, options_trianglestrip,
331 {static_cast<Scalar>(BlendSelectValues::kColor), supports_decal});
332 framebuffer_blend_colorburn_pipelines_.CreateDefault(
333 *context_, options_trianglestrip,
334 {static_cast<Scalar>(BlendSelectValues::kColorBurn), supports_decal});
335 framebuffer_blend_colordodge_pipelines_.CreateDefault(
336 *context_, options_trianglestrip,
337 {static_cast<Scalar>(BlendSelectValues::kColorDodge), supports_decal});
338 framebuffer_blend_darken_pipelines_.CreateDefault(
339 *context_, options_trianglestrip,
340 {static_cast<Scalar>(BlendSelectValues::kDarken), supports_decal});
341 framebuffer_blend_difference_pipelines_.CreateDefault(
342 *context_, options_trianglestrip,
343 {static_cast<Scalar>(BlendSelectValues::kDifference), supports_decal});
344 framebuffer_blend_exclusion_pipelines_.CreateDefault(
345 *context_, options_trianglestrip,
346 {static_cast<Scalar>(BlendSelectValues::kExclusion), supports_decal});
347 framebuffer_blend_hardlight_pipelines_.CreateDefault(
348 *context_, options_trianglestrip,
349 {static_cast<Scalar>(BlendSelectValues::kHardLight), supports_decal});
350 framebuffer_blend_hue_pipelines_.CreateDefault(
351 *context_, options_trianglestrip,
352 {static_cast<Scalar>(BlendSelectValues::kHue), supports_decal});
353 framebuffer_blend_lighten_pipelines_.CreateDefault(
354 *context_, options_trianglestrip,
355 {static_cast<Scalar>(BlendSelectValues::kLighten), supports_decal});
356 framebuffer_blend_luminosity_pipelines_.CreateDefault(
357 *context_, options_trianglestrip,
358 {static_cast<Scalar>(BlendSelectValues::kLuminosity), supports_decal});
359 framebuffer_blend_multiply_pipelines_.CreateDefault(
360 *context_, options_trianglestrip,
361 {static_cast<Scalar>(BlendSelectValues::kMultiply), supports_decal});
362 framebuffer_blend_overlay_pipelines_.CreateDefault(
363 *context_, options_trianglestrip,
364 {static_cast<Scalar>(BlendSelectValues::kOverlay), supports_decal});
365 framebuffer_blend_saturation_pipelines_.CreateDefault(
366 *context_, options_trianglestrip,
367 {static_cast<Scalar>(BlendSelectValues::kSaturation), supports_decal});
368 framebuffer_blend_screen_pipelines_.CreateDefault(
369 *context_, options_trianglestrip,
370 {static_cast<Scalar>(BlendSelectValues::kScreen), supports_decal});
371 framebuffer_blend_softlight_pipelines_.CreateDefault(
372 *context_, options_trianglestrip,
373 {static_cast<Scalar>(BlendSelectValues::kSoftLight), supports_decal});
374 } else {
375 blend_color_pipelines_.CreateDefault(
376 *context_, options_trianglestrip,
377 {static_cast<Scalar>(BlendSelectValues::kColor), supports_decal});
378 blend_colorburn_pipelines_.CreateDefault(
379 *context_, options_trianglestrip,
380 {static_cast<Scalar>(BlendSelectValues::kColorBurn), supports_decal});
381 blend_colordodge_pipelines_.CreateDefault(
382 *context_, options_trianglestrip,
383 {static_cast<Scalar>(BlendSelectValues::kColorDodge), supports_decal});
384 blend_darken_pipelines_.CreateDefault(
385 *context_, options_trianglestrip,
386 {static_cast<Scalar>(BlendSelectValues::kDarken), supports_decal});
387 blend_difference_pipelines_.CreateDefault(
388 *context_, options_trianglestrip,
389 {static_cast<Scalar>(BlendSelectValues::kDifference), supports_decal});
390 blend_exclusion_pipelines_.CreateDefault(
391 *context_, options_trianglestrip,
392 {static_cast<Scalar>(BlendSelectValues::kExclusion), supports_decal});
393 blend_hardlight_pipelines_.CreateDefault(
394 *context_, options_trianglestrip,
395 {static_cast<Scalar>(BlendSelectValues::kHardLight), supports_decal});
396 blend_hue_pipelines_.CreateDefault(
397 *context_, options_trianglestrip,
398 {static_cast<Scalar>(BlendSelectValues::kHue), supports_decal});
399 blend_lighten_pipelines_.CreateDefault(
400 *context_, options_trianglestrip,
401 {static_cast<Scalar>(BlendSelectValues::kLighten), supports_decal});
402 blend_luminosity_pipelines_.CreateDefault(
403 *context_, options_trianglestrip,
404 {static_cast<Scalar>(BlendSelectValues::kLuminosity), supports_decal});
405 blend_multiply_pipelines_.CreateDefault(
406 *context_, options_trianglestrip,
407 {static_cast<Scalar>(BlendSelectValues::kMultiply), supports_decal});
408 blend_overlay_pipelines_.CreateDefault(
409 *context_, options_trianglestrip,
410 {static_cast<Scalar>(BlendSelectValues::kOverlay), supports_decal});
411 blend_saturation_pipelines_.CreateDefault(
412 *context_, options_trianglestrip,
413 {static_cast<Scalar>(BlendSelectValues::kSaturation), supports_decal});
414 blend_screen_pipelines_.CreateDefault(
415 *context_, options_trianglestrip,
416 {static_cast<Scalar>(BlendSelectValues::kScreen), supports_decal});
417 blend_softlight_pipelines_.CreateDefault(
418 *context_, options_trianglestrip,
419 {static_cast<Scalar>(BlendSelectValues::kSoftLight), supports_decal});
420 }
421
422 rrect_blur_pipelines_.CreateDefault(*context_, options_trianglestrip);
423 texture_strict_src_pipelines_.CreateDefault(*context_, options);
424 tiled_texture_pipelines_.CreateDefault(*context_, options, {supports_decal});
425 gaussian_blur_pipelines_.CreateDefault(*context_, options_trianglestrip,
426 {supports_decal});
427 border_mask_blur_pipelines_.CreateDefault(*context_, options_trianglestrip);
428 morphology_filter_pipelines_.CreateDefault(*context_, options_trianglestrip,
429 {supports_decal});
430 color_matrix_color_filter_pipelines_.CreateDefault(*context_,
431 options_trianglestrip);
432 linear_to_srgb_filter_pipelines_.CreateDefault(*context_,
433 options_trianglestrip);
434 srgb_to_linear_filter_pipelines_.CreateDefault(*context_,
435 options_trianglestrip);
436 glyph_atlas_pipelines_.CreateDefault(
437 *context_, options,
438 {static_cast<Scalar>(
439 GetContext()->GetCapabilities()->GetDefaultGlyphAtlasFormat() ==
441 yuv_to_rgb_filter_pipelines_.CreateDefault(*context_, options_trianglestrip);
442 porter_duff_blend_pipelines_.CreateDefault(*context_, options_trianglestrip,
443 {supports_decal});
444 vertices_uber_shader_.CreateDefault(*context_, options, {supports_decal});
445 // GLES only shader that is unsupported on macOS.
446#if defined(IMPELLER_ENABLE_OPENGLES) && !defined(FML_OS_MACOSX)
447 if (GetContext()->GetBackendType() == Context::BackendType::kOpenGLES) {
448 tiled_texture_external_pipelines_.CreateDefault(*context_, options);
449 }
450#endif // IMPELLER_ENABLE_OPENGLES
451
452 is_valid_ = true;
453 InitializeCommonlyUsedShadersIfNeeded();
454}
const char * options
static sk_sp< Effect > Create()
std::shared_ptr< Context > GetContext() const
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot data
Definition switches.h:41
float Scalar
Definition scalar.h:18
TSize< int64_t > ISize
Definition size.h:138
Definition ref_ptr.h:256
constexpr std::array< uint8_t, 4 > ToR8G8B8A8() const
Convert to R8G8B8A8 representation.
Definition color.h:248
static constexpr Color BlackTransparent()
Definition color.h:262
#define VALIDATION_LOG
Definition validation.h:73

◆ ~ContentContext()

impeller::ContentContext::~ContentContext ( )
default

Member Function Documentation

◆ ClearCachedRuntimeEffectPipeline()

void impeller::ContentContext::ClearCachedRuntimeEffectPipeline ( const std::string &  unique_entrypoint_name) const

Used by hot reload/hot restart to clear a cached pipeline from GetCachedRuntimeEffectPipeline.

Definition at line 570 of file content_context.cc.

571 {
572 for (auto it = runtime_effect_pipelines_.begin();
573 it != runtime_effect_pipelines_.end();) {
574 if (it->first.unique_entrypoint_name == unique_entrypoint_name) {
575 it = runtime_effect_pipelines_.erase(it);
576 } else {
577 it++;
578 }
579 }
580}

◆ GetBlendColorBurnPipeline()

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

Definition at line 534 of file content_context.h.

535 {
536 return GetPipeline(blend_colorburn_pipelines_, opts);
537 }

◆ GetBlendColorDodgePipeline()

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

Definition at line 539 of file content_context.h.

540 {
541 return GetPipeline(blend_colordodge_pipelines_, opts);
542 }

◆ GetBlendColorPipeline()

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

Definition at line 529 of file content_context.h.

530 {
531 return GetPipeline(blend_color_pipelines_, opts);
532 }

◆ GetBlendDarkenPipeline()

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

Definition at line 544 of file content_context.h.

545 {
546 return GetPipeline(blend_darken_pipelines_, opts);
547 }

◆ GetBlendDifferencePipeline()

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

Definition at line 549 of file content_context.h.

550 {
551 return GetPipeline(blend_difference_pipelines_, opts);
552 }

◆ GetBlendExclusionPipeline()

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

Definition at line 554 of file content_context.h.

555 {
556 return GetPipeline(blend_exclusion_pipelines_, opts);
557 }

◆ GetBlendHardLightPipeline()

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

Definition at line 559 of file content_context.h.

560 {
561 return GetPipeline(blend_hardlight_pipelines_, opts);
562 }

◆ GetBlendHuePipeline()

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

Definition at line 564 of file content_context.h.

565 {
566 return GetPipeline(blend_hue_pipelines_, opts);
567 }

◆ GetBlendLightenPipeline()

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

Definition at line 569 of file content_context.h.

570 {
571 return GetPipeline(blend_lighten_pipelines_, opts);
572 }

◆ GetBlendLuminosityPipeline()

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

Definition at line 574 of file content_context.h.

575 {
576 return GetPipeline(blend_luminosity_pipelines_, opts);
577 }

◆ GetBlendMultiplyPipeline()

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

Definition at line 579 of file content_context.h.

580 {
581 return GetPipeline(blend_multiply_pipelines_, opts);
582 }

◆ GetBlendOverlayPipeline()

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

Definition at line 584 of file content_context.h.

585 {
586 return GetPipeline(blend_overlay_pipelines_, opts);
587 }

◆ GetBlendSaturationPipeline()

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

Definition at line 589 of file content_context.h.

590 {
591 return GetPipeline(blend_saturation_pipelines_, opts);
592 }

◆ GetBlendScreenPipeline()

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

Definition at line 594 of file content_context.h.

595 {
596 return GetPipeline(blend_screen_pipelines_, opts);
597 }

◆ GetBlendSoftLightPipeline()

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

Definition at line 599 of file content_context.h.

600 {
601 return GetPipeline(blend_softlight_pipelines_, opts);
602 }

◆ GetBorderMaskBlurPipeline()

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

Definition at line 482 of file content_context.h.

483 {
484 return GetPipeline(border_mask_blur_pipelines_, opts);
485 }

◆ GetCachedRuntimeEffectPipeline()

std::shared_ptr< Pipeline< PipelineDescriptor > > impeller::ContentContext::GetCachedRuntimeEffectPipeline ( const std::string &  unique_entrypoint_name,
const ContentContextOptions options,
const std::function< std::shared_ptr< Pipeline< PipelineDescriptor > >()> &  create_callback 
) const

RuntimeEffect pipelines must be obtained via this method to avoid re-creating them every frame.

The unique_entrypoint_name comes from RuntimeEffect::GetEntrypoint. Impellerc generates a unique entrypoint name for runtime effect shaders based on the input file name and shader stage.

The create_callback is synchronously invoked exactly once if a cached pipeline is not found.

Definition at line 557 of file content_context.cc.

561 {
562 RuntimeEffectPipelineKey key{unique_entrypoint_name, options};
563 auto it = runtime_effect_pipelines_.find(key);
564 if (it == runtime_effect_pipelines_.end()) {
565 it = runtime_effect_pipelines_.insert(it, {key, create_callback()});
566 }
567 return it->second;
568}

◆ GetClipPipeline()

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

Definition at line 507 of file content_context.h.

508 {
509 return GetPipeline(clip_pipelines_, opts);
510 }

◆ GetColorMatrixColorFilterPipeline()

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

Definition at line 493 of file content_context.h.

493 {
494 return GetPipeline(color_matrix_color_filter_pipelines_, opts);
495 }

◆ GetConicalGradientFillPipeline()

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

Definition at line 433 of file content_context.h.

434 {
435 return GetPipeline(conical_gradient_fill_pipelines_, opts);
436 }

◆ GetConicalGradientSSBOFillPipeline()

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

Definition at line 417 of file content_context.h.

417 {
418 FML_DCHECK(GetDeviceCapabilities().SupportsSSBO());
419 return GetPipeline(conical_gradient_ssbo_fill_pipelines_, opts);
420 }
const Capabilities & GetDeviceCapabilities() const
#define FML_DCHECK(condition)
Definition logging.h:103

◆ GetContext()

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

Definition at line 544 of file content_context.cc.

544 {
545 return context_;
546}

◆ GetDeviceCapabilities()

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

Definition at line 548 of file content_context.cc.

548 {
549 return *context_->GetCapabilities();
550}

◆ GetDrawVerticesUberShader()

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

Definition at line 695 of file content_context.h.

696 {
697 return GetPipeline(vertices_uber_shader_, opts);
698 }

◆ GetEmptyTexture()

std::shared_ptr< Texture > impeller::ContentContext::GetEmptyTexture ( ) const

Definition at line 462 of file content_context.cc.

462 {
463 return empty_texture_;
464}

◆ GetFramebufferBlendColorBurnPipeline()

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

Definition at line 612 of file content_context.h.

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

◆ GetFramebufferBlendColorDodgePipeline()

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

Definition at line 618 of file content_context.h.

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

◆ GetFramebufferBlendColorPipeline()

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

Definition at line 606 of file content_context.h.

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

◆ GetFramebufferBlendDarkenPipeline()

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

Definition at line 624 of file content_context.h.

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

◆ GetFramebufferBlendDifferencePipeline()

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

Definition at line 630 of file content_context.h.

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

◆ GetFramebufferBlendExclusionPipeline()

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

Definition at line 636 of file content_context.h.

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

◆ GetFramebufferBlendHardLightPipeline()

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

Definition at line 642 of file content_context.h.

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

◆ GetFramebufferBlendHuePipeline()

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

Definition at line 647 of file content_context.h.

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

◆ GetFramebufferBlendLightenPipeline()

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

Definition at line 654 of file content_context.h.

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

◆ GetFramebufferBlendLuminosityPipeline()

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

Definition at line 660 of file content_context.h.

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

◆ GetFramebufferBlendMultiplyPipeline()

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

Definition at line 666 of file content_context.h.

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

◆ GetFramebufferBlendOverlayPipeline()

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

Definition at line 672 of file content_context.h.

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

◆ GetFramebufferBlendSaturationPipeline()

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

Definition at line 678 of file content_context.h.

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

◆ GetFramebufferBlendScreenPipeline()

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

Definition at line 684 of file content_context.h.

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

◆ GetFramebufferBlendSoftLightPipeline()

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

Definition at line 690 of file content_context.h.

690 {
691 FML_DCHECK(GetDeviceCapabilities().SupportsFramebufferFetch());
692 return GetPipeline(framebuffer_blend_softlight_pipelines_, opts);
693 }

◆ GetGaussianBlurPipeline()

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

Definition at line 477 of file content_context.h.

478 {
479 return GetPipeline(gaussian_blur_pipelines_, opts);
480 }

◆ GetGlyphAtlasPipeline()

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

Definition at line 512 of file content_context.h.

513 {
514 return GetPipeline(glyph_atlas_pipelines_, opts);
515 }

◆ GetLazyGlyphAtlas()

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

Definition at line 731 of file content_context.h.

731 {
732 return lazy_glyph_atlas_;
733 }

◆ GetLinearGradientFillPipeline()

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

Definition at line 399 of file content_context.h.

400 {
401 return GetPipeline(linear_gradient_fill_pipelines_, opts);
402 }

◆ GetLinearGradientSSBOFillPipeline()

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

Definition at line 405 of file content_context.h.

405 {
406 FML_DCHECK(GetDeviceCapabilities().SupportsSSBO());
407 return GetPipeline(linear_gradient_ssbo_fill_pipelines_, opts);
408 }

◆ GetLinearToSrgbFilterPipeline()

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

Definition at line 497 of file content_context.h.

498 {
499 return GetPipeline(linear_to_srgb_filter_pipelines_, opts);
500 }

◆ GetMorphologyFilterPipeline()

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

Definition at line 487 of file content_context.h.

488 {
489 return GetPipeline(morphology_filter_pipelines_, opts);
490 }

◆ GetPorterDuffBlendPipeline()

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

Definition at line 522 of file content_context.h.

523 {
524 return GetPipeline(porter_duff_blend_pipelines_, opts);
525 }

◆ GetRadialGradientFillPipeline()

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

Definition at line 428 of file content_context.h.

429 {
430 return GetPipeline(radial_gradient_fill_pipelines_, opts);
431 }

◆ GetRadialGradientSSBOFillPipeline()

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

Definition at line 411 of file content_context.h.

411 {
412 FML_DCHECK(GetDeviceCapabilities().SupportsSSBO());
413 return GetPipeline(radial_gradient_ssbo_fill_pipelines_, opts);
414 }

◆ GetRenderTargetCache()

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

Definition at line 735 of file content_context.h.

735 {
736 return render_target_cache_;
737 }

◆ GetRRectBlurPipeline()

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

Definition at line 438 of file content_context.h.

439 {
440 return GetPipeline(rrect_blur_pipelines_, opts);
441 }

◆ GetSolidFillPipeline()

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

Definition at line 448 of file content_context.h.

449 {
450 return GetPipeline(solid_fill_pipelines_, opts);
451 }

◆ GetSrgbToLinearFilterPipeline()

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

Definition at line 502 of file content_context.h.

503 {
504 return GetPipeline(srgb_to_linear_filter_pipelines_, opts);
505 }

◆ GetSweepGradientFillPipeline()

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

Definition at line 443 of file content_context.h.

444 {
445 return GetPipeline(sweep_gradient_fill_pipelines_, opts);
446 }

◆ GetSweepGradientSSBOFillPipeline()

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

Definition at line 423 of file content_context.h.

423 {
424 FML_DCHECK(GetDeviceCapabilities().SupportsSSBO());
425 return GetPipeline(sweep_gradient_ssbo_fill_pipelines_, opts);
426 }

◆ GetTessellator()

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

Definition at line 540 of file content_context.cc.

540 {
541 return tessellator_;
542}

◆ GetTexturePipeline()

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

Definition at line 453 of file content_context.h.

454 {
455 return GetPipeline(texture_pipelines_, opts);
456 }

◆ GetTextureStrictSrcPipeline()

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

Definition at line 458 of file content_context.h.

459 {
460 return GetPipeline(texture_strict_src_pipelines_, opts);
461 }

◆ GetTiledTexturePipeline()

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

Definition at line 472 of file content_context.h.

473 {
474 return GetPipeline(tiled_texture_pipelines_, opts);
475 }

◆ GetTransientsBuffer()

HostBuffer & impeller::ContentContext::GetTransientsBuffer ( ) const
inline

Retrieve the currnent host buffer for transient storage.

This is only safe to use from the raster threads. Other threads should allocate their own device buffers.

Definition at line 763 of file content_context.h.

763{ return *host_buffer_; }

◆ GetYUVToRGBFilterPipeline()

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

Definition at line 517 of file content_context.h.

518 {
519 return GetPipeline(yuv_to_rgb_filter_pipelines_, opts);
520 }

◆ IsValid()

bool impeller::ContentContext::IsValid ( ) const

Definition at line 458 of file content_context.cc.

458 {
459 return is_valid_;
460}

◆ MakeSubpass() [1/2]

fml::StatusOr< RenderTarget > impeller::ContentContext::MakeSubpass ( std::string_view  label,
const RenderTarget subpass_target,
const std::shared_ptr< CommandBuffer > &  command_buffer,
const SubpassCallback subpass_callback 
) const

Makes a subpass that will render to subpass_target.

Definition at line 495 of file content_context.cc.

499 {
500 const std::shared_ptr<Context>& context = GetContext();
501
502 auto subpass_texture = subpass_target.GetRenderTargetTexture();
503 if (!subpass_texture) {
505 }
506
507 auto sub_renderpass = command_buffer->CreateRenderPass(subpass_target);
508 if (!sub_renderpass) {
510 }
511 sub_renderpass->SetLabel(SPrintF("%s RenderPass", label.data()));
512
513 if (!subpass_callback(*this, *sub_renderpass)) {
515 }
516
517 if (!sub_renderpass->EncodeCommands()) {
519 }
520
521 const std::shared_ptr<Texture>& target_texture =
522 subpass_target.GetRenderTargetTexture();
523 if (target_texture->GetMipCount() > 1) {
524 fml::Status mipmap_status =
525 AddMipmapGeneration(command_buffer, context, target_texture);
526 if (!mipmap_status.ok()) {
527 return mipmap_status;
528 }
529 }
530
531 return subpass_target;
532}
bool ok() const
Definition status.h:71
std::string SPrintF(const char *format,...)
Definition strings.cc:12
fml::Status AddMipmapGeneration(const std::shared_ptr< CommandBuffer > &command_buffer, const std::shared_ptr< Context > &context, const std::shared_ptr< Texture > &texture)
Adds a blit command to the render pass.

◆ MakeSubpass() [2/2]

fml::StatusOr< RenderTarget > impeller::ContentContext::MakeSubpass ( std::string_view  label,
ISize  texture_size,
const std::shared_ptr< CommandBuffer > &  command_buffer,
const SubpassCallback subpass_callback,
bool  msaa_enabled = true,
bool  depth_stencil_enabled = false,
int32_t  mip_count = 1 
) const

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

Definition at line 466 of file content_context.cc.

473 {
474 const std::shared_ptr<Context>& context = GetContext();
475 RenderTarget subpass_target;
476
477 std::optional<RenderTarget::AttachmentConfig> depth_stencil_config =
479 : std::optional<RenderTarget::AttachmentConfig>();
480
481 if (context->GetCapabilities()->SupportsOffscreenMSAA() && msaa_enabled) {
482 subpass_target = GetRenderTargetCache()->CreateOffscreenMSAA(
483 *context, texture_size,
484 /*mip_count=*/mip_count, SPrintF("%s Offscreen", label.data()),
486 } else {
487 subpass_target = GetRenderTargetCache()->CreateOffscreen(
488 *context, texture_size,
489 /*mip_count=*/mip_count, SPrintF("%s Offscreen", label.data()),
490 RenderTarget::kDefaultColorAttachmentConfig, depth_stencil_config);
491 }
492 return MakeSubpass(label, subpass_target, command_buffer, subpass_callback);
493}
const std::shared_ptr< RenderTargetAllocator > & GetRenderTargetCache() const
fml::StatusOr< RenderTarget > MakeSubpass(std::string_view label, ISize texture_size, const std::shared_ptr< CommandBuffer > &command_buffer, const SubpassCallback &subpass_callback, bool msaa_enabled=true, bool depth_stencil_enabled=false, int32_t mip_count=1) const
Creates a new texture of size texture_size and calls subpass_callback with a RenderPass for drawing t...
static constexpr AttachmentConfig kDefaultColorAttachmentConfig
static constexpr AttachmentConfigMSAA kDefaultColorAttachmentConfigMSAA
static constexpr AttachmentConfig kDefaultStencilAttachmentConfig
SK_API sk_sp< SkSurface > RenderTarget(GrRecordingContext *context, skgpu::Budgeted budgeted, const SkImageInfo &imageInfo, int sampleCount, GrSurfaceOrigin surfaceOrigin, const SkSurfaceProps *surfaceProps, bool shouldCreateWithMips=false, bool isProtected=false)

◆ SetWireframe()

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

Definition at line 552 of file content_context.cc.

552 {
553 wireframe_ = wireframe;
554}

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