diff --git a/engine/src/flutter/impeller/compositor/formats.h b/engine/src/flutter/impeller/compositor/formats.h index fac00782edb..062a890d0e8 100644 --- a/engine/src/flutter/impeller/compositor/formats.h +++ b/engine/src/flutter/impeller/compositor/formats.h @@ -290,15 +290,15 @@ struct RenderPassAttachment { constexpr operator bool() const { return static_cast(texture); } }; -struct ColorRenderPassAttachment : public RenderPassAttachment { +struct RenderPassColorAttachment : public RenderPassAttachment { Color clear_color = Color::BlackTransparent(); }; -struct DepthRenderPassAttachment : public RenderPassAttachment { +struct RenderPassDepthAttachment : public RenderPassAttachment { double clear_depth = 0.0; }; -struct StencilRenderPassAttachment : public RenderPassAttachment { +struct RenderPassStencilAttachment : public RenderPassAttachment { uint32_t clear_stencil = 0; }; diff --git a/engine/src/flutter/impeller/compositor/render_pass.mm b/engine/src/flutter/impeller/compositor/render_pass.mm index 188b6e19b0b..6cb6e587637 100644 --- a/engine/src/flutter/impeller/compositor/render_pass.mm +++ b/engine/src/flutter/impeller/compositor/render_pass.mm @@ -30,7 +30,7 @@ static bool ConfigureAttachment(const RenderPassAttachment& desc, } static bool ConfigureColorAttachment( - const ColorRenderPassAttachment& desc, + const RenderPassColorAttachment& desc, MTLRenderPassColorAttachmentDescriptor* attachment) { if (!ConfigureAttachment(desc, attachment)) { return false; @@ -40,7 +40,7 @@ static bool ConfigureColorAttachment( } static bool ConfigureDepthAttachment( - const DepthRenderPassAttachment& desc, + const RenderPassDepthAttachment& desc, MTLRenderPassDepthAttachmentDescriptor* attachment) { if (!ConfigureAttachment(desc, attachment)) { return false; @@ -50,7 +50,7 @@ static bool ConfigureDepthAttachment( } static bool ConfigureStencilAttachment( - const StencilRenderPassAttachment& desc, + const RenderPassStencilAttachment& desc, MTLRenderPassStencilAttachmentDescriptor* attachment) { if (!ConfigureAttachment(desc, attachment)) { return false; diff --git a/engine/src/flutter/impeller/compositor/render_pass_descriptor.h b/engine/src/flutter/impeller/compositor/render_pass_descriptor.h index baab8445137..a8a3fe93c94 100644 --- a/engine/src/flutter/impeller/compositor/render_pass_descriptor.h +++ b/engine/src/flutter/impeller/compositor/render_pass_descriptor.h @@ -25,21 +25,21 @@ class RenderPassDescriptor { std::optional GetColorAttachmentSize(size_t index) const; - RenderPassDescriptor& SetColorAttachment(ColorRenderPassAttachment attachment, + RenderPassDescriptor& SetColorAttachment(RenderPassColorAttachment attachment, size_t index); RenderPassDescriptor& SetDepthAttachment( - DepthRenderPassAttachment attachment); + RenderPassDepthAttachment attachment); RenderPassDescriptor& SetStencilAttachment( - StencilRenderPassAttachment attachment); + RenderPassStencilAttachment attachment); MTLRenderPassDescriptor* ToMTLRenderPassDescriptor() const; private: - std::map colors_; - std::optional depth_; - std::optional stencil_; + std::map colors_; + std::optional depth_; + std::optional stencil_; }; } // namespace impeller diff --git a/engine/src/flutter/impeller/compositor/render_pass_descriptor.mm b/engine/src/flutter/impeller/compositor/render_pass_descriptor.mm index b8802582e87..a39523e2828 100644 --- a/engine/src/flutter/impeller/compositor/render_pass_descriptor.mm +++ b/engine/src/flutter/impeller/compositor/render_pass_descriptor.mm @@ -31,7 +31,7 @@ std::optional RenderPassDescriptor::GetColorAttachmentSize( } RenderPassDescriptor& RenderPassDescriptor::SetColorAttachment( - ColorRenderPassAttachment attachment, + RenderPassColorAttachment attachment, size_t index) { if (attachment) { colors_[index] = attachment; @@ -40,7 +40,7 @@ RenderPassDescriptor& RenderPassDescriptor::SetColorAttachment( } RenderPassDescriptor& RenderPassDescriptor::SetDepthAttachment( - DepthRenderPassAttachment attachment) { + RenderPassDepthAttachment attachment) { if (attachment) { depth_ = std::move(attachment); } @@ -48,7 +48,7 @@ RenderPassDescriptor& RenderPassDescriptor::SetDepthAttachment( } RenderPassDescriptor& RenderPassDescriptor::SetStencilAttachment( - StencilRenderPassAttachment attachment) { + RenderPassStencilAttachment attachment) { if (attachment) { stencil_ = std::move(attachment); } diff --git a/engine/src/flutter/impeller/playground/playground.mm b/engine/src/flutter/impeller/playground/playground.mm index 1825aa1be8b..e70f8237d75 100644 --- a/engine/src/flutter/impeller/playground/playground.mm +++ b/engine/src/flutter/impeller/playground/playground.mm @@ -136,7 +136,7 @@ bool Playground::OpenPlaygroundHere(Renderer::RenderCallback render_callback) { static_cast(current_drawable.texture.width), static_cast(current_drawable.texture.height)}; - ColorRenderPassAttachment color0; + RenderPassColorAttachment color0; color0.texture = std::make_shared(color0_desc, current_drawable.texture); color0.clear_color = Color::SkyBlue(); diff --git a/engine/src/flutter/impeller/primitives/primitives_unittests.mm b/engine/src/flutter/impeller/primitives/primitives_unittests.mm index 6a55d5c0d08..3e7400311a4 100644 --- a/engine/src/flutter/impeller/primitives/primitives_unittests.mm +++ b/engine/src/flutter/impeller/primitives/primitives_unittests.mm @@ -193,7 +193,7 @@ TEST_F(PrimitivesTest, CanRenderToTexture) { std::shared_ptr r2t_pass; { - ColorRenderPassAttachment color0; + RenderPassColorAttachment color0; color0.load_action = LoadAction::kClear; color0.store_action = StoreAction::kStore;