Flutter Engine
The Flutter Engine
Classes | Namespaces | Macros | Typedefs | Functions | Variables
dl_rendering_unittests.cc File Reference
#include <utility>
#include "flutter/display_list/display_list.h"
#include "flutter/display_list/dl_builder.h"
#include "flutter/display_list/dl_op_flags.h"
#include "flutter/display_list/dl_sampling_options.h"
#include "flutter/display_list/skia/dl_sk_canvas.h"
#include "flutter/display_list/skia/dl_sk_conversions.h"
#include "flutter/display_list/skia/dl_sk_dispatcher.h"
#include "flutter/display_list/testing/dl_test_snippets.h"
#include "flutter/display_list/testing/dl_test_surface_provider.h"
#include "flutter/display_list/utils/dl_comparable.h"
#include "flutter/fml/file.h"
#include "flutter/fml/math.h"
#include "flutter/testing/display_list_testing.h"
#include "flutter/testing/testing.h"
#include "third_party/skia/include/core/SkBBHFactory.h"
#include "third_party/skia/include/core/SkColorFilter.h"
#include "third_party/skia/include/core/SkColorSpace.h"
#include "third_party/skia/include/core/SkFontMgr.h"
#include "third_party/skia/include/core/SkPictureRecorder.h"
#include "third_party/skia/include/core/SkStream.h"
#include "third_party/skia/include/core/SkSurface.h"
#include "third_party/skia/include/core/SkTypeface.h"
#include "third_party/skia/include/effects/SkDashPathEffect.h"
#include "third_party/skia/include/effects/SkGradientShader.h"
#include "third_party/skia/include/effects/SkImageFilters.h"
#include "third_party/skia/include/encode/SkPngEncoder.h"
#include "third_party/skia/include/gpu/GrDirectContext.h"
#include "third_party/skia/include/gpu/GrRecordingContext.h"
#include "third_party/skia/include/gpu/GrTypes.h"
#include "txt/platform.h"

Go to the source code of this file.

Classes

class  flutter::testing::SkImageSampling
 
class  flutter::testing::OncePerBackendWarning
 
class  flutter::testing::BoundsTolerance
 
struct  flutter::testing::RenderContext< C, P, I >
 
class  flutter::testing::RenderResult
 
class  flutter::testing::SkRenderResult
 
class  flutter::testing::ImpellerRenderResult
 
struct  flutter::testing::RenderJobInfo
 
struct  flutter::testing::JobRenderer
 
struct  flutter::testing::MatrixClipJobRenderer
 
struct  flutter::testing::SkJobRenderer
 
struct  flutter::testing::DlJobRenderer
 
struct  flutter::testing::SkPictureJobRenderer
 
struct  flutter::testing::DisplayListJobRenderer
 
class  flutter::testing::RenderEnvironment
 
class  flutter::testing::CaseParameters
 
class  flutter::testing::TestParameters
 
class  flutter::testing::CanvasCompareTester
 
class  flutter::testing::DisplayListRenderingTestBase< BaseT >
 
class  flutter::testing::DisplayListNopTest
 

Namespaces

namespace  flutter
 
namespace  flutter::testing
 

Macros

#define FOR_EACH_BLEND_MODE_ENUM(FUNC)
 
#define MODE_CASE(m)
 
#define TEST_MODE(V)   test_mode(DlBlendMode::V);
 
#define TEST_MODE(V)   test_mode(DlBlendMode::V);
 
#define TEST_MODE(V)   test_mode_filter(DlBlendMode::V);
 
#define TEST_MODE(V)   test_mode_render(DlBlendMode::V);
 
#define TEST_MODE(V)   test_mode_render(DlBlendMode::V);
 

Typedefs

using flutter::testing::SkSetupContext = RenderContext< SkCanvas *, SkPaint &, sk_sp< SkImage > >
 
using flutter::testing::DlSetupContext = RenderContext< DlCanvas *, DlPaint &, sk_sp< DlImage > >
 
using flutter::testing::SkRenderContext = RenderContext< SkCanvas *, const SkPaint &, sk_sp< SkImage > >
 
