| Flutter Impeller |

aiks_dl_vertices_unittests.cc
Go to the documentation of this file.
1 // Copyright 2013 The Flutter Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "display_list/dl_sampling_options.h"
6 #include "display_list/dl_tile_mode.h"
7 #include "display_list/dl_vertices.h"
8 #include "flutter/impeller/display_list/aiks_unittests.h"
9
10 #include "flutter/display_list/dl_blend_mode.h"
11 #include "flutter/display_list/dl_builder.h"
12 #include "flutter/display_list/dl_color.h"
13 #include "flutter/display_list/dl_paint.h"
14 #include "flutter/testing/testing.h"
15 #include "impeller/display_list/dl_dispatcher.h"
16 #include "impeller/display_list/dl_image_impeller.h"
17
18 namespace impeller {
19 namespace testing {
20
21 using namespace flutter;
22
23 namespace {
24 std::shared_ptr<DlVertices> MakeVertices(
25 DlVertexMode mode,
26 std::vector<DlPoint> vertices,
27 std::vector<uint16_t> indices,
28 std::vector<DlPoint> texture_coordinates,
29 std::vector<DlColor> colors) {
30 DlVertices::Builder::Flags flags(
31 {{texture_coordinates.size() > 0, colors.size() > 0}});
32 DlVertices::Builder builder(mode, vertices.size(), flags, indices.size());
33 if (colors.size() > 0) {
34 builder.store_colors(colors.data());
35 }
36 if (texture_coordinates.size() > 0) {
37 builder.store_texture_coordinates(texture_coordinates.data());
38 }
39 if (indices.size() > 0) {
40 builder.store_indices(indices.data());
41 }
42 builder.store_vertices(vertices.data());
43 return builder.build();
44 }
45 }; // namespace
46
47 // Regression test for https://github.com/flutter/flutter/issues/135441 .
48 TEST_P(AiksTest, VerticesGeometryUVPositionData) {
49 DisplayListBuilder builder;
50 DlPaint paint;
51 auto image =
52 DlImageImpeller::Make(CreateTextureForFixture("table_mountain_nx.png"));
53 auto size = image->impeller_texture()->GetSize();
54
55 paint.setColorSource(
56 DlColorSource::MakeImage(image, DlTileMode::kClamp, DlTileMode::kClamp));
57
58 std::vector<DlPoint> vertex_coordinates = {
59 DlPoint(0, 0),
60 DlPoint(size.width, 0),
61 DlPoint(0, size.height),
62 };
63 auto vertices = MakeVertices(DlVertexMode::kTriangleStrip, vertex_coordinates,
64 {0, 1, 2}, {}, {});
65
66 builder.DrawVertices(vertices, DlBlendMode::kSrcOver, paint);
67 ASSERT_TRUE(OpenPlaygroundHere(builder.Build()));
68 }
69
70 // Regression test for https://github.com/flutter/flutter/issues/135441 .
71 TEST_P(AiksTest, VerticesGeometryUVPositionDataWithTranslate) {
72 DisplayListBuilder builder;
73 DlPaint paint;
74 auto image =
75 DlImageImpeller::Make(CreateTextureForFixture("table_mountain_nx.png"));
76 auto size = image->impeller_texture()->GetSize();
77
78 DlMatrix matrix = DlMatrix::MakeTranslation({100, 100});
79 paint.setColorSource(
80 DlColorSource::MakeImage(image, DlTileMode::kClamp, DlTileMode::kClamp,
81 DlImageSampling::kLinear, &matrix));
82
83 std::vector<DlPoint> positions = {
84 DlPoint(0, 0),
85 DlPoint(size.width, 0),
86 DlPoint(0, size.height),
87 };
88 auto vertices =
89 MakeVertices(DlVertexMode::kTriangleStrip, positions, {0, 1, 2}, {}, {});
90
91 builder.DrawVertices(vertices, DlBlendMode::kSrcOver, paint);
92 ASSERT_TRUE(OpenPlaygroundHere(builder.Build()));
93 }
94
95 // Regression test for https://github.com/flutter/flutter/issues/145707
96 TEST_P(AiksTest, VerticesGeometryColorUVPositionData) {
97 DisplayListBuilder builder;
98 DlPaint paint;
99 auto image =
100 DlImageImpeller::Make(CreateTextureForFixture("table_mountain_nx.png"));
101 auto size = image->impeller_texture()->GetSize();
102
103 paint.setColorSource(
104 DlColorSource::MakeImage(image, DlTileMode::kClamp, DlTileMode::kClamp));
105
106 std::vector<DlPoint> positions = {
107 DlPoint(0, 0), DlPoint(size.width, 0),
108 DlPoint(0, size.height), DlPoint(size.width, 0),
109 DlPoint(0, 0), DlPoint(size.width, size.height),
110 };
111 std::vector<DlColor> colors = {
112 DlColor::kRed().withAlpha(128), DlColor::kBlue().withAlpha(128),
113 DlColor::kGreen().withAlpha(128), DlColor::kRed().withAlpha(128),
114 DlColor::kBlue().withAlpha(128), DlColor::kGreen().withAlpha(128),
115 };
116
117 auto vertices =
118 MakeVertices(DlVertexMode::kTriangles, positions, {}, {}, colors);
119
120 builder.DrawVertices(vertices, DlBlendMode::kDstOver, paint);
121 ASSERT_TRUE(OpenPlaygroundHere(builder.Build()));
122 }
123
124 TEST_P(AiksTest, VerticesGeometryColorUVPositionDataAdvancedBlend) {
125 DisplayListBuilder builder;
126 DlPaint paint;
127 auto image =
128 DlImageImpeller::Make(CreateTextureForFixture("table_mountain_nx.png"));
129 auto size = image->impeller_texture()->GetSize();
130
131 paint.setColorSource(
132 DlColorSource::MakeImage(image, DlTileMode::kClamp, DlTileMode::kClamp));
133
134 std::vector<DlPoint> positions = {
135 DlPoint(0, 0), DlPoint(size.width, 0),
136 DlPoint(0, size.height), DlPoint(size.width, 0),
137 DlPoint(0, 0), DlPoint(size.width, size.height),
138 };
139 std::vector<DlColor> colors = {
140 DlColor::kRed().modulateOpacity(0.5),
141 DlColor::kBlue().modulateOpacity(0.5),
142 DlColor::kGreen().modulateOpacity(0.5),
143 DlColor::kRed().modulateOpacity(0.5),
144 DlColor::kBlue().modulateOpacity(0.5),
145 DlColor::kGreen().modulateOpacity(0.5),
146 };
147
148 auto vertices =
149 MakeVertices(DlVertexMode::kTriangles, positions, {}, {}, colors);
150
151 builder.DrawVertices(vertices, DlBlendMode::kColorBurn, paint);
152 ASSERT_TRUE(OpenPlaygroundHere(builder.Build()));
153 }
154
155 // Draw a hexagon using triangle fan
156 TEST_P(AiksTest, CanConvertTriangleFanToTriangles) {
157 constexpr Scalar hexagon_radius = 125;
158 auto hex_start = Point(200.0, -hexagon_radius + 200.0);
159 auto center_to_flat = 1.73 / 2 * hexagon_radius;
160
161 // clang-format off
162 std::vector<DlPoint> vertices = {
163 DlPoint(hex_start.x, hex_start.y),
164 DlPoint(hex_start.x + center_to_flat, hex_start.y + 0.5 * hexagon_radius),
165 DlPoint(hex_start.x + center_to_flat, hex_start.y + 1.5 * hexagon_radius),
166 DlPoint(hex_start.x + center_to_flat, hex_start.y + 1.5 * hexagon_radius),
167 DlPoint(hex_start.x, hex_start.y + 2 * hexagon_radius),
168 DlPoint(hex_start.x, hex_start.y + 2 * hexagon_radius),
169 DlPoint(hex_start.x - center_to_flat, hex_start.y + 1.5 * hexagon_radius),
170 DlPoint(hex_start.x - center_to_flat, hex_start.y + 1.5 * hexagon_radius),
171 DlPoint(hex_start.x - center_to_flat, hex_start.y + 0.5 * hexagon_radius)
172 };
173 // clang-format on
174 auto paint = flutter::DlPaint(flutter::DlColor::kDarkGrey());
175 auto dl_vertices = flutter::DlVertices::Make(
176 flutter::DlVertexMode::kTriangleFan, vertices.size(), vertices.data(),
177 nullptr, nullptr);
178 flutter::DisplayListBuilder builder;
179 builder.DrawVertices(dl_vertices, flutter::DlBlendMode::kSrcOver, paint);
180 ASSERT_TRUE(OpenPlaygroundHere(builder.Build()));
181 }
182
183 TEST_P(AiksTest, DrawVerticesSolidColorTrianglesWithoutIndices) {
184 // Use negative coordinates and then scale the transform by -1, -1 to make
185 // sure coverage is taking the transform into account.
186 std::vector<DlPoint> positions = {
187 DlPoint(-100, -300),
188 DlPoint(-200, -100),
189 DlPoint(-300, -300),
190 };
191 std::vector<flutter::DlColor> colors = {flutter::DlColor::kWhite(),
192 flutter::DlColor::kGreen(),
193 flutter::DlColor::kWhite()};
194
195 auto vertices = flutter::DlVertices::Make(
196 flutter::DlVertexMode::kTriangles, 3, positions.data(),
197 /*texture_coordinates=*/nullptr, colors.data());
198
199 flutter::DisplayListBuilder builder;
200 flutter::DlPaint paint;
201
202 paint.setColor(flutter::DlColor::kRed().modulateOpacity(0.5));
203 builder.Scale(-1, -1);
204 builder.DrawVertices(vertices, flutter::DlBlendMode::kSrcOver, paint);
205
206 ASSERT_TRUE(OpenPlaygroundHere(builder.Build()));
207 }
208
209 TEST_P(AiksTest, DrawVerticesLinearGradientWithoutIndices) {
210 std::vector<DlPoint> positions = {
211 DlPoint(100, 300),
212 DlPoint(200, 100),
213 DlPoint(300, 300),
214 };
215
216 auto vertices = flutter::DlVertices::Make(
217 flutter::DlVertexMode::kTriangles, 3, positions.data(),
218 /*texture_coordinates=*/nullptr, /*colors=*/nullptr);
219
220 std::vector<flutter::DlColor> colors = {flutter::DlColor::kBlue(),
221 flutter::DlColor::kRed()};
222 const float stops[2] = {0.0, 1.0};
223
224 auto linear = flutter::DlColorSource::MakeLinear(
225 {100.0, 100.0}, {300.0, 300.0}, 2, colors.data(), stops,
226 flutter::DlTileMode::kRepeat);
227
228 flutter::DisplayListBuilder builder;
229 flutter::DlPaint paint;
230
231 paint.setColorSource(linear);
232 builder.DrawVertices(vertices, flutter::DlBlendMode::kSrcOver, paint);
233
234 ASSERT_TRUE(OpenPlaygroundHere(builder.Build()));
235 }
236
237 TEST_P(AiksTest, DrawVerticesLinearGradientWithTextureCoordinates) {
238 std::vector<DlPoint> positions = {
239 DlPoint(100, 300),
240 DlPoint(200, 100),
241 DlPoint(300, 300),
242 };
243 std::vector<DlPoint> texture_coordinates = {
244 DlPoint(300, 100),
245 DlPoint(100, 200),
246 DlPoint(300, 300),
247 };
248
249 auto vertices = flutter::DlVertices::Make(
250 flutter::DlVertexMode::kTriangles, 3, positions.data(),
251 texture_coordinates.data(), /*colors=*/nullptr);
252
253 std::vector<flutter::DlColor> colors = {flutter::DlColor::kBlue(),
254 flutter::DlColor::kRed()};
255 const float stops[2] = {0.0, 1.0};
256
257 auto linear = flutter::DlColorSource::MakeLinear(
258 {100.0, 100.0}, {300.0, 300.0}, 2, colors.data(), stops,
259 flutter::DlTileMode::kRepeat);
260
261 flutter::DisplayListBuilder builder;
262 flutter::DlPaint paint;
263
264 paint.setColorSource(linear);
265 builder.DrawVertices(vertices, flutter::DlBlendMode::kSrcOver, paint);
266
267 ASSERT_TRUE(OpenPlaygroundHere(builder.Build()));
268 }
269
270 TEST_P(AiksTest, DrawVerticesImageSourceWithTextureCoordinates) {
271 auto texture = CreateTextureForFixture("embarcadero.jpg");
272 auto dl_image = DlImageImpeller::Make(texture);
273 std::vector<DlPoint> positions = {
274 DlPoint(100, 300),
275 DlPoint(200, 100),
276 DlPoint(300, 300),
277 };
278 std::vector<DlPoint> texture_coordinates = {
279 DlPoint(0, 0),
280 DlPoint(100, 200),
281 DlPoint(200, 100),
282 };
283
284 auto vertices = flutter::DlVertices::Make(
285 flutter::DlVertexMode::kTriangles, 3, positions.data(),
286 texture_coordinates.data(), /*colors=*/nullptr);
287
288 flutter::DisplayListBuilder builder;
289 flutter::DlPaint paint;
290
291 auto image_source = flutter::DlColorSource::MakeImage(
292 dl_image, flutter::DlTileMode::kRepeat, flutter::DlTileMode::kRepeat);
293
294 paint.setColorSource(image_source);
295 builder.DrawVertices(vertices, flutter::DlBlendMode::kSrcOver, paint);
296
297 ASSERT_TRUE(OpenPlaygroundHere(builder.Build()));
298 }
299
300 TEST_P(AiksTest,
301 DrawVerticesImageSourceWithTextureCoordinatesAndColorBlending) {
302 auto texture = CreateTextureForFixture("embarcadero.jpg");
303 auto dl_image = DlImageImpeller::Make(texture);
304 std::vector<DlPoint> positions = {
305 DlPoint(100, 300),
306 DlPoint(200, 100),
307 DlPoint(300, 300),
308 };
309 std::vector<flutter::DlColor> colors = {flutter::DlColor::kWhite(),
310 flutter::DlColor::kGreen(),
311 flutter::DlColor::kWhite()};
312 std::vector<DlPoint> texture_coordinates = {
313 DlPoint(0, 0),
314 DlPoint(100, 200),
315 DlPoint(200, 100),
316 };
317
318 auto vertices = flutter::DlVertices::Make(
319 flutter::DlVertexMode::kTriangles, 3, positions.data(),
320 texture_coordinates.data(), colors.data());
321
322 flutter::DisplayListBuilder builder;
323 flutter::DlPaint paint;
324
325 auto image_source = flutter::DlColorSource::MakeImage(
326 dl_image, flutter::DlTileMode::kRepeat, flutter::DlTileMode::kRepeat);
327
328 paint.setColorSource(image_source);
329 builder.DrawVertices(vertices, flutter::DlBlendMode::kModulate, paint);
330
331 ASSERT_TRUE(OpenPlaygroundHere(builder.Build()));
332 }
333
334 TEST_P(AiksTest, DrawVerticesSolidColorTrianglesWithIndices) {
335 std::vector<DlPoint> positions = {
336 DlPoint(100, 300),
337 DlPoint(200, 100),
338 DlPoint(300, 300),
339 DlPoint(200, 500),
340 };
341 std::vector<uint16_t> indices = {0, 1, 2, 0, 2, 3};
342
343 auto vertices = flutter::DlVertices::Make(
344 flutter::DlVertexMode::kTriangles, positions.size(), positions.data(),
345 /*texture_coordinates=*/nullptr, /*colors=*/nullptr, indices.size(),
346 indices.data());
347
348 flutter::DisplayListBuilder builder;
349 flutter::DlPaint paint;
350
351 paint.setColor(flutter::DlColor::kRed());
352 builder.DrawVertices(vertices, flutter::DlBlendMode::kSrcOver, paint);
353
354 ASSERT_TRUE(OpenPlaygroundHere(builder.Build()));
355 }
356
357 TEST_P(AiksTest, DrawVerticesPremultipliesColors) {
358 std::vector<DlPoint> positions = {
359 DlPoint(100, 300),
360 DlPoint(200, 100),
361 DlPoint(300, 300),
362 DlPoint(200, 500),
363 };
364 auto color = flutter::DlColor::kBlue().withAlpha(0x99);
365 std::vector<uint16_t> indices = {0, 1, 2, 0, 2, 3};
366 std::vector<flutter::DlColor> colors = {color, color, color, color};
367
368 auto vertices = flutter::DlVertices::Make(
369 flutter::DlVertexMode::kTriangles, positions.size(), positions.data(),
370 /*texture_coordinates=*/nullptr, colors.data(), indices.size(),
371 indices.data());
372
373 flutter::DisplayListBuilder builder;
374 flutter::DlPaint paint;
375 paint.setBlendMode(flutter::DlBlendMode::kSrcOver);
376 paint.setColor(flutter::DlColor::kRed());
377
378 builder.DrawRect(DlRect::MakeLTRB(0, 0, 400, 400), paint);
379 builder.DrawVertices(vertices, flutter::DlBlendMode::kDst, paint);
380
381 ASSERT_TRUE(OpenPlaygroundHere(builder.Build()));
382 }
383
384 TEST_P(AiksTest, DrawVerticesWithInvalidIndices) {
385 std::vector<DlPoint> positions = {
386 DlPoint(100, 300),
387 DlPoint(200, 100),
388 DlPoint(300, 300),
389 DlPoint(200, 500),
390 };
391 std::vector<uint16_t> indices = {0, 1, 2, 0, 2, 3, 99, 100, 101};
392
393 auto vertices = flutter::DlVertices::Make(
394 flutter::DlVertexMode::kTriangles, positions.size(), positions.data(),
395 /*texture_coordinates=*/nullptr, /*colors=*/nullptr, indices.size(),
396 indices.data());
397
398 EXPECT_EQ(vertices->GetBounds(), DlRect::MakeLTRB(100, 100, 300, 500));
399
400 flutter::DisplayListBuilder builder;
401 flutter::DlPaint paint;
402 paint.setBlendMode(flutter::DlBlendMode::kSrcOver);
403 paint.setColor(flutter::DlColor::kRed());
404
405 builder.DrawRect(DlRect::MakeLTRB(0, 0, 400, 400), paint);
406 builder.DrawVertices(vertices, flutter::DlBlendMode::kSrc, paint);
407
408 AiksContext renderer(GetContext(), nullptr);
409 std::shared_ptr<Texture> image =
410 DisplayListToTexture(builder.Build(), {1024, 768}, renderer);
411 EXPECT_TRUE(image);
412 }
413
414 // All four vertices should form a solid red rectangle with no gaps.
415 // The blue rectangle drawn under them should not be visible.
416 TEST_P(AiksTest, DrawVerticesTextureCoordinatesWithFragmentShader) {
417 std::vector<DlPoint> positions_lt = {
418 DlPoint(0, 0), //
419 DlPoint(50, 0), //
420 DlPoint(0, 50), //
421 DlPoint(50, 50), //
422 };
423
424 auto vertices_lt = flutter::DlVertices::Make(
425 flutter::DlVertexMode::kTriangleStrip, positions_lt.size(),
426 positions_lt.data(),
427 /*texture_coordinates=*/positions_lt.data(), /*colors=*/nullptr,
428 /*index_count=*/0,
429 /*indices=*/nullptr);
430
431 std::vector<DlPoint> positions_rt = {
432 DlPoint(50, 0), //
433 DlPoint(100, 0), //
434 DlPoint(50, 50), //
435 DlPoint(100, 50), //
436 };
437
438 auto vertices_rt = flutter::DlVertices::Make(
439 flutter::DlVertexMode::kTriangleStrip, positions_rt.size(),
440 positions_rt.data(),
441 /*texture_coordinates=*/positions_rt.data(), /*colors=*/nullptr,
442 /*index_count=*/0,
443 /*indices=*/nullptr);
444
445 std::vector<DlPoint> positions_lb = {
446 DlPoint(0, 50), //
447 DlPoint(50, 50), //
448 DlPoint(0, 100), //
449 DlPoint(50, 100), //
450 };
451
452 auto vertices_lb = flutter::DlVertices::Make(
453 flutter::DlVertexMode::kTriangleStrip, positions_lb.size(),
454 positions_lb.data(),
455 /*texture_coordinates=*/positions_lb.data(), /*colors=*/nullptr,
456 /*index_count=*/0,
457 /*indices=*/nullptr);
458
459 std::vector<DlPoint> positions_rb = {
460 DlPoint(50, 50), //
461 DlPoint(100, 50), //
462 DlPoint(50, 100), //
463 DlPoint(100, 100), //
464 };
465
466 auto vertices_rb = flutter::DlVertices::Make(
467 flutter::DlVertexMode::kTriangleStrip, positions_rb.size(),
468 positions_rb.data(),
469 /*texture_coordinates=*/positions_rb.data(), /*colors=*/nullptr,
470 /*index_count=*/0,
471 /*indices=*/nullptr);
472
473 flutter::DisplayListBuilder builder;
474 flutter::DlPaint paint;
475 flutter::DlPaint rect_paint;
476 rect_paint.setColor(DlColor::kBlue());
477
478 auto runtime_stages =
479 OpenAssetAsRuntimeStage("runtime_stage_simple.frag.iplr");
480
481 auto runtime_stage =
482 runtime_stages[PlaygroundBackendToRuntimeStageBackend(GetBackend())];
483 ASSERT_TRUE(runtime_stage);
484
485 auto runtime_effect = DlRuntimeEffect::MakeImpeller(runtime_stage);
486 auto uniform_data = std::make_shared<std::vector<uint8_t>>();
487 auto color_source = flutter::DlColorSource::MakeRuntimeEffect(
488 runtime_effect, {}, uniform_data);
489
490 paint.setColorSource(color_source);
491
492 builder.Scale(GetContentScale().x, GetContentScale().y);
493 builder.Save();
494 builder.DrawRect(DlRect::MakeLTRB(0, 0, 100, 100), rect_paint);
495 builder.DrawVertices(vertices_lt, flutter::DlBlendMode::kSrcOver, paint);
496 builder.DrawVertices(vertices_rt, flutter::DlBlendMode::kSrcOver, paint);
497 builder.DrawVertices(vertices_lb, flutter::DlBlendMode::kSrcOver, paint);
498 builder.DrawVertices(vertices_rb, flutter::DlBlendMode::kSrcOver, paint);
499 builder.Restore();
500
501 ASSERT_TRUE(OpenPlaygroundHere(builder.Build()));
502 }
503
504 // The vertices should form a solid red rectangle with no gaps.
505 // The blue rectangle drawn under them should not be visible.
506 TEST_P(AiksTest,
507 DrawVerticesTextureCoordinatesWithFragmentShaderNonZeroOrigin) {
508 std::vector<DlPoint> positions_lt = {
509 DlPoint(200, 200), //
510 DlPoint(250, 200), //
511 DlPoint(200, 250), //
512 DlPoint(250, 250), //
513 };
514
515 auto vertices = flutter::DlVertices::Make(
516 flutter::DlVertexMode::kTriangleStrip, positions_lt.size(),
517 positions_lt.data(),
518 /*texture_coordinates=*/positions_lt.data(), /*colors=*/nullptr,
519 /*index_count=*/0,
520 /*indices=*/nullptr);
521
522 flutter::DisplayListBuilder builder;
523 flutter::DlPaint paint;
524 flutter::DlPaint rect_paint;
525 rect_paint.setColor(DlColor::kBlue());
526
527 auto runtime_stages =
528 OpenAssetAsRuntimeStage("runtime_stage_position.frag.iplr");
529
530 auto runtime_stage =
531 runtime_stages[PlaygroundBackendToRuntimeStageBackend(GetBackend())];
532 ASSERT_TRUE(runtime_stage);
533
534 auto runtime_effect = DlRuntimeEffect::MakeImpeller(runtime_stage);
535 auto rect_data = std::vector<Rect>{Rect::MakeLTRB(200, 200, 250, 250)};
536
537 auto uniform_data = std::make_shared<std::vector<uint8_t>>();
538 uniform_data->resize(rect_data.size() * sizeof(Rect));
539 memcpy(uniform_data->data(), rect_data.data(), uniform_data->size());
540
541 auto color_source = flutter::DlColorSource::MakeRuntimeEffect(
542 runtime_effect, {}, uniform_data);
543
544 paint.setColorSource(color_source);
545
546 builder.Scale(GetContentScale().x, GetContentScale().y);
547 builder.DrawRect(DlRect::MakeLTRB(200, 200, 250, 250), rect_paint);
548 builder.DrawVertices(vertices, flutter::DlBlendMode::kSrcOver, paint);
549
550 ASSERT_TRUE(OpenPlaygroundHere(builder.Build()));
551 }
552
553 } // namespace testing
554 } // namespace impeller
aiks_unittests.h
impeller::AiksContext
Definition: aiks_context.h:19
impeller::AiksPlayground
Definition: aiks_playground.h:16
impeller::DlImageImpeller::Make
static sk_sp< DlImageImpeller > Make(std::shared_ptr< Texture > texture, OwningContext owning_context=OwningContext::kIO)
Definition: dl_image_impeller.cc:23
dl_dispatcher.h
x
int32_t x
Definition: dl_golden_unittests.cc:458
dl_image_impeller.h
flutter
Definition: dl_golden_blur_unittests.cc:16
impeller::testing::TEST_P
TEST_P(AiksTest, DrawAtlasNoColor)
Definition: aiks_dl_atlas_unittests.cc:60
impeller
Definition: allocation.cc:12
impeller::DisplayListToTexture
std::shared_ptr< Texture > DisplayListToTexture(const sk_sp< flutter::DisplayList > &display_list, ISize size, AiksContext &context, bool reset_host_buffer, bool generate_mips)
Render the provided display list to a texture with the given size.
Definition: dl_dispatcher.cc:1291
impeller::Scalar
float Scalar
Definition: scalar.h:18
impeller::PlaygroundBackendToRuntimeStageBackend
constexpr RuntimeStageBackend PlaygroundBackendToRuntimeStageBackend(PlaygroundBackend backend)
Definition: playground.h:33
impeller::Rect
TRect< Scalar > Rect
Definition: rect.h:792
impeller::Point
TPoint< Scalar > Point
Definition: point.h:327
impeller::DlPoint
flutter::DlPoint DlPoint
Definition: dl_dispatcher.h:24
impeller::TRect< Scalar >::MakeLTRB
constexpr static TRect MakeLTRB(Type left, Type top, Type right, Type bottom)
Definition: rect.h:129