4
4
5
5
#include " impeller/display_list/display_list_dispatcher.h"
6
6
7
+ #include " flutter/fml/trace_event.h"
7
8
#include " impeller/geometry/path_builder.h"
8
9
9
10
namespace impeller {
@@ -73,11 +74,13 @@ void DisplayListDispatcher::setStrokeJoin(SkPaint::Join join) {
73
74
74
75
// |flutter::Dispatcher|
75
76
void DisplayListDispatcher::setShader (sk_sp<SkShader> shader) {
77
+ // Needs https://github.com/flutter/flutter/issues/95434
76
78
UNIMPLEMENTED;
77
79
}
78
80
79
81
// |flutter::Dispatcher|
80
82
void DisplayListDispatcher::setColorFilter (sk_sp<SkColorFilter> filter) {
83
+ // Needs https://github.com/flutter/flutter/issues/95434
81
84
UNIMPLEMENTED;
82
85
}
83
86
@@ -93,16 +96,19 @@ void DisplayListDispatcher::setBlendMode(SkBlendMode mode) {
93
96
94
97
// |flutter::Dispatcher|
95
98
void DisplayListDispatcher::setBlender (sk_sp<SkBlender> blender) {
99
+ // Needs https://github.com/flutter/flutter/issues/95434
96
100
UNIMPLEMENTED;
97
101
}
98
102
99
103
// |flutter::Dispatcher|
100
104
void DisplayListDispatcher::setPathEffect (sk_sp<SkPathEffect> effect) {
105
+ // Needs https://github.com/flutter/flutter/issues/95434
101
106
UNIMPLEMENTED;
102
107
}
103
108
104
109
// |flutter::Dispatcher|
105
110
void DisplayListDispatcher::setMaskFilter (sk_sp<SkMaskFilter> filter) {
111
+ // Needs https://github.com/flutter/flutter/issues/95434
106
112
UNIMPLEMENTED;
107
113
}
108
114
@@ -396,6 +402,7 @@ void DisplayListDispatcher::drawPoints(SkCanvas::PointMode mode,
396
402
// |flutter::Dispatcher|
397
403
void DisplayListDispatcher::drawVertices (const sk_sp<SkVertices> vertices,
398
404
SkBlendMode mode) {
405
+ // Needs https://github.com/flutter/flutter/issues/95434
399
406
UNIMPLEMENTED;
400
407
}
401
408
@@ -404,6 +411,7 @@ void DisplayListDispatcher::drawImage(const sk_sp<SkImage> image,
404
411
const SkPoint point,
405
412
const SkSamplingOptions& sampling,
406
413
bool render_with_attributes) {
414
+ // Needs https://github.com/flutter/flutter/issues/95434
407
415
UNIMPLEMENTED;
408
416
}
409
417
@@ -415,6 +423,7 @@ void DisplayListDispatcher::drawImageRect(
415
423
const SkSamplingOptions& sampling,
416
424
bool render_with_attributes,
417
425
SkCanvas::SrcRectConstraint constraint) {
426
+ // Needs https://github.com/flutter/flutter/issues/95434
418
427
UNIMPLEMENTED;
419
428
}
420
429
@@ -424,6 +433,7 @@ void DisplayListDispatcher::drawImageNine(const sk_sp<SkImage> image,
424
433
const SkRect& dst,
425
434
SkFilterMode filter,
426
435
bool render_with_attributes) {
436
+ // Needs https://github.com/flutter/flutter/issues/95434
427
437
UNIMPLEMENTED;
428
438
}
429
439
@@ -433,6 +443,7 @@ void DisplayListDispatcher::drawImageLattice(const sk_sp<SkImage> image,
433
443
const SkRect& dst,
434
444
SkFilterMode filter,
435
445
bool render_with_attributes) {
446
+ // Needs https://github.com/flutter/flutter/issues/95434
436
447
UNIMPLEMENTED;
437
448
}
438
449
@@ -446,13 +457,15 @@ void DisplayListDispatcher::drawAtlas(const sk_sp<SkImage> atlas,
446
457
const SkSamplingOptions& sampling,
447
458
const SkRect* cull_rect,
448
459
bool render_with_attributes) {
460
+ // Needs https://github.com/flutter/flutter/issues/95434
449
461
UNIMPLEMENTED;
450
462
}
451
463
452
464
// |flutter::Dispatcher|
453
465
void DisplayListDispatcher::drawPicture (const sk_sp<SkPicture> picture,
454
466
const SkMatrix* matrix,
455
467
bool render_with_attributes) {
468
+ // Needs https://github.com/flutter/flutter/issues/95434
456
469
UNIMPLEMENTED;
457
470
}
458
471
@@ -466,7 +479,17 @@ void DisplayListDispatcher::drawDisplayList(
466
479
void DisplayListDispatcher::drawTextBlob (const sk_sp<SkTextBlob> blob,
467
480
SkScalar x,
468
481
SkScalar y) {
469
- UNIMPLEMENTED;
482
+ if (!blob) {
483
+ return ;
484
+ }
485
+
486
+ auto bounds = blob->bounds ();
487
+ bounds.fLeft += x;
488
+ bounds.fTop += y;
489
+
490
+ impeller::Paint paint;
491
+ paint.color = impeller::Color::Random ().WithAlpha (0.2 );
492
+ canvas_.DrawRect (ToRect (bounds), paint);
470
493
}
471
494
472
495
// |flutter::Dispatcher|
@@ -479,6 +502,7 @@ void DisplayListDispatcher::drawShadow(const SkPath& path,
479
502
}
480
503
481
504
Picture DisplayListDispatcher::EndRecordingAsPicture () {
505
+ TRACE_EVENT0 (" impeller" , " DisplayListDispatcher::EndRecordingAsPicture" );
482
506
return canvas_.EndRecordingAsPicture ();
483
507
}
484
508
0 commit comments