using flutter::testing::DlRenderContext = RenderContext< DlCanvas *, const DlPaint &, sk_sp< DlImage > >
 
using flutter::testing::SkSetup = const std::function< void(const SkSetupContext &)>
 
using flutter::testing::SkRenderer = const std::function< void(const SkRenderContext &)>
 
using flutter::testing::DlSetup = const std::function< void(const DlSetupContext &)>
 
using flutter::testing::DlRenderer = const std::function< void(const DlRenderContext &)>
 
using flutter::testing::PixelFormat = DlSurfaceProvider::PixelFormat
 
using flutter::testing::DisplayListRendering = DisplayListRenderingTestBase<::testing::Test >
 

Functions

static void flutter::testing::DrawCheckerboard (DlCanvas *canvas)
 
static void flutter::testing::DrawCheckerboard (SkCanvas *canvas)
 
static std::shared_ptr< DlImageColorSource > flutter::testing::MakeColorSource (const sk_sp< DlImage > &image)
 
static sk_sp< SkShaderflutter::testing::MakeColorSource (const sk_sp< SkImage > &image)
 
 flutter::testing::TEST_F (DisplayListRendering, DrawPaint)
 
 flutter::testing::TEST_F (DisplayListRendering, DrawOpaqueColor)
 
 flutter::testing::TEST_F (DisplayListRendering, DrawAlphaColor)
 
 flutter::testing::TEST_F (DisplayListRendering, DrawDiagonalLines)
 
 flutter::testing::TEST_F (DisplayListRendering, DrawHorizontalLine)
 
 flutter::testing::TEST_F (DisplayListRendering, DrawVerticalLine)
 
 flutter::testing::TEST_F (DisplayListRendering, DrawDiagonalDashedLines)
 
 flutter::testing::TEST_F (DisplayListRendering, DrawRect)
 
 flutter::testing::TEST_F (DisplayListRendering, DrawOval)
 
 flutter::testing::TEST_F (DisplayListRendering, DrawCircle)
 
 flutter::testing::TEST_F (DisplayListRendering, DrawRRect)
 
 flutter::testing::TEST_F (DisplayListRendering, DrawDRRect)
 
 flutter::testing::TEST_F (DisplayListRendering, DrawPath)
 
 flutter::testing::TEST_F (DisplayListRendering, DrawArc)
 
 flutter::testing::TEST_F (DisplayListRendering, DrawArcCenter)
 
 flutter::testing::TEST_F (DisplayListRendering, DrawPointsAsPoints)
 
 flutter::testing::TEST_F (DisplayListRendering, DrawPointsAsLines)
 
 flutter::testing::TEST_F (DisplayListRendering, DrawPointsAsPolygon)
 
 flutter::testing::TEST_F (DisplayListRendering, DrawVerticesWithColors)
 
 flutter::testing::TEST_F (DisplayListRendering, DrawVerticesWithImage)
 
 flutter::testing::TEST_F (DisplayListRendering, DrawImageNearest)
 
 flutter::testing::TEST_F (DisplayListRendering, DrawImageNearestNoPaint)
 
 flutter::testing::TEST_F (DisplayListRendering, DrawImageLinear)
 
 flutter::testing::TEST_F (DisplayListRendering, DrawImageRectNearest)
 
 flutter::testing::TEST_F (DisplayListRendering, DrawImageRectNearestNoPaint)
 
 flutter::testing::TEST_F (DisplayListRendering, DrawImageRectLinear)
 
 flutter::testing::TEST_F (DisplayListRendering, DrawImageNineNearest)
 
 flutter::testing::TEST_F (DisplayListRendering, DrawImageNineNearestNoPaint)
 
 flutter::testing::TEST_F (DisplayListRendering, DrawImageNineLinear)
 
 flutter::testing::TEST_F (DisplayListRendering, DrawAtlasNearest)
 
 flutter::testing::TEST_F (DisplayListRendering, DrawAtlasNearestNoPaint)
 
 flutter::testing::TEST_F (DisplayListRendering, DrawAtlasLinear)
 
