This repository was archived by the owner on Feb 25, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-12
lines changed
Expand file tree Collapse file tree 2 files changed +6
-12
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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;
You can’t perform that action at this time.
0 commit comments