Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
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 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 kDrawTextBlobFlags
 
static constexpr DisplayListAttributeFlags kDrawShadowFlags
 

Detailed Description

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

Definition at line 2776 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 2793 of file dl_rendering_unittests.cc.

2793 {
2794 bool do_software = true;
2795 bool do_opengl = false;
2796 bool do_metal = false;
2797 std::vector<std::string> args = ::testing::internal::GetArgvs();
2798 for (auto p_arg = std::next(args.begin()); p_arg != args.end(); p_arg++) {
2799 std::string arg = *p_arg;
2800 bool enable = true;
2801 if (arg == "--save-impeller-failures") {
2803 continue;
2804 }
2805 if (StartsWith(arg, "--no")) {
2806 enable = false;
2807 arg = "-" + arg.substr(4);
2808 }
2809 if (arg == "--enable-software") {
2810 do_software = enable;
2811 } else if (arg == "--enable-opengl" || arg == "--enable-gl") {
2812 do_opengl = enable;
2813 } else if (arg == "--enable-metal") {
2814 do_metal = enable;
2815 }
2816 }
2817 if (do_software) {
2818 CanvasCompareTester::AddProvider(BackendType::kSoftwareBackend);
2819 }
2820 if (do_opengl) {
2821 CanvasCompareTester::AddProvider(BackendType::kOpenGlBackend);
2822 }
2823 if (do_metal) {
2824 CanvasCompareTester::AddProvider(BackendType::kMetalBackend);
2825 }
2826 std::string providers = "";
2827 for (auto& back_end : CanvasCompareTester::TestBackends) {
2828 providers += " " + DlSurfaceProvider::BackendName(back_end);
2829 }
2830 FML_LOG(INFO) << "Running tests on [" << providers << " ]";
2831 }
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:82

◆ StartsWith()

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

Definition at line 2781 of file dl_rendering_unittests.cc.

2781 {
2782 if (prefix.length() > str.length()) {
2783 return false;
2784 }
2785 for (size_t i = 0; i < prefix.length(); i++) {
2786 if (str[i] != prefix[i]) {
2787 return false;
2788 }
2789 }
2790 return true;
2791 }

◆ TearDownTestSuite()

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

Definition at line 2833 of file dl_rendering_unittests.cc.

2833 {
2835 FML_LOG(INFO);
2837 << " images saved in "
2839 for (const auto& filename : CanvasCompareTester::ImpellerFailureImages) {
2840 FML_LOG(INFO) << " " << filename;
2841 }
2842 FML_LOG(INFO);
2843 }
2844 }
static std::vector< std::string > ImpellerFailureImages
it will be possible to load the file into Perfetto s trace viewer 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
Definition switches.h:259

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