Flutter Engine
 
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 4529 of file dl_rendering_unittests.cc.

Constructor & Destructor Documentation

◆ DisplayListNopTest()

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

Definition at line 4533 of file dl_rendering_unittests.cc.

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

4657 {
4658 int ret = 0;
4659 bool is_error = false;
4660 if (dst_color.isTransparent() && !result_color.isTransparent()) {
4661 ret |= kWasMTB;
4662 is_error = !dl->modifies_transparent_black();
4663 }
4664 if (result_color != dst_color) {
4665 ret |= kWasNotNop;
4666 is_error = (dl->op_count() == 0u);
4667 }
4668 if (is_error) {
4669 FML_LOG(ERROR) << std::hex << dst_color << " filters to " << result_color
4670 << desc;
4671 }
4672 return ret;
4673 }
#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 4675 of file dl_rendering_unittests.cc.

4678 {
4679 EXPECT_EQ(dst_data->width(), result_data->width());
4680 EXPECT_EQ(dst_data->height(), result_data->height());
4681 int all_flags = 0;
4682 for (int y = 0; y < dst_data->height(); y++) {
4683 const uint32_t* dst_pixels = dst_data->addr32(0, y);
4684 const uint32_t* result_pixels = result_data->addr32(0, y);
4685 for (int x = 0; x < dst_data->width(); x++) {
4686 all_flags |= check_color_result(DlColor(dst_pixels[x]),
4687 DlColor(result_pixels[x]), dl, desc);
4688 }
4689 }
4690 return all_flags;
4691 }
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 4643 of file dl_rendering_unittests.cc.

4647 {
4648 auto surface = SkSurfaces::Raster(SkImageInfo::MakeN32Premul(w, h));
4649 SkCanvas* canvas = surface->getCanvas();
4650 renderer(canvas);
4651 return std::make_unique<SkRenderResult>(surface, snapshot);
4652 }
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 4693 of file dl_rendering_unittests.cc.

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

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 4786 of file dl_rendering_unittests.cc.

4789 {
4790 // if (true) { return; }
4791 std::stringstream desc_stream;
4792 desc_stream << " rendering with: ";
4793 desc_stream << BlendModeToString(mode);
4794 desc_stream << "/" << color;
4795 std::string cf_mtb = color_filter
4796 ? color_filter->modifies_transparent_black()
4797 ? "modifies transparency"
4798 : "preserves transparency"
4799 : "no filter";
4800 desc_stream << ", CF: " << cf_mtb;
4801 std::string if_mtb = image_filter
4802 ? image_filter->modifies_transparent_black()
4803 ? "modifies transparency"
4804 : "preserves transparency"
4805 : "no filter";
4806 desc_stream << ", IF: " << if_mtb;
4807 std::string desc = desc_stream.str();
4808
4809 DisplayListBuilder builder(DlRect::MakeWH(100.0f, 100.0f));
4810 DlPaint paint = DlPaint(color) //
4811 .setBlendMode(mode) //
4812 .setColorFilter(color_filter) //
4813 .setImageFilter(image_filter);
4814 builder.DrawImage(DlImage::Make(test_image_src_data->image()),
4816 auto dl = builder.Build();
4817
4818 int w = test_image_src_data->width();
4819 int h = test_image_src_data->height();
4820 auto sk_mode = static_cast<SkBlendMode>(mode);
4821 SkPaint sk_paint;
4822 sk_paint.setBlendMode(sk_mode);
4823 sk_paint.setColor(ToSkColor4f(color));
4824 sk_paint.setColorFilter(ToSk(color_filter));
4825 sk_paint.setImageFilter(ToSk(image_filter));
4826 for (auto& back_end : CanvasCompareTester::TestBackends) {
4827 auto provider = CanvasCompareTester::GetProvider(back_end);
4828 auto result_surface = provider->MakeOffscreenSurface(
4830 SkCanvas* result_canvas = result_surface->sk_surface()->getCanvas();
4831 result_canvas->clear(SK_ColorTRANSPARENT);
4832 result_canvas->drawImage(test_image_dst_data->image(), 0, 0);
4833 result_canvas->drawImage(test_image_src_data->image(), 0, 0,
4834 SkSamplingOptions(), &sk_paint);
4835 if (GrDirectContext* direct_context = GrAsDirectContext(
4836 result_surface->sk_surface()->recordingContext())) {
4837 direct_context->flushAndSubmit();
4838 direct_context->flushAndSubmit(result_surface->sk_surface().get(),
4839 GrSyncCpu::kYes);
4840 }
4841 std::unique_ptr<RenderResult> result_pixels =
4842 std::make_unique<SkRenderResult>(result_surface->sk_surface());
4843
4844 int all_flags =
4845 check_image_result(test_image_dst_data, result_pixels, dl, desc);
4846 report_results(all_flags, dl, desc);
4847 }
4848 };
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 4708 of file dl_rendering_unittests.cc.

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

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

Referenced by DisplayListNopTest().

◆ kWasMTB

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

Definition at line 4626 of file dl_rendering_unittests.cc.

◆ kWasNotNop

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

Definition at line 4625 of file dl_rendering_unittests.cc.

◆ test_data

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

Definition at line 4635 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 4629 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 4638 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 4641 of file dl_rendering_unittests.cc.

◆ test_src_colors

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

Definition at line 4628 of file dl_rendering_unittests.cc.

Referenced by DisplayListNopTest().


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