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

Commit 13bc5fe

Browse files
committed
added todos for the heap allocation removal
1 parent 7a724dd commit 13bc5fe

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/ui/painting/gradient.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ void CanvasGradient::initRadial(double center_x,
7474
sk_matrix = ToSkMatrix(matrix4);
7575
}
7676

77+
// TODO(https://github.com/flutter/flutter/issues/154650): Eliminate this
78+
// heap allocation.
7779
std::vector<DlColor> dl_colors;
7880
dl_colors.reserve(num_colors);
7981
for (int i = 0; i < colors.num_elements(); i += 4) {
@@ -113,6 +115,8 @@ void CanvasGradient::initSweep(double center_x,
113115
sk_matrix = ToSkMatrix(matrix4);
114116
}
115117

118+
// TODO(https://github.com/flutter/flutter/issues/154650): Eliminate this
119+
// heap allocation.
116120
std::vector<DlColor> dl_colors;
117121
dl_colors.reserve(num_colors);
118122
for (int i = 0; i < colors.num_elements(); i += 4) {
@@ -156,6 +160,8 @@ void CanvasGradient::initTwoPointConical(double start_x,
156160
sk_matrix = ToSkMatrix(matrix4);
157161
}
158162

163+
// TODO(https://github.com/flutter/flutter/issues/154650): Eliminate this
164+
// heap allocation.
159165
std::vector<DlColor> dl_colors;
160166
dl_colors.reserve(num_colors);
161167
for (int i = 0; i < colors.num_elements(); i += 4) {

0 commit comments

Comments
 (0)