Flutter Engine Uber Docs
Docs for the entire Flutter Engine repo.
 
Loading...
Searching...
No Matches
flutter::testing::DisplayListNopTest Class Reference
Inheritance diagram for flutter::testing::DisplayListNopTest:
flutter::testing::DisplayListRenderingTestBase< BaseT > flutter::DisplayListOpFlags flutter::DisplayListFlags

Protected Member Functions

 DisplayListNopTest ()
 
std::unique_ptr< RenderResultget_output (int w, int h, bool snapshot, const std::function< void(SkCanvas *)> &renderer)
 
int check_color_result (DlColor dst_color, DlColor result_color, const sk_sp< DisplayList > &dl, const std::string &desc)
 
int check_image_result (const std::unique_ptr< RenderResult > &dst_data, const std::unique_ptr< RenderResult > &result_data, const sk_sp< DisplayList > &dl, const std::string &desc)
 
void report_results (int all_flags, const sk_sp< DisplayList > &dl, const std::string &desc)
 
void test_mode_color_via_filter (DlBlendMode mode, DlColor color)
 
void test_mode_color_via_rendering (DlBlendMode mode, DlColor color)
 
void test_attributes_image (DlBlendMode mode, DlColor color, const DlColorFilter *color_filter, DlImageFilter *image_filter)
 

Protected Attributes

std::vector< DlColortest_src_colors
 
std::vector< DlColortest_dst_colors
 
std::shared_ptr< const DlColorFiltercolor_filter_nomtb
 
std::shared_ptr< const DlColorFiltercolor_filter_mtb
 
std::unique_ptr< RenderResulttest_data
 
std::unique_ptr< RenderResulttest_image_dst_data
 
std::unique_ptr< RenderResulttest_image_src_data
 

Static Protected Attributes

static constexpr int kWasNotNop = 0x1
 
static constexpr int kWasMTB = 0x2
 
- Static Protected Attributes inherited from flutter::DisplayListOpFlags
static constexpr DisplayListAttributeFlags kSaveLayerFlags
 
static constexpr DisplayListAttributeFlags kSaveLayerWithPaintFlags
 
static constexpr DisplayListAttributeFlags kDrawColorFlags
 
static constexpr DisplayListAttributeFlags kDrawPaintFlags
 
static constexpr DisplayListAttributeFlags kDrawHVLineFlags
 
static constexpr DisplayListAttributeFlags kDrawLineFlags
 
static constexpr DisplayListAttributeFlags kDrawRectFlags
 
static constexpr DisplayListAttributeFlags kDrawOvalFlags
 
static constexpr DisplayListAttributeFlags kDrawCircleFlags
 
static constexpr DisplayListAttributeFlags kDrawRRectFlags
 
static constexpr DisplayListAttributeFlags kDrawDRRectFlags
 
static constexpr DisplayListAttributeFlags kDrawRSuperellipseFlags
 
static constexpr DisplayListAttributeFlags kDrawPathFlags
 
static constexpr DisplayListAttributeFlags kDrawArcNoCenterFlags
 
static constexpr DisplayListAttributeFlags kDrawArcWithCenterFlags
 
static constexpr DisplayListAttributeFlags kDrawPointsAsPointsFlags
 
static constexpr DisplayListAttributeFlags kDrawPointsAsLinesFlags
 
static constexpr DisplayListAttributeFlags kDrawPointsAsPolygonFlags
 
static constexpr DisplayListAttributeFlags kDrawVerticesFlags
 
static constexpr DisplayListAttributeFlags kDrawImageFlags
 
static constexpr DisplayListAttributeFlags kDrawImageWithPaintFlags
 
static constexpr DisplayListAttributeFlags kDrawImageRectFlags
 
static constexpr DisplayListAttributeFlags kDrawImageRectWithPaintFlags
 
static constexpr DisplayListAttributeFlags kDrawImageNineFlags
 
static constexpr DisplayListAttributeFlags kDrawImageNineWithPaintFlags
 
static constexpr DisplayListAttributeFlags kDrawAtlasFlags
 