sk_sp< DisplayList > flutter::testing::makeTestDisplayList ()
 
 flutter::testing::TEST_F (DisplayListRendering, DrawDisplayList)
 
 flutter::testing::TEST_F (DisplayListRendering, DrawTextBlob)
 
 flutter::testing::TEST_F (DisplayListRendering, DrawShadow)
 
 flutter::testing::TEST_F (DisplayListRendering, DrawShadowTransparentOccluder)
 
 flutter::testing::TEST_F (DisplayListRendering, DrawShadowDpr)
 
 flutter::testing::TEST_F (DisplayListRendering, SaveLayerClippedContentStillFilters)
 
 flutter::testing::TEST_F (DisplayListRendering, SaveLayerConsolidation)
 
 flutter::testing::TEST_F (DisplayListRendering, MatrixColorFilterModifyTransparencyCheck)
 
 flutter::testing::TEST_F (DisplayListRendering, MatrixColorFilterOpacityCommuteCheck)
 
static std::string flutter::testing::BlendModeToString (DlBlendMode mode)
 
 flutter::testing::TEST_F (DisplayListRendering, BlendColorFilterModifyTransparencyCheck)
 
 flutter::testing::TEST_F (DisplayListRendering, BlendColorFilterOpacityCommuteCheck)
 
 flutter::testing::TEST_F (DisplayListNopTest, BlendModeAndColorViaColorFilter)
 
 flutter::testing::TEST_F (DisplayListNopTest, BlendModeAndColorByRendering)
 
 flutter::testing::TEST_F (DisplayListNopTest, BlendModeAndColorAndFiltersByRendering)
 

Variables

constexpr int flutter::testing::kTestWidth = 200
 
constexpr int flutter::testing::kTestHeight = 200
 
constexpr int flutter::testing::kRenderWidth = 100
 
constexpr int flutter::testing::kRenderHeight = 100
 
constexpr int flutter::testing::kRenderHalfWidth = 50
 
constexpr int flutter::testing::kRenderHalfHeight = 50
 
constexpr int flutter::testing::kRenderLeft = (kTestWidth - kRenderWidth) / 2
 
constexpr int flutter::testing::kRenderTop = (kTestHeight - kRenderHeight) / 2
 
constexpr int flutter::testing::kRenderRight = kRenderLeft + kRenderWidth
 
constexpr int flutter::testing::kRenderBottom = kRenderTop + kRenderHeight
 
constexpr int flutter::testing::kRenderCenterX = (kRenderLeft + kRenderRight) / 2
 
constexpr int flutter::testing::kRenderCenterY = (kRenderTop + kRenderBottom) / 2
 
constexpr SkScalar flutter::testing::kRenderRadius = std::min(kRenderWidth, kRenderHeight) / 2.0
 
constexpr SkScalar flutter::testing::kRenderCornerRadius = kRenderRadius / 5.0
 
constexpr SkPoint flutter::testing::kTestCenter = SkPoint::Make(kTestWidth / 2, kTestHeight / 2)
 
constexpr SkRect flutter::testing::kTestBounds2 = SkRect::MakeWH(kTestWidth, kTestHeight)
 
constexpr SkRect flutter::testing::kRenderBounds
 
constexpr SkScalar flutter::testing::kMiterExtremeDiamondOffsetX = kRenderHeight * 0.04
 
constexpr SkScalar flutter::testing::kMiter10DiamondOffsetX = kRenderHeight * 0.051
 
constexpr SkScalar flutter::testing::kMiter4DiamondOffsetX = kRenderHeight * 0.14
 
constexpr SkScalar flutter::testing::kMiterExtremeDiamondOffsetY = kRenderWidth * 0.04
 
constexpr SkScalar flutter::testing::kMiter10DiamondOffsetY = kRenderWidth * 0.051
 
constexpr SkScalar flutter::testing::kMiter4DiamondOffsetY = kRenderWidth * 0.14
 
constexpr SkScalar flutter::testing::kXOffset0 = kRenderCenterX + 0.5
 
constexpr SkScalar flutter::testing::kXOffsetL1 = kXOffset0 - kMiter4DiamondOffsetX
 
constexpr SkScalar flutter::testing::kXOffsetL2 = kXOffsetL1 - kMiter10DiamondOffsetX
 
