Flutter Engine
The Flutter Engine
Classes | Namespaces | Macros | Typedefs | Functions | Variables
dl_test_snippets.h File Reference
#include "flutter/display_list/display_list.h"
#include "flutter/display_list/dl_builder.h"
#include "flutter/testing/testing.h"
#include "third_party/skia/include/core/SkCanvas.h"
#include "third_party/skia/include/core/SkSurface.h"
#include "third_party/skia/include/effects/SkGradientShader.h"
#include "third_party/skia/include/effects/SkImageFilters.h"

Go to the source code of this file.

Classes

struct  flutter::testing::DisplayListInvocation
 
struct  flutter::testing::DisplayListInvocationGroup
 

Namespaces

namespace  flutter
 
namespace  flutter::testing
 

Macros

#define TestPointCount   sizeof(kTestPoints) / (sizeof(kTestPoints[0]))
 

Typedefs

typedef const std::function< void(DlOpReceiver &)> flutter::testing::DlInvoker
 

Functions

sk_sp< DisplayList > flutter::testing::GetSampleDisplayList ()
 
sk_sp< DisplayList > flutter::testing::GetSampleDisplayList (int ops)
 
sk_sp< DisplayList > flutter::testing::GetSampleNestedDisplayList ()
 
static sk_sp< DlImage > flutter::testing::MakeTestImage (int w, int h, int checker_size)
 
static const DlImageColorSource flutter::testing::kTestSource1 (TestImage1, DlTileMode::kClamp, DlTileMode::kMirror, kLinearSampling)
 
static const DlBlendColorFilter flutter::testing::kTestBlendColorFilter1 (DlColor::kRed(), DlBlendMode::kDstATop)
 
static const DlBlendColorFilter flutter::testing::kTestBlendColorFilter2 (DlColor::kBlue(), DlBlendMode::kDstATop)
 
static const DlBlendColorFilter flutter::testing::kTestBlendColorFilter3 (DlColor::kRed(), DlBlendMode::kDstIn)
 
static const DlMatrixColorFilter flutter::testing::kTestMatrixColorFilter1 (kRotateColorMatrix)
 
static const DlMatrixColorFilter flutter::testing::kTestMatrixColorFilter2 (kInvertColorMatrix)
 
static const DlBlurImageFilter flutter::testing::kTestBlurImageFilter1 (5.0, 5.0, DlTileMode::kClamp)
 
static const DlBlurImageFilter flutter::testing::kTestBlurImageFilter2 (6.0, 5.0, DlTileMode::kClamp)
 
static const DlBlurImageFilter flutter::testing::kTestBlurImageFilter3 (5.0, 6.0, DlTileMode::kClamp)
 
static const DlBlurImageFilter flutter::testing::kTestBlurImageFilter4 (5.0, 5.0, DlTileMode::kDecal)
 
static const DlDilateImageFilter flutter::testing::kTestDilateImageFilter1 (5.0, 5.0)
 
static const DlDilateImageFilter flutter::testing::kTestDilateImageFilter2 (6.0, 5.0)
 
static const DlDilateImageFilter flutter::testing::kTestDilateImageFilter3 (5.0, 6.0)
 
static const DlErodeImageFilter flutter::testing::kTestErodeImageFilter1 (4.0, 4.0)
 
static const DlErodeImageFilter flutter::testing::kTestErodeImageFilter2 (4.0, 3.0)
 
static const DlErodeImageFilter flutter::testing::kTestErodeImageFilter3 (3.0, 4.0)
 
static const DlMatrixImageFilter flutter::testing::kTestMatrixImageFilter1 (SkMatrix::RotateDeg(45), kNearestSampling)
 
static const DlMatrixImageFilter flutter::testing::kTestMatrixImageFilter2 (SkMatrix::RotateDeg(85), kNearestSampling)
 
static const DlMatrixImageFilter flutter::testing::kTestMatrixImageFilter3 (SkMatrix::RotateDeg(45), kLinearSampling)
 
static const DlComposeImageFilter flutter::testing::kTestComposeImageFilter1 (kTestBlurImageFilter1, kTestMatrixImageFilter1)
 
static const DlComposeImageFilter flutter::testing::kTestComposeImageFilter2 (kTestBlurImageFilter2, kTestMatrixImageFilter1)
 