static constexpr DisplayListAttributeFlags kDrawAtlasWithPaintFlags
 
static constexpr DisplayListAttributeFlags kDrawDisplayListFlags
 
static constexpr DisplayListAttributeFlags kDrawTextFlags
 
static constexpr DisplayListAttributeFlags kDrawShadowFlags
 
static constexpr DisplayListAttributeFlags kDrawParagraphFlags
 

Additional Inherited Members

- Public Member Functions inherited from flutter::testing::DisplayListRenderingTestBase< BaseT >
 DisplayListRenderingTestBase ()=default
 
- Static Public Member Functions inherited from flutter::testing::DisplayListRenderingTestBase< BaseT >
static bool StartsWith (std::string str, std::string prefix)
 
static void SetUpTestSuite ()
 
static void TearDownTestSuite ()
 

Detailed Description

Definition at line 4532 of file dl_rendering_unittests.cc.

Constructor & Destructor Documentation

◆ DisplayListNopTest()

flutter::testing::DisplayListNopTest::DisplayListNopTest ( )
inlineprotected

Definition at line 4536 of file dl_rendering_unittests.cc.

4537 test_src_colors = {
4538 DlColor::kBlack().withAlpha(0), // transparent black
4539 DlColor::kBlack().withAlpha(0x7f), // half transparent black
4540 DlColor::kWhite().withAlpha(0x7f), // half transparent white
4541 DlColor::kBlack(), // opaque black
4542 DlColor::kWhite(), // opaque white
4543 DlColor::kRed(), // opaque red
4544 DlColor::kGreen(), // opaque green
4545 DlColor::kBlue(), // opaque blue
4546 DlColor::kDarkGrey(), // dark grey
4547 DlColor::kLightGrey(), // light grey
4548 };
4549
4550 // We test against a color cube of 3x3x3 colors [55,aa,ff]
4551 // plus transparency as the first color/pixel
4553 const int step = 0x55;
4554 static_assert(step * 3 == 255);
4555 for (int a = step; a < 256; a += step) {
4556 for (int r = step; r < 256; r += step) {
4557 for (int g = step; g < 256; g += step) {
4558 for (int b = step; b < 256; b += step) {
4559 test_dst_colors.push_back(DlColor(a << 24 | r << 16 | g << 8 | b));
4560 }
4561 }
4562 }
4563 }
4564
4565 static constexpr float color_filter_matrix_nomtb[] = {
4566 0.0001, 0.0001, 0.0001, 0.9997, 0.0, //
4567 0.0001, 0.0001, 0.0001, 0.9997, 0.0, //
4568 0.0001, 0.0001, 0.0001, 0.9997, 0.0, //
4569 0.0001, 0.0001, 0.0001, 0.9997, 0.0, //
4570 };
4571 static constexpr float color_filter_matrix_mtb[] = {
4572 0.0001, 0.0001, 0.0001, 0.9997, 0.0, //
4573 0.0001, 0.0001, 0.0001, 0.9997, 0.0, //
4574 0.0001, 0.0001, 0.0001, 0.9997, 0.0, //
4575 0.0001, 0.0001, 0.0001, 0.9997, 0.1, //
4576 };
4577 color_filter_nomtb = DlColorFilter::MakeMatrix(color_filter_matrix_nomtb);
4578 color_filter_mtb = DlColorFilter::MakeMatrix(color_filter_matrix_mtb);
4579 EXPECT_FALSE(color_filter_nomtb->modifies_transparent_black());
4580 EXPECT_TRUE(color_filter_mtb->modifies_transparent_black());
4581
4582 test_data =
4583 get_output(test_dst_colors.size(), 1, true, [this](SkCanvas* canvas) {
4584 int x = 0;
4585 for (DlColor color : test_dst_colors) {
4586 SkPaint paint;
4587 paint.setColor(ToSkColor4f(color));
4588 paint.setBlendMode(SkBlendMode::kSrc);
4589 canvas->drawRect(SkRect::MakeXYWH(x, 0, 1, 1), paint);
4590 x++;
4591 }
4592 });
4593
4594 // For image-on-image tests, the src and dest images will have repeated
4595 // rows/columns that have every color, but laid out at right angles to
4596 // each other so we see an interaction with every test color against
4597 // every other test color.
4598 int data_count = test_data->image()->width();
4600 data_count, data_count, true, [this, data_count](SkCanvas* canvas) {
4601 ASSERT_EQ(test_data->width(), data_count);
4602 ASSERT_EQ(test_data->height(), 1);
4603 for (int y = 0; y < data_count; y++) {
4604 canvas->drawImage(test_data->image().get(), 0, y);
4605 }
4606 });
4608 data_count, data_count, true, [this, data_count](SkCanvas* canvas) {
4609 ASSERT_EQ(test_data->width(), data_count);
4610 ASSERT_EQ(test_data->height(), 1);
4611 canvas->translate(data_count, 0);
4612 canvas->rotate(90);
4613 for (int y = 0; y < data_count; y++) {
4614 canvas->drawImage(test_data->image().get(), 0, y);
4615 }
4616 });
4617 // Double check that the pixel data is laid out in orthogonal stripes
4618 for (int y = 0; y < data_count; y++) {
4619 for (int x = 0; x < data_count; x++) {
4620 EXPECT_EQ(*test_image_dst_data->addr32(x, y), *test_data->addr32(x, 0));
4621 EXPECT_EQ(*test_image_src_data->addr32(x, y), *test_data->addr32(y, 0));
4622 }
4623 }
4624 }
static std::shared_ptr< const DlColorFilter > MakeMatrix(const float matrix[20])
std::unique_ptr< RenderResult > test_data
std::shared_ptr< const DlColorFilter > color_filter_nomtb
std::unique_ptr< RenderResult > test_image_dst_data
std::unique_ptr< RenderResult > test_image_src_data
std::shared_ptr< const DlColorFilter > color_filter_mtb
std::unique_ptr< RenderResult > get_output(int w, int h, bool snapshot, const std::function< void(SkCanvas *)> &renderer)
int32_t x
double y
DisplayListRenderingTestBase<::testing::Test > DisplayListRendering
flutter::DlColor DlColor
static constexpr DlColor kWhite()
Definition dl_color.h:70
static constexpr DlColor kBlue()
Definition dl_color.h:73
static constexpr DlColor kBlack()
Definition dl_color.h:69
static constexpr DlColor kLightGrey()
Definition dl_color.h:79
static constexpr DlColor kTransparent()
Definition dl_color.h:68
static constexpr DlColor kRed()
Definition dl_color.h:71
static constexpr DlColor kGreen()
Definition dl_color.h:72
static constexpr DlColor kDarkGrey()
Definition dl_color.h:77
DlColor withAlpha(uint8_t alpha) const
Definition dl_color.h:120