constexpr SkScalar flutter::testing::kXOffsetL3 = kXOffsetL2 - kMiter10DiamondOffsetX
 
constexpr SkScalar flutter::testing::kXOffsetR1 = kXOffset0 + kMiter4DiamondOffsetX
 
constexpr SkScalar flutter::testing::kXOffsetR2 = kXOffsetR1 + kMiterExtremeDiamondOffsetX
 
constexpr SkScalar flutter::testing::kXOffsetR3 = kXOffsetR2 + kMiterExtremeDiamondOffsetX
 
constexpr SkPoint flutter::testing::kVerticalMiterDiamondPoints []
 
const int flutter::testing::kVerticalMiterDiamondPointCount
 
constexpr SkScalar flutter::testing::kYOffset0 = kRenderCenterY + 0.5
 
constexpr SkScalar flutter::testing::kYOffsetU1 = kXOffset0 - kMiter4DiamondOffsetY
 
constexpr SkScalar flutter::testing::kYOffsetU2 = kYOffsetU1 - kMiter10DiamondOffsetY
 
constexpr SkScalar flutter::testing::kYOffsetU3 = kYOffsetU2 - kMiter10DiamondOffsetY
 
constexpr SkScalar flutter::testing::kYOffsetD1 = kXOffset0 + kMiter4DiamondOffsetY
 
constexpr SkScalar flutter::testing::kYOffsetD2 = kYOffsetD1 + kMiterExtremeDiamondOffsetY
 
constexpr SkScalar flutter::testing::kYOffsetD3 = kYOffsetD2 + kMiterExtremeDiamondOffsetY
 
const SkPoint flutter::testing::kHorizontalMiterDiamondPoints []
 
const int flutter::testing::kHorizontalMiterDiamondPointCount
 
static const SkSetup flutter::testing::kEmptySkSetup = [](const SkSetupContext&) {}
 
static const SkRenderer flutter::testing::kEmptySkRenderer = [](const SkRenderContext&) {}
 
static const DlSetup flutter::testing::kEmptyDlSetup = [](const DlSetupContext&) {}
 
static const DlRenderer flutter::testing::kEmptyDlRenderer = [](const DlRenderContext&) {}
 

Macro Definition Documentation

◆ FOR_EACH_BLEND_MODE_ENUM

#define FOR_EACH_BLEND_MODE_ENUM (   FUNC)
Value:
FUNC(kClear) \
FUNC(kSrc) \
FUNC(kDst) \
FUNC(kSrcOver) \
FUNC(kDstOver) \
FUNC(kSrcIn) \
FUNC(kDstIn) \
FUNC(kSrcOut) \
FUNC(kDstOut) \
FUNC(kSrcATop) \
FUNC(kDstATop) \
FUNC(kXor) \
FUNC(kPlus) \
FUNC(kModulate) \
FUNC(kScreen) \
FUNC(kOverlay) \
FUNC(kDarken) \
FUNC(kLighten) \
FUNC(kColorDodge) \
FUNC(kColorBurn) \
FUNC(kHardLight) \
FUNC(kSoftLight) \
FUNC(kDifference) \
FUNC(kExclusion) \
FUNC(kMultiply) \
FUNC(kHue) \
FUNC(kSaturation) \
FUNC(kColor) \
FUNC(kLuminosity)
static constexpr SkColor kColor
Definition: CanvasTest.cpp:265

Definition at line 4177 of file dl_rendering_unittests.cc.

◆ MODE_CASE

#define MODE_CASE (   m)

◆ TEST_MODE [1/5]

#define TEST_MODE (   V)    test_mode(DlBlendMode::V);

◆ TEST_MODE [2/5]

#define TEST_MODE (   V)    test_mode(DlBlendMode::V);

◆ TEST_MODE [3/5]

#define TEST_MODE (   V)    test_mode_filter(DlBlendMode::V);

◆ TEST_MODE [4/5]

#define TEST_MODE (   V)    test_mode_render(DlBlendMode::V);

◆ TEST_MODE [5/5]

#define TEST_MODE (   V)    test_mode_render(DlBlendMode::V);