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

Public Member Functions

 DisplayListRenderingTestBase ()=default
 

Static Public Member Functions

static bool StartsWith (std::string str, std::string prefix)
 
static void SetUpTestSuite ()
 
static void TearDownTestSuite ()
 

Additional Inherited Members

- 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
 

Detailed Description

template<typename BaseT>
class flutter::testing::DisplayListRenderingTestBase< BaseT >

Definition at line 2824 of file dl_rendering_unittests.cc.

Constructor & Destructor Documentation

◆ DisplayListRenderingTestBase()

template<typename BaseT >
flutter::testing::DisplayListRenderingTestBase< BaseT >::DisplayListRenderingTestBase ( )
default

Member Function Documentation

◆ SetUpTestSuite()

template<typename BaseT >
static void flutter::testing::DisplayListRenderingTestBase< BaseT >::SetUpTestSuite ( )
inlinestatic

Definition at line 2841 of file dl_rendering_unittests.cc.

2841 {
2842 bool do_software = true;
2843 bool do_opengl = false;
2844 bool do_metal = false;
2845 std::vector<std::string> args = ::testing::internal::GetArgvs();
2846 for (auto p_arg = std::next(args.begin()); p_arg != args.end(); p_arg++) {
2847 std::string arg = *p_arg;
2848 bool enable = true;
2849 if (arg == "--save-impeller-failures") {
2851 continue;
2852 }
2853 if (StartsWith(arg, "--no")) {
2854 enable = false;
2855 arg = "-" + arg.substr(4);
2856 } else if (StartsWith(arg, "--disable")) {
2857 enable = false;
2858 arg = "--en" + arg.substr(5);
2859 }
2860 if (arg == "--enable-software") {
2861 do_software = enable;
2862 } else if (arg == "--enable-opengl" || arg == "--enable-gl") {
2863 do_opengl = enable;
2864 } else if (arg == "--enable-metal") {
2865 do_metal = enable;
2866 } else if (arg == "--enable-impeller") {
2868 }
2869 }
2870 // Multiple test suites use this test base. Make sure that they don't
2871 // double-register the supported providers.
2873 if (do_software) {
2874 CanvasCompareTester::AddProvider(BackendType::kSoftwareBackend);
2875 }
2876 if (do_opengl) {
2877 CanvasCompareTester::AddProvider(BackendType::kOpenGlBackend);
2878 }
2879 if (do_metal) {
2880 CanvasCompareTester::AddProvider(BackendType::kMetalBackend);
2881 }
2882 std::string providers = "";
2883 for (auto& back_end : CanvasCompareTester::TestBackends) {
2884 providers += " " + DlSurfaceProvider::BackendName(back_end);
2885 }
2886 std::string libraries = " Skia";
2889 libraries += " Impeller";
2890 }
2891 FML_LOG(INFO) << "Running tests on [" << providers //
2892 << " ], and [" << libraries << " ]";
2893 }
static bool StartsWith(std::string str, std::string prefix)
static std::string BackendName(BackendType type)
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
#define FML_LOG(severity)
Definition logging.h:101

References flutter::testing::CanvasCompareTester::AddProvider(), args, flutter::testing::DlSurfaceProvider::BackendName(), flutter::testing::CanvasCompareTester::ClearProviders(), flutter::testing::RenderEnvironment::EnableImpeller, FML_LOG, flutter::testing::CanvasCompareTester::ImpellerSupported, flutter::testing::CanvasCompareTester::SaveImpellerFailureImages, flutter::testing::DisplayListRenderingTestBase< BaseT >::StartsWith(), and flutter::testing::CanvasCompareTester::TestBackends.

◆ StartsWith()

template<typename BaseT >
static bool flutter::testing::DisplayListRenderingTestBase< BaseT >::StartsWith ( std::string  str,
std::string  prefix 
)
inlinestatic

Definition at line 2829 of file dl_rendering_unittests.cc.

2829 {
2830 if (prefix.length() > str.length()) {
2831 return false;
2832 }
2833 for (size_t i = 0; i < prefix.length(); i++) {
2834 if (str[i] != prefix[i]) {
2835 return false;
2836 }
2837 }
2838 return true;
2839 }

References i.

Referenced by flutter::testing::DisplayListRenderingTestBase< BaseT >::SetUpTestSuite().

◆ TearDownTestSuite()

template<typename BaseT >
static void flutter::testing::DisplayListRenderingTestBase< BaseT >::TearDownTestSuite ( )
inlinestatic

Definition at line 2895 of file dl_rendering_unittests.cc.

2895 {
2897 FML_LOG(INFO);
2899 << " images saved in "
2901 for (const auto& filename : CanvasCompareTester::ImpellerFailureImages) {
2902 FML_LOG(INFO) << " " << filename;
2903 }
2904 FML_LOG(INFO);
2905 }
2906 }
static std::vector< std::string > ImpellerFailureImages
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 keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size

References FML_LOG, flutter::testing::CanvasCompareTester::ImpellerFailureImageDirectory, flutter::testing::CanvasCompareTester::ImpellerFailureImages, and flutter::size.


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