References color_filter_mtb, color_filter_nomtb, get_output(), flutter::DlColor::kBlack(), flutter::DlColor::kBlue(), flutter::DlColor::kDarkGrey(), flutter::DlColor::kGreen(), flutter::DlColor::kLightGrey(), flutter::DlColor::kRed(), flutter::DlColor::kTransparent(), flutter::DlColor::kWhite(), flutter::DlColorFilter::MakeMatrix(), test_data, test_dst_colors, test_src_colors, and flutter::DlColor::withAlpha().

Member Function Documentation

◆ check_color_result()

int flutter::testing::DisplayListNopTest::check_color_result ( DlColor  dst_color,
DlColor  result_color,
const sk_sp< DisplayList > &  dl,
const std::string &  desc 
)
inlineprotected

Definition at line 4657 of file dl_rendering_unittests.cc.

4660 {
4661 int ret = 0;
4662 bool is_error = false;
4663 if (dst_color.isTransparent() && !result_color.isTransparent()) {
4664 ret |= kWasMTB;
4665 is_error = !dl->modifies_transparent_black();
4666 }
4667 if (result_color != dst_color) {
4668 ret |= kWasNotNop;
4669 is_error = (dl->op_count() == 0u);
4670 }
4671 if (is_error) {
4672 FML_LOG(ERROR) << std::hex << dst_color << " filters to " << result_color
4673 << desc;
4674 }
4675 return ret;
4676 }
#define FML_LOG(severity)
Definition logging.h:101