static const DlComposeImageFilter flutter::testing::kTestComposeImageFilter3 (kTestBlurImageFilter1, kTestMatrixImageFilter2)
 
static const DlColorFilterImageFilter flutter::testing::kTestCFImageFilter1 (kTestBlendColorFilter1)
 
static const DlColorFilterImageFilter flutter::testing::kTestCFImageFilter2 (kTestBlendColorFilter2)
 
static const DlBlurMaskFilter flutter::testing::kTestMaskFilter1 (DlBlurStyle::kNormal, 3.0)
 
static const DlBlurMaskFilter flutter::testing::kTestMaskFilter2 (DlBlurStyle::kNormal, 5.0)
 
static const DlBlurMaskFilter flutter::testing::kTestMaskFilter3 (DlBlurStyle::kSolid, 3.0)
 
static const DlBlurMaskFilter flutter::testing::kTestMaskFilter4 (DlBlurStyle::kInner, 3.0)
 
static const DlBlurMaskFilter flutter::testing::kTestMaskFilter5 (DlBlurStyle::kOuter, 3.0)
 
static sk_sp< DisplayList > flutter::testing::MakeTestDisplayList (int w, int h, SkColor color)
 
SkFont flutter::testing::CreateTestFontOfSize (SkScalar scalar)
 
sk_sp< SkTextBlobflutter::testing::GetTestTextBlob (int index)
 
std::vector< DisplayListInvocationGroup > flutter::testing::CreateAllRenderingOps ()
 
std::vector< DisplayListInvocationGroup > flutter::testing::CreateAllGroups ()
 

Variables

constexpr SkPoint flutter::testing::kEndPoints []
 
const DlColor flutter::testing::kColors []
 
constexpr float flutter::testing::kStops []
 
constexpr float flutter::testing::kRotateColorMatrix [20]
 
constexpr float flutter::testing::kInvertColorMatrix [20]
 
static DlImageSampling flutter::testing::kNearestSampling = DlImageSampling::kNearestNeighbor
 
static DlImageSampling flutter::testing::kLinearSampling = DlImageSampling::kLinear
 
static auto flutter::testing::TestImage1 = MakeTestImage(40, 40, 5)
 
static auto flutter::testing::TestImage2 = MakeTestImage(50, 50, 5)
 
static auto flutter::testing::TestSkImage = MakeTestImage(30, 30, 5)->skia_image()
 
static const std::shared_ptr< DlColorSource > flutter::testing::kTestSource2
 
static const std::shared_ptr< DlColorSource > flutter::testing::kTestSource3
 
static const std::shared_ptr< DlColorSource > flutter::testing::kTestSource4
 
static const std::shared_ptr< DlColorSource > flutter::testing::kTestSource5
 
constexpr SkRect flutter::testing::kTestBounds = SkRect::MakeLTRB(10, 10, 50, 60)
 
static const SkRRect flutter::testing::kTestRRect = SkRRect::MakeRectXY(kTestBounds, 5, 5)
 
static const SkRRect flutter::testing::kTestRRectRect = SkRRect::MakeRect(kTestBounds)
 
static const SkRRect flutter::testing::kTestInnerRRect
 
static const SkPath flutter::testing::kTestPathRect = SkPath::Rect(kTestBounds)
 
static const SkPath flutter::testing::kTestPathOval = SkPath::Oval(kTestBounds)
 
static const SkPath flutter::testing::kTestPath1
 
static const SkPath flutter::testing::kTestPath2
 
static const SkPath flutter::testing::kTestPath3
 
static const SkMatrix flutter::testing::kTestMatrix1 = SkMatrix::Scale(2, 2)
 
static const SkMatrix flutter::testing::kTestMatrix2 = SkMatrix::RotateDeg(45)
 
static std::shared_ptr< const DlVertices > flutter::testing::TestVertices1
 
static std::shared_ptr< const DlVertices > flutter::testing::TestVertices2
 
static sk_sp< DisplayList > flutter::testing::TestDisplayList1
 
static sk_sp< DisplayList > flutter::testing::TestDisplayList2
 

Macro Definition Documentation

◆ TestPointCount

#define TestPointCount   sizeof(kTestPoints) / (sizeof(kTestPoints[0]))

Definition at line 62 of file dl_test_snippets.h.