Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit e831520

Browse files
committed
jonah review
1 parent f37be58 commit e831520

File tree

2 files changed

+6
-12
lines changed

2 files changed

+6
-12
lines changed

impeller/fixtures/dart_tests.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ void canCreateRenderPassAndSubmit() {
191191
final gpu.CommandBuffer commandBuffer = gpu.gpuContext.createCommandBuffer();
192192

193193
final gpu.RenderTarget renderTarget = gpu.RenderTarget.singleColor(
194-
colorAttachment: gpu.ColorAttachment(texture: renderTexture!),
194+
gpu.ColorAttachment(texture: renderTexture!),
195195
);
196196
final gpu.RenderPass encoder = commandBuffer.createRenderPass(renderTarget);
197197

lib/gpu/lib/src/render_pass.dart

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -85,17 +85,11 @@ base class RenderTarget {
8585
{this.colorAttachments = const <ColorAttachment>[],
8686
this.depthStencilAttachment});
8787

88-
factory RenderTarget.singleColor(
89-
{ColorAttachment? colorAttachment,
90-
DepthStencilAttachment? depthStencilAttachment}) {
91-
List<ColorAttachment> colors = [];
92-
if (colorAttachment != null) {
93-
colors.add(colorAttachment);
94-
}
95-
return new RenderTarget(
96-
colorAttachments: colors,
97-
depthStencilAttachment: depthStencilAttachment);
98-
}
88+
RenderTarget.singleColor(ColorAttachment colorAttachment,
89+
{DepthStencilAttachment? depthStencilAttachment})
90+
: this(
91+
colorAttachments: [colorAttachment],
92+
depthStencilAttachment: depthStencilAttachment);
9993

10094
final List<ColorAttachment> colorAttachments;
10195
final DepthStencilAttachment? depthStencilAttachment;

0 commit comments

Comments
 (0)