References FML_LOG, and flutter::DlColor::isTransparent().

◆ check_image_result()

int flutter::testing::DisplayListNopTest::check_image_result ( const std::unique_ptr< RenderResult > &  dst_data,
const std::unique_ptr< RenderResult > &  result_data,
const sk_sp< DisplayList > &  dl,
const std::string &  desc 
)
inlineprotected

Definition at line 4678 of file dl_rendering_unittests.cc.

4681 {
4682 EXPECT_EQ(dst_data->width(), result_data->width());
4683 EXPECT_EQ(dst_data->height(), result_data->height());
4684 int all_flags = 0;
4685 for (int y = 0; y < dst_data->height(); y++) {
4686 const uint32_t* dst_pixels = dst_data->addr32(0, y);
4687 const uint32_t* result_pixels = result_data->addr32(0, y);
4688 for (int x = 0; x < dst_data->width(); x++) {
4689 all_flags |= check_color_result(DlColor(dst_pixels[x]),
4690 DlColor(result_pixels[x]), dl, desc);
4691 }
4692 }
4693 return all_flags;
4694 }
int check_color_result(DlColor dst_color, DlColor result_color, const sk_sp< DisplayList > &dl, const std::string &desc)

References x, and y.

◆ get_output()

std::unique_ptr< RenderResult > flutter::testing::DisplayListNopTest::get_output ( int  w,
int  h,
bool  snapshot,
const std::function< void(SkCanvas *)> &  renderer 
)
inlineprotected

Definition at line 4646 of file dl_rendering_unittests.cc.

4650 {
4651 auto surface = SkSurfaces::Raster(SkImageInfo::MakeN32Premul(w, h));
4652 SkCanvas* canvas = surface->getCanvas();
4653 renderer(canvas);
4654 return std::make_unique<SkRenderResult>(surface, snapshot);
4655 }
VkSurfaceKHR surface
Definition main.cc:65
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder h
Definition switch_defs.h:54

References flutter::h, and surface.

Referenced by DisplayListNopTest().

◆ report_results()

void flutter::testing::DisplayListNopTest::report_results ( int  all_flags,
const sk_sp< DisplayList > &  dl,
const std::string &  desc 
)
inlineprotected

Definition at line 4696 of file dl_rendering_unittests.cc.

4698 {
4699 if (!dl->modifies_transparent_black()) {
4700 EXPECT_TRUE((all_flags & kWasMTB) == 0);
4701 } else if ((all_flags & kWasMTB) == 0) {
4702 FML_LOG(INFO) << "combination does not affect transparency: " << desc;
4703 }
4704 if (dl->op_count() == 0u) {
4705 EXPECT_TRUE((all_flags & kWasNotNop) == 0);
4706 } else if ((all_flags & kWasNotNop) == 0) {
4707 FML_LOG(INFO) << "combination could be classified as a nop: " << desc;
4708 }
4709 };

References FML_LOG.

◆ test_attributes_image()

void flutter::testing::DisplayListNopTest::test_attributes_image ( DlBlendMode  mode,
DlColor  color,
const DlColorFilter color_filter,
DlImageFilter image_filter 
)
inlineprotected

Definition at line 4789 of file dl_rendering_unittests.cc.

4792 {
4793 // if (true) { return; }
4794 std::stringstream desc_stream;
4795 desc_stream << " rendering with: ";
4796 desc_stream << BlendModeToString(mode);
4797 desc_stream << "/" << color;
4798 std::string cf_mtb = color_filter
4799 ? color_filter->modifies_transparent_black()
4800 ? "modifies transparency"
4801 : "preserves transparency"
4802 : "no filter";
4803 desc_stream << ", CF: " << cf_mtb;
4804 std::string if_mtb = image_filter
4805 ? image_filter->modifies_transparent_black()
4806 ? "modifies transparency"
4807 : "preserves transparency"
4808 : "no filter";
4809 desc_stream << ", IF: " << if_mtb;
4810 std::string desc = desc_stream.str();
4811
4812 DisplayListBuilder builder(DlRect::MakeWH(100.0f, 100.0f));
4813 DlPaint paint = DlPaint(color) //
4814 .setBlendMode(mode) //
4815 .setColorFilter(color_filter) //
4816 .setImageFilter(image_filter);
4817 builder.DrawImage(DlImage::Make(test_image_src_data->image()),
4819 auto dl = builder.Build();
4820
4821 int w = test_image_src_data->width();
4822 int h = test_image_src_data->height();
4823 auto sk_mode = static_cast<SkBlendMode>(mode);
4824 SkPaint sk_paint;
4825 sk_paint.setBlendMode(sk_mode);
4826 sk_paint.setColor(ToSkColor4f(color));
4827 sk_paint.setColorFilter(ToSk(color_filter));
4828 sk_paint.setImageFilter(ToSk(image_filter));
4829 for (auto& back_end : CanvasCompareTester::TestBackends) {
4830 auto provider = CanvasCompareTester::GetProvider(back_end);
4831 auto result_surface = provider->MakeOffscreenSurface(
4833 SkCanvas* result_canvas = result_surface->sk_surface()->getCanvas();
4834 result_canvas->clear(SK_ColorTRANSPARENT);
4835 result_canvas->drawImage(test_image_dst_data->image(), 0, 0);
4836 result_canvas->drawImage(test_image_src_data->image(), 0, 0,
4837 SkSamplingOptions(), &sk_paint);
4838 if (GrDirectContext* direct_context = GrAsDirectContext(
4839 result_surface->sk_surface()->recordingContext())) {
4840 direct_context->flushAndSubmit();
4841 direct_context->flushAndSubmit(result_surface->sk_surface().get(),
4842 GrSyncCpu::kYes);
4843 }
4844 std::unique_ptr<RenderResult> result_pixels =
4845 std::make_unique<SkRenderResult>(result_surface->sk_surface());
4846
4847 int all_flags =
4848 check_image_result(test_image_dst_data, result_pixels, dl, desc);
4849 report_results(all_flags, dl, desc);
4850 }
4851 };
static sk_sp< DlImage > Make(const SkImage *image)
Definition dl_image.cc:11
DlPaint & setBlendMode(DlBlendMode mode)
Definition dl_paint.h:85
DlPaint & setImageFilter(std::nullptr_t filter)
Definition dl_paint.h:167
DlPaint & setColorFilter(std::nullptr_t filter)
Definition dl_paint.h:149
static std::unique_ptr< DlSurfaceProvider > GetProvider(BackendType type)
void report_results(int all_flags, const sk_sp< DisplayList > &dl, const std::string &desc)
int check_image_result(const std::unique_ptr< RenderResult > &dst_data, const std::unique_ptr< RenderResult > &result_data, const sk_sp< DisplayList > &dl, const std::string &desc)
SkPaint ToSk(const DlPaint &paint)
SkColor4f ToSkColor4f(DlColor color)
it will be possible to load the file into Perfetto s trace viewer use test Running tests that layout and measure text will not yield consistent results across various platforms Enabling this option will make font resolution default to the Ahem test font on all disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive mode
impeller::Point DlPoint
const char * BlendModeToString(BlendMode blend_mode)
Definition color.cc:47
flutter::DlPaint DlPaint
static constexpr TRect MakeWH(Type width, Type height)
Definition rect.h:140

References impeller::BlendModeToString(), flutter::DisplayListBuilder::Build(), flutter::DisplayListBuilder::DrawImage(), flutter::testing::CanvasCompareTester::GetProvider(), flutter::h, flutter::testing::DlSurfaceProvider::kN32PremulPixelFormat, flutter::kNearestNeighbor, flutter::DlImage::Make(), impeller::TRect< Scalar >::MakeWH(), flutter::mode, flutter::DlColorFilter::modifies_transparent_black(), flutter::DlImageFilter::modifies_transparent_black(), flutter::DlPaint::setBlendMode(), flutter::DlPaint::setColorFilter(), flutter::DlPaint::setImageFilter(), flutter::testing::CanvasCompareTester::TestBackends, flutter::ToSk(), and flutter::ToSkColor4f().

◆ test_mode_color_via_filter()

void flutter::testing::DisplayListNopTest::test_mode_color_via_filter ( DlBlendMode  mode,
DlColor  color 
)
inlineprotected

Definition at line 4711 of file dl_rendering_unittests.cc.

4711 {
4712 std::stringstream desc_stream;
4713 desc_stream << " using SkColorFilter::filterColor() with: ";
4714 desc_stream << BlendModeToString(mode);
4715 desc_stream << "/" << color;
4716 std::string desc = desc_stream.str();
4717 DisplayListBuilder builder(DlRect::MakeWH(100.0f, 100.0f));
4718 DlPaint paint = DlPaint(color).setBlendMode(mode);
4719 builder.DrawRect(DlRect::MakeLTRB(0.0f, 0.0f, 10.0f, 10.0f), paint);
4720 auto dl = builder.Build();
4721 if (dl->modifies_transparent_black()) {
4722 ASSERT_TRUE(dl->op_count() != 0u);
4723 }
4724
4725 auto sk_mode = static_cast<SkBlendMode>(mode);
4726 auto sk_color_filter =
4727 SkColorFilters::Blend(ToSkColor4f(color), nullptr, sk_mode);
4728 auto srgb = SkColorSpace::MakeSRGB();
4729 int all_flags = 0;
4730 if (sk_color_filter) {
4731 for (DlColor dst_color : test_dst_colors) {
4732 SkColor4f dst_color_f = ToSkColor4f(dst_color);
4733 DlColor result = DlColor(
4734 sk_color_filter->filterColor4f(dst_color_f, srgb.get(), srgb.get())
4735 .toSkColor());
4736 all_flags |= check_color_result(dst_color, result, dl, desc);
4737 }
4738 if ((all_flags & kWasMTB) != 0) {
4739 EXPECT_FALSE(sk_color_filter->isAlphaUnchanged());
4740 }
4741 }
4742 report_results(all_flags, dl, desc);
4743 };
static constexpr TRect MakeLTRB(Type left, Type top, Type right, Type bottom)
Definition rect.h:129

References impeller::BlendModeToString(), flutter::DisplayListBuilder::Build(), flutter::DisplayListBuilder::DrawRect(), impeller::TRect< Scalar >::MakeLTRB(), impeller::TRect< Scalar >::MakeWH(), flutter::mode, flutter::DlPaint::setBlendMode(), and flutter::ToSkColor4f().

◆ test_mode_color_via_rendering()

void flutter::testing::DisplayListNopTest::test_mode_color_via_rendering ( DlBlendMode  mode,
DlColor  color 
)
inlineprotected

Definition at line 4745 of file dl_rendering_unittests.cc.

4745 {
4746 std::stringstream desc_stream;
4747 desc_stream << " rendering with: ";
4748 desc_stream << BlendModeToString(mode);
4749 desc_stream << "/" << color;
4750 std::string desc = desc_stream.str();
4751 auto test_image = test_data->image();
4752 DlRect test_bounds =
4753 DlRect::MakeWH(test_image->width(), test_image->height());
4754 DisplayListBuilder builder(test_bounds);
4755 DlPaint dl_paint = DlPaint(color).setBlendMode(mode);
4756 builder.DrawRect(test_bounds, dl_paint);
4757 auto dl = builder.Build();
4758 bool dl_is_elided = dl->op_count() == 0u;
4759 bool dl_affects_transparent_pixels = dl->modifies_transparent_black();
4760 ASSERT_TRUE(!dl_is_elided || !dl_affects_transparent_pixels);
4761
4762 auto sk_mode = static_cast<SkBlendMode>(mode);
4763 SkPaint sk_paint;
4764 sk_paint.setBlendMode(sk_mode);
4765 sk_paint.setColor(ToSkColor4f(color));
4766 for (auto& back_end : CanvasCompareTester::TestBackends) {
4767 auto provider = CanvasCompareTester::GetProvider(back_end);
4768 auto result_surface = provider->MakeOffscreenSurface(
4769 test_image->width(), test_image->height(),
4771 SkCanvas* result_canvas = result_surface->sk_surface()->getCanvas();
4772 result_canvas->clear(SK_ColorTRANSPARENT);
4773 result_canvas->drawImage(test_image.get(), 0, 0);
4774 result_canvas->drawRect(ToSkRect(test_bounds), sk_paint);
4775 if (GrDirectContext* direct_context = GrAsDirectContext(
4776 result_surface->sk_surface()->recordingContext())) {
4777 direct_context->flushAndSubmit();
4778 direct_context->flushAndSubmit(result_surface->sk_surface().get(),
4779 GrSyncCpu::kYes);
4780 }
4781 const std::unique_ptr<RenderResult> result_pixels =
4782 std::make_unique<SkRenderResult>(result_surface->sk_surface());
4783
4784 int all_flags = check_image_result(test_data, result_pixels, dl, desc);
4785 report_results(all_flags, dl, desc);
4786 }
4787 };
impeller::Rect DlRect
const SkRect & ToSkRect(const DlRect &rect)

References impeller::BlendModeToString(), flutter::DisplayListBuilder::Build(), flutter::DisplayListBuilder::DrawRect(), flutter::testing::CanvasCompareTester::GetProvider(), flutter::testing::DlSurfaceProvider::kN32PremulPixelFormat, impeller::TRect< Scalar >::MakeWH(), flutter::mode, flutter::DlPaint::setBlendMode(), flutter::testing::CanvasCompareTester::TestBackends, flutter::ToSkColor4f(), and flutter::ToSkRect().

Member Data Documentation

◆ color_filter_mtb

std::shared_ptr<const DlColorFilter> flutter::testing::DisplayListNopTest::color_filter_mtb
protected

Definition at line 4635 of file dl_rendering_unittests.cc.

Referenced by DisplayListNopTest().

◆ color_filter_nomtb

std::shared_ptr<const DlColorFilter> flutter::testing::DisplayListNopTest::color_filter_nomtb
protected

Definition at line 4634 of file dl_rendering_unittests.cc.

Referenced by DisplayListNopTest().

◆ kWasMTB

constexpr int flutter::testing::DisplayListNopTest::kWasMTB = 0x2
staticconstexprprotected

Definition at line 4629 of file dl_rendering_unittests.cc.

◆ kWasNotNop

constexpr int flutter::testing::DisplayListNopTest::kWasNotNop = 0x1
staticconstexprprotected

Definition at line 4628 of file dl_rendering_unittests.cc.

◆ test_data

std::unique_ptr<RenderResult> flutter::testing::DisplayListNopTest::test_data
protected

Definition at line 4638 of file dl_rendering_unittests.cc.

Referenced by DisplayListNopTest().

◆ test_dst_colors

std::vector<DlColor> flutter::testing::DisplayListNopTest::test_dst_colors
protected

Definition at line 4632 of file dl_rendering_unittests.cc.

Referenced by DisplayListNopTest().

◆ test_image_dst_data

std::unique_ptr<RenderResult> flutter::testing::DisplayListNopTest::test_image_dst_data
protected

Definition at line 4641 of file dl_rendering_unittests.cc.

◆ test_image_src_data

std::unique_ptr<RenderResult> flutter::testing::DisplayListNopTest::test_image_src_data
protected

Definition at line 4644 of file dl_rendering_unittests.cc.

◆ test_src_colors

std::vector<DlColor> flutter::testing::DisplayListNopTest::test_src_colors
protected

Definition at line 4631 of file dl_rendering_unittests.cc.

Referenced by DisplayListNopTest().


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