44
55#include " impeller/display_list/display_list_dispatcher.h"
66
7+ #include " flutter/fml/trace_event.h"
78#include " impeller/geometry/path_builder.h"
89
910namespace impeller {
@@ -73,11 +74,13 @@ void DisplayListDispatcher::setStrokeJoin(SkPaint::Join join) {
7374
7475// |flutter::Dispatcher|
7576void DisplayListDispatcher::setShader (sk_sp<SkShader> shader) {
77+ // Needs https://github.com/flutter/flutter/issues/95434
7678 UNIMPLEMENTED;
7779}
7880
7981// |flutter::Dispatcher|
8082void DisplayListDispatcher::setColorFilter (sk_sp<SkColorFilter> filter) {
83+ // Needs https://github.com/flutter/flutter/issues/95434
8184 UNIMPLEMENTED;
8285}
8386
@@ -93,16 +96,19 @@ void DisplayListDispatcher::setBlendMode(SkBlendMode mode) {
9396
9497// |flutter::Dispatcher|
9598void DisplayListDispatcher::setBlender (sk_sp<SkBlender> blender) {
99+ // Needs https://github.com/flutter/flutter/issues/95434
96100 UNIMPLEMENTED;
97101}
98102
99103// |flutter::Dispatcher|
100104void DisplayListDispatcher::setPathEffect (sk_sp<SkPathEffect> effect) {
105+ // Needs https://github.com/flutter/flutter/issues/95434
101106 UNIMPLEMENTED;
102107}
103108
104109// |flutter::Dispatcher|
105110void DisplayListDispatcher::setMaskFilter (sk_sp<SkMaskFilter> filter) {
111+ // Needs https://github.com/flutter/flutter/issues/95434
106112 UNIMPLEMENTED;
107113}
108114
@@ -396,6 +402,7 @@ void DisplayListDispatcher::drawPoints(SkCanvas::PointMode mode,
396402// |flutter::Dispatcher|
397403void DisplayListDispatcher::drawVertices (const sk_sp<SkVertices> vertices,
398404 SkBlendMode mode) {
405+ // Needs https://github.com/flutter/flutter/issues/95434
399406 UNIMPLEMENTED;
400407}
401408
@@ -404,6 +411,7 @@ void DisplayListDispatcher::drawImage(const sk_sp<SkImage> image,
404411 const SkPoint point,
405412 const SkSamplingOptions& sampling,
406413 bool render_with_attributes) {
414+ // Needs https://github.com/flutter/flutter/issues/95434
407415 UNIMPLEMENTED;
408416}
409417
@@ -415,6 +423,7 @@ void DisplayListDispatcher::drawImageRect(
415423 const SkSamplingOptions& sampling,
416424 bool render_with_attributes,
417425 SkCanvas::SrcRectConstraint constraint) {
426+ // Needs https://github.com/flutter/flutter/issues/95434
418427 UNIMPLEMENTED;
419428}
420429
@@ -424,6 +433,7 @@ void DisplayListDispatcher::drawImageNine(const sk_sp<SkImage> image,
424433 const SkRect& dst,
425434 SkFilterMode filter,
426435 bool render_with_attributes) {
436+ // Needs https://github.com/flutter/flutter/issues/95434
427437 UNIMPLEMENTED;
428438}
429439
@@ -433,6 +443,7 @@ void DisplayListDispatcher::drawImageLattice(const sk_sp<SkImage> image,
433443 const SkRect& dst,
434444 SkFilterMode filter,
435445 bool render_with_attributes) {
446+ // Needs https://github.com/flutter/flutter/issues/95434
436447 UNIMPLEMENTED;
437448}
438449
@@ -446,13 +457,15 @@ void DisplayListDispatcher::drawAtlas(const sk_sp<SkImage> atlas,
446457 const SkSamplingOptions& sampling,
447458 const SkRect* cull_rect,
448459 bool render_with_attributes) {
460+ // Needs https://github.com/flutter/flutter/issues/95434
449461 UNIMPLEMENTED;
450462}
451463
452464// |flutter::Dispatcher|
453465void DisplayListDispatcher::drawPicture (const sk_sp<SkPicture> picture,
454466 const SkMatrix* matrix,
455467 bool render_with_attributes) {
468+ // Needs https://github.com/flutter/flutter/issues/95434
456469 UNIMPLEMENTED;
457470}
458471
@@ -466,7 +479,17 @@ void DisplayListDispatcher::drawDisplayList(
466479void DisplayListDispatcher::drawTextBlob (const sk_sp<SkTextBlob> blob,
467480 SkScalar x,
468481 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);
470493}
471494
472495// |flutter::Dispatcher|
@@ -479,6 +502,7 @@ void DisplayListDispatcher::drawShadow(const SkPath& path,
479502}
480503
481504Picture DisplayListDispatcher::EndRecordingAsPicture () {
505+ TRACE_EVENT0 (" impeller" , " DisplayListDispatcher::EndRecordingAsPicture" );
482506 return canvas_.EndRecordingAsPicture ();
483507}
484508
0 commit comments