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

Commit f37be58

Browse files
committed
jonah review
1 parent b0cdd52 commit f37be58

File tree

2 files changed

+15
-17
lines changed

2 files changed

+15
-17
lines changed

lib/gpu/fixtures.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,4 +106,4 @@ constexpr unsigned int kFlutterGPUTextureVertIPLRLength = 920;
106106
extern unsigned char kFlutterGPUTextureVertIPLR[];
107107

108108
constexpr unsigned int kFlutterGPUTextureFragIPLRLength = 800;
109-
extern unsigned char kFlutterGPUTextureFragIPLR[];
109+
extern unsigned char kFlutterGPUTextureFragIPLR[];

lib/gpu/lib/src/render_pass.dart

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -81,26 +81,24 @@ base class SamplerOptions {
8181
}
8282

8383
base class RenderTarget {
84-
RenderTarget(
85-
{List<ColorAttachment>? colorAttachments, this.depthStencilAttachment}) {
86-
if (colorAttachments != null) {
87-
colorAttachments = colorAttachments;
88-
return;
89-
}
90-
colorAttachments = <ColorAttachment>[];
91-
}
92-
93-
RenderTarget.singleColor(
94-
{ColorAttachment? colorAttachment, this.depthStencilAttachment}) {
84+
const RenderTarget(
85+
{this.colorAttachments = const <ColorAttachment>[],
86+
this.depthStencilAttachment});
87+
88+
factory RenderTarget.singleColor(
89+
{ColorAttachment? colorAttachment,
90+
DepthStencilAttachment? depthStencilAttachment}) {
91+
List<ColorAttachment> colors = [];
9592
if (colorAttachment != null) {
96-
colorAttachments = <ColorAttachment>[colorAttachment];
97-
return;
93+
colors.add(colorAttachment);
9894
}
99-
colorAttachments = <ColorAttachment>[];
95+
return new RenderTarget(
96+
colorAttachments: colors,
97+
depthStencilAttachment: depthStencilAttachment);
10098
}
10199

102-
late List<ColorAttachment> colorAttachments;
103-
DepthStencilAttachment? depthStencilAttachment;
100+
final List<ColorAttachment> colorAttachments;
101+
final DepthStencilAttachment? depthStencilAttachment;
104102
}
105103

106104
base class RenderPass extends NativeFieldWrapperClass1 {

0 commit comments

Comments
 (0)