Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
flutter::testing::DlJobRenderer Struct Reference
Inheritance diagram for flutter::testing::DlJobRenderer:
flutter::testing::MatrixClipJobRenderer flutter::testing::JobRenderer

Public Member Functions

 DlJobRenderer (const DlSetup &dl_setup, const DlRenderer &dl_render, const DlRenderer &dl_restore, const sk_sp< DlImage > &dl_image)
 
void Render (SkCanvas *sk_canvas, const RenderJobInfo &info) override
 
void Render (DlCanvas *canvas, const RenderJobInfo &info)
 
sk_sp< DisplayListMakeDisplayList (const RenderJobInfo &info)
 
const DlPaintsetup_paint () const
 
bool targets_impeller () const override
 
- Public Member Functions inherited from flutter::testing::MatrixClipJobRenderer
const SkMatrixsetup_matrix () const
 
const SkIRectsetup_clip_bounds () const
 
virtual void Render (SkCanvas *canvas, const RenderJobInfo &info)=0
 
virtual bool targets_impeller () const
 

Additional Inherited Members

- Protected Attributes inherited from flutter::testing::MatrixClipJobRenderer
bool is_setup_ = false
 
SkMatrix setup_matrix_
 
SkIRect setup_clip_bounds_
 

Detailed Description

Definition at line 510 of file dl_rendering_unittests.cc.

Constructor & Destructor Documentation

◆ DlJobRenderer()

flutter::testing::DlJobRenderer::DlJobRenderer ( const DlSetup dl_setup,
const DlRenderer dl_render,
const DlRenderer dl_restore,
const sk_sp< DlImage > &  dl_image 
)
inlineexplicit

Definition at line 511 of file dl_rendering_unittests.cc.

515 : dl_setup_(dl_setup),
516 dl_render_(dl_render),
517 dl_restore_(dl_restore),
518 dl_image_(dl_image) {}

Member Function Documentation

◆ MakeDisplayList()

sk_sp< DisplayList > flutter::testing::DlJobRenderer::MakeDisplayList ( const RenderJobInfo info)
inline

Definition at line 537 of file dl_rendering_unittests.cc.

537 {
538 DisplayListBuilder builder(kTestBounds2);
540 return builder.Build();
541 }
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
Definition: DM.cpp:213
constexpr SkRect kTestBounds2
void Render(SkCanvas *sk_canvas, const RenderJobInfo &info) override

◆ Render() [1/2]

void flutter::testing::DlJobRenderer::Render ( DlCanvas canvas,
const RenderJobInfo info 
)
inline

Definition at line 525 of file dl_rendering_unittests.cc.

525 {
526 FML_DCHECK(info.opacity == SK_Scalar1);
528 dl_setup_({canvas, paint, dl_image_});
529 setup_paint_ = paint;
530 setup_matrix_ = canvas->GetTransform();
531 setup_clip_bounds_ = canvas->GetDestinationClipBounds().roundOut();
532 is_setup_ = true;
533 dl_render_({canvas, paint, dl_image_});
534 dl_restore_({canvas, paint, dl_image_});
535 }
#define SK_Scalar1
Definition: SkScalar.h:18
const Paint & paint
Definition: color_source.cc:38
#define FML_DCHECK(condition)
Definition: logging.h:103
flutter::DlPaint DlPaint

◆ Render() [2/2]

void flutter::testing::DlJobRenderer::Render ( SkCanvas sk_canvas,
const RenderJobInfo info 
)
inlineoverridevirtual

Implements flutter::testing::JobRenderer.

Definition at line 520 of file dl_rendering_unittests.cc.

520 {
521 DlSkCanvasAdapter canvas(sk_canvas);
522 Render(&canvas, info);
523 }

◆ setup_paint()

const DlPaint & flutter::testing::DlJobRenderer::setup_paint ( ) const
inline

Definition at line 543 of file dl_rendering_unittests.cc.

543 {
545 return setup_paint_;
546 }
#define FML_CHECK(condition)
Definition: logging.h:85

◆ targets_impeller()

bool flutter::testing::DlJobRenderer::targets_impeller ( ) const
inlineoverridevirtual

Reimplemented from flutter::testing::JobRenderer.

Definition at line 548 of file dl_rendering_unittests.cc.

548 {
549 return dl_image_->impeller_texture() != nullptr;
550 }

The documentation for this struct was generated from the following file: