| Flutter Impeller |

Classes | Namespaces | Macros | Typedefs | Functions
aiks_unittests.cc File Reference
`#include <array>`
`#include <cmath>`
`#include <cstdlib>`
`#include <memory>`
`#include <tuple>`
`#include <utility>`
`#include <vector>`
`#include "flutter/testing/testing.h"`
`#include "impeller/aiks/aiks_playground.h"`
`#include "impeller/aiks/canvas.h"`
`#include "impeller/aiks/image.h"`
`#include "impeller/aiks/image_filter.h"`
`#include "impeller/aiks/paint_pass_delegate.h"`
`#include "impeller/aiks/testing/context_spy.h"`
`#include "impeller/core/capture.h"`
`#include "impeller/entity/contents/color_source_contents.h"`
`#include "impeller/entity/contents/conical_gradient_contents.h"`
`#include "impeller/entity/contents/filters/inputs/filter_input.h"`
`#include "impeller/entity/contents/linear_gradient_contents.h"`
`#include "impeller/entity/contents/solid_color_contents.h"`
`#include "impeller/entity/contents/tiled_texture_contents.h"`
`#include "impeller/geometry/color.h"`
`#include "impeller/geometry/constants.h"`
`#include "impeller/geometry/geometry_asserts.h"`
`#include "impeller/geometry/matrix.h"`
`#include "impeller/geometry/path_builder.h"`
`#include "impeller/golden_tests/golden_playground_test.h"`
`#include "impeller/playground/widgets.h"`
`#include "impeller/renderer/command_buffer.h"`
`#include "impeller/renderer/snapshot.h"`
`#include "impeller/scene/material.h"`
`#include "impeller/scene/node.h"`
`#include "impeller/typographer/backends/skia/text_frame_skia.h"`
`#include "impeller/typographer/backends/skia/typographer_context_skia.h"`
`#include "impeller/typographer/backends/stb/text_frame_stb.h"`
`#include "impeller/typographer/backends/stb/typeface_stb.h"`
`#include "impeller/typographer/backends/stb/typographer_context_stb.h"`
`#include "third_party/imgui/imgui.h"`
`#include "third_party/skia/include/core/SkData.h"`

Go to the source code of this file.

## Classes
struct | impeller::testing::TextRenderOptions
struct | impeller::testing::BlendModeSelection

## Namespaces
| impeller
| impeller::testing

## Macros
#define | BLEND_MODE_TUPLE(blend_mode) {#blend_mode, BlendMode::k##blend_mode},
#define | BLEND_MODE_TEST(blend_mode)
#define | APPLY_COLOR_FILTER_GRADIENT_TEST(name)

## Typedefs
using | impeller::testing::AiksTest = AiksPlayground

## Functions
| impeller::testing::INSTANTIATE_PLAYGROUND_SUITE (AiksTest)
| impeller::testing::TEST_P (AiksTest, RotateColorFilteredPath)
| impeller::testing::TEST_P (AiksTest, CanvasCTMCanBeUpdated)
| impeller::testing::TEST_P (AiksTest, CanvasCanPushPopCTM)
| impeller::testing::TEST_P (AiksTest, CanRenderColoredRect)
| impeller::testing::TEST_P (AiksTest, CanRenderImage)
| impeller::testing::TEST_P (AiksTest, CanRenderInvertedImage)
| impeller::testing::TEST_P (AiksTest, CanRenderTiledTextureClamp)
| impeller::testing::TEST_P (AiksTest, CanRenderTiledTextureRepeat)
| impeller::testing::TEST_P (AiksTest, CanRenderTiledTextureMirror)
| impeller::testing::TEST_P (AiksTest, CanRenderTiledTextureDecal)
| impeller::testing::TEST_P (AiksTest, CanRenderTiledTextureClampWithTranslate)
| impeller::testing::TEST_P (AiksTest, CanRenderImageRect)
| impeller::testing::TEST_P (AiksTest, CanRenderStrokes)
| impeller::testing::TEST_P (AiksTest, CanRenderCurvedStrokes)
| impeller::testing::TEST_P (AiksTest, CanRenderClips)
| impeller::testing::TEST_P (AiksTest, CanRenderNestedClips)
| impeller::testing::TEST_P (AiksTest, CanRenderDifferenceClips)
| impeller::testing::TEST_P (AiksTest, CanRenderWithContiguousClipRestores)
| impeller::testing::TEST_P (AiksTest, ClipsUseCurrentTransform)
| impeller::testing::TEST_P (AiksTest, CanSaveLayerStandalone)
| impeller::testing::TEST_P (AiksTest, CanRenderLinearGradientClamp)
| impeller::testing::TEST_P (AiksTest, CanRenderLinearGradientRepeat)
| impeller::testing::TEST_P (AiksTest, CanRenderLinearGradientMirror)
| impeller::testing::TEST_P (AiksTest, CanRenderLinearGradientDecal)
| impeller::testing::TEST_P (AiksTest, CanRenderLinearGradientDecalWithColorFilter)
static void | impeller::testing::CanRenderLinearGradientWithDithering (AiksTest *aiks_test, bool use_dithering)
| impeller::testing::TEST_P (AiksTest, CanRenderLinearGradientWithDitheringDisabled)
| impeller::testing::TEST_P (AiksTest, CanRenderLinearGradientWithDitheringEnabled)
static void | impeller::testing::CanRenderRadialGradientWithDithering (AiksTest *aiks_test, bool use_dithering)
| impeller::testing::TEST_P (AiksTest, CanRenderRadialGradientWithDitheringDisabled)
| impeller::testing::TEST_P (AiksTest, CanRenderRadialGradientWithDitheringEnabled)
static void | impeller::testing::CanRenderSweepGradientWithDithering (AiksTest *aiks_test, bool use_dithering)
| impeller::testing::TEST_P (AiksTest, CanRenderSweepGradientWithDitheringDisabled)
| impeller::testing::TEST_P (AiksTest, CanRenderSweepGradientWithDitheringEnabled)
static void | impeller::testing::CanRenderConicalGradientWithDithering (AiksTest *aiks_test, bool use_dithering)
| impeller::testing::TEST_P (AiksTest, CanRenderConicalGradientWithDitheringDisabled)
| impeller::testing::TEST_P (AiksTest, CanRenderConicalGradientWithDitheringEnabled)
| impeller::testing::TEST_P (AiksTest, CanRenderLinearGradientWithOverlappingStopsClamp)
| impeller::testing::TEST_P (AiksTest, CanRenderLinearGradientManyColorsClamp)
| impeller::testing::TEST_P (AiksTest, CanRenderLinearGradientManyColorsRepeat)
| impeller::testing::TEST_P (AiksTest, CanRenderLinearGradientManyColorsMirror)
| impeller::testing::TEST_P (AiksTest, CanRenderLinearGradientManyColorsDecal)
| impeller::testing::TEST_P (AiksTest, CanRenderLinearGradientWayManyColorsClamp)
| impeller::testing::TEST_P (AiksTest, CanRenderLinearGradientManyColorsUnevenStops)
| impeller::testing::TEST_P (AiksTest, CanRenderLinearGradientMaskBlur)
| impeller::testing::TEST_P (AiksTest, CanRenderRadialGradient)
| impeller::testing::TEST_P (AiksTest, CanRenderRadialGradientManyColors)
| impeller::testing::TEST_P (AiksTest, CanRenderSweepGradientClamp)
| impeller::testing::TEST_P (AiksTest, CanRenderSweepGradientRepeat)
| impeller::testing::TEST_P (AiksTest, CanRenderSweepGradientMirror)
| impeller::testing::TEST_P (AiksTest, CanRenderSweepGradientDecal)
| impeller::testing::TEST_P (AiksTest, CanRenderSweepGradientManyColorsClamp)
| impeller::testing::TEST_P (AiksTest, CanRenderSweepGradientManyColorsRepeat)
| impeller::testing::TEST_P (AiksTest, CanRenderSweepGradientManyColorsMirror)
| impeller::testing::TEST_P (AiksTest, CanRenderSweepGradientManyColorsDecal)
| impeller::testing::TEST_P (AiksTest, CanRenderConicalGradient)
| impeller::testing::TEST_P (AiksTest, CanRenderGradientDecalWithBackground)
| impeller::testing::TEST_P (AiksTest, CanRenderDifferentShapesWithSameColorSource)
| impeller::testing::TEST_P (AiksTest, CanPictureConvertToImage)
| impeller::testing::TEST_P (AiksTest, BlendModeShouldCoverWholeScreen)
| impeller::testing::TEST_P (AiksTest, CanRenderGroupOpacity)
| impeller::testing::TEST_P (AiksTest, CoordinateConversionsAreCorrect)
| impeller::testing::TEST_P (AiksTest, CanPerformFullScreenMSAA)
| impeller::testing::TEST_P (AiksTest, CanPerformSkew)
| impeller::testing::TEST_P (AiksTest, CanPerformSaveLayerWithBounds)
| impeller::testing::TEST_P (AiksTest, CanPerformSaveLayerWithBoundsAndLargerIntermediateIsNotAllocated)
| impeller::testing::TEST_P (AiksTest, CanRenderRoundedRectWithNonUniformRadii)
| impeller::testing::TEST_P (AiksTest, CanRenderDifferencePaths)
| impeller::testing::TEST_P (AiksTest, CanDrawAnOpenPath)
| impeller::testing::TEST_P (AiksTest, CanDrawAnOpenPathThatIsntARect)
static sk_sp< SkData > | impeller::testing::OpenFixtureAsSkData (const char *fixture_name)
bool | impeller::testing::RenderTextInCanvasSkia (const std::shared_ptr< Context > &context, Canvas &canvas, const std::string &text, const std::string &font_fixture, TextRenderOptions options={})
bool | impeller::testing::RenderTextInCanvasSTB (const std::shared_ptr< Context > &context, Canvas &canvas, const std::string &text, const std::string &font_fixture, TextRenderOptions options={})
| impeller::testing::TEST_P (AiksTest, CanRenderTextFrame)
| impeller::testing::TEST_P (AiksTest, CanRenderTextFrameSTB)
| impeller::testing::TEST_P (AiksTest, TextFrameSubpixelAlignment)
| impeller::testing::TEST_P (AiksTest, CanRenderItalicizedText)
| impeller::testing::TEST_P (AiksTest, CanRenderEmojiTextFrame)
| impeller::testing::TEST_P (AiksTest, CanRenderEmojiTextFrameWithAlpha)
| impeller::testing::TEST_P (AiksTest, CanRenderTextInSaveLayer)
| impeller::testing::TEST_P (AiksTest, CanRenderTextOutsideBoundaries)
| impeller::testing::TEST_P (AiksTest, TextRotated)
| impeller::testing::TEST_P (AiksTest, CanDrawPaint)
| impeller::testing::TEST_P (AiksTest, CanDrawPaintMultipleTimes)
| impeller::testing::TEST_P (AiksTest, CanDrawPaintWithAdvancedBlend)
| impeller::testing::TEST_P (AiksTest, DrawPaintWithAdvancedBlendOverFilter)
| impeller::testing::TEST_P (AiksTest, DrawAdvancedBlendPartlyOffscreen)
static BlendModeSelection | impeller::testing::GetBlendModeSelection ()
| impeller::testing::TEST_P (AiksTest, CanDrawPaintMultipleTimesInteractive)
| impeller::testing::TEST_P (AiksTest, PaintBlendModeIsRespected)
| impeller::testing::TEST_P (AiksTest, ColorWheel)
| impeller::testing::TEST_P (AiksTest, TransformMultipliesCorrectly)
| impeller::testing::TEST_P (AiksTest, SolidStrokesRenderCorrectly)
| impeller::testing::TEST_P (AiksTest, GradientStrokesRenderCorrectly)
| impeller::testing::TEST_P (AiksTest, CoverageOriginShouldBeAccountedForInSubpasses)
| impeller::testing::TEST_P (AiksTest, DrawRectStrokesRenderCorrectly)
| impeller::testing::TEST_P (AiksTest, SaveLayerDrawsBehindSubsequentEntities)
| impeller::testing::TEST_P (AiksTest, SiblingSaveLayerBoundsAreRespected)
| impeller::testing::TEST_P (AiksTest, CanRenderClippedLayers)
| impeller::testing::TEST_P (AiksTest, SaveLayerFiltersScaleWithTransform)
| impeller::testing::TEST_P (AiksTest, PaintWithFilters)
| impeller::testing::TEST_P (AiksTest, OpacityPeepHoleApplicationTest)
| impeller::testing::TEST_P (AiksTest, DrawPaintAbsorbsClears)
| impeller::testing::TEST_P (AiksTest, ParentSaveLayerCreatesRenderPassWhenChildBackdropFilterIsPresent)
| impeller::testing::TEST_P (AiksTest, DrawRectAbsorbsClears)
| impeller::testing::TEST_P (AiksTest, DrawRectAbsorbsClearsNegativeRRect)
| impeller::testing::TEST_P (AiksTest, DrawRectAbsorbsClearsNegativeRotation)
| impeller::testing::TEST_P (AiksTest, DrawRectAbsorbsClearsNegative)
| impeller::testing::TEST_P (AiksTest, ClipRectElidesNoOpClips)
| impeller::testing::TEST_P (AiksTest, ClearColorOptimizationDoesNotApplyForBackdropFilters)
| impeller::testing::TEST_P (AiksTest, CollapsedDrawPaintInSubpass)
| impeller::testing::TEST_P (AiksTest, CollapsedDrawPaintInSubpassBackdropFilter)
| impeller::testing::TEST_P (AiksTest, ForegroundBlendSubpassCollapseOptimization)
| impeller::testing::TEST_P (AiksTest, ColorMatrixFilterSubpassCollapseOptimization)
| impeller::testing::TEST_P (AiksTest, LinearToSrgbFilterSubpassCollapseOptimization)
| impeller::testing::TEST_P (AiksTest, SrgbToLinearFilterSubpassCollapseOptimization)
static Picture | impeller::testing::BlendModeTest (BlendMode blend_mode, const std::shared_ptr< Image > &src_image, const std::shared_ptr< Image > &dst_image)
| impeller::testing::TEST_P (AiksTest, TranslucentSaveLayerDrawsCorrectly)
| impeller::testing::TEST_P (AiksTest, TranslucentSaveLayerWithBlendColorFilterDrawsCorrectly)
| impeller::testing::TEST_P (AiksTest, TranslucentSaveLayerWithBlendImageFilterDrawsCorrectly)
| impeller::testing::TEST_P (AiksTest, TranslucentSaveLayerWithColorAndImageFilterDrawsCorrectly)
| impeller::testing::TEST_P (AiksTest, TranslucentSaveLayerImageDrawsCorrectly)
| impeller::testing::TEST_P (AiksTest, TranslucentSaveLayerWithColorMatrixColorFilterDrawsCorrectly)
| impeller::testing::TEST_P (AiksTest, TranslucentSaveLayerWithColorMatrixImageFilterDrawsCorrectly)
| impeller::testing::TEST_P (AiksTest, TranslucentSaveLayerWithColorFilterAndImageFilterDrawsCorrectly)
| impeller::testing::TEST_P (AiksTest, TranslucentSaveLayerWithAdvancedBlendModeDrawsCorrectly)
| impeller::testing::TEST_P (AiksTest, CanRenderTinyOverlappingSubpasses)
| impeller::testing::TEST_P (AiksTest, CanRenderOffscreenCheckerboard)
| impeller::testing::TEST_P (AiksTest, OpaqueEntitiesGetCoercedToSource)
| impeller::testing::TEST_P (AiksTest, CanRenderDestructiveSaveLayer)
| impeller::testing::TEST_P (AiksTest, CanRenderMaskBlurHugeSigma)
| impeller::testing::TEST_P (AiksTest, CanRenderBackdropBlurInteractive)
| impeller::testing::TEST_P (AiksTest, CanRenderBackdropBlur)
| impeller::testing::TEST_P (AiksTest, CanRenderBackdropBlurHugeSigma)
| impeller::testing::TEST_P (AiksTest, CanRenderClippedBlur)
| impeller::testing::TEST_P (AiksTest, CanRenderForegroundBlendWithMaskBlur)
| impeller::testing::TEST_P (AiksTest, CanRenderForegroundAdvancedBlendWithMaskBlur)
| impeller::testing::TEST_P (AiksTest, CanRenderClippedRuntimeEffects)
| impeller::testing::TEST_P (AiksTest, DrawPaintTransformsBounds)
| impeller::testing::TEST_P (AiksTest, CanDrawPoints)
| impeller::testing::TEST_P (AiksTest, DrawAtlasWithColorAdvancedAndTransform)
| impeller::testing::TEST_P (AiksTest, DrawAtlasAdvancedAndTransform)
| impeller::testing::TEST_P (AiksTest, CanDrawPointsWithTextureMap)
| impeller::testing::TEST_P (AiksTest, TextForegroundShaderWithTransform)
| impeller::testing::TEST_P (AiksTest, CanCanvasDrawPicture)
| impeller::testing::TEST_P (AiksTest, CanCanvasDrawPictureWithAdvancedBlend)
| impeller::testing::TEST_P (AiksTest, CanCanvasDrawPictureWithBackdropFilter)
| impeller::testing::TEST_P (AiksTest, DrawPictureWithText)
| impeller::testing::TEST_P (AiksTest, DrawPictureClipped)
| impeller::testing::TEST_P (AiksTest, MatrixSaveLayerFilter)
| impeller::testing::TEST_P (AiksTest, MatrixBackdropFilter)
| impeller::testing::TEST_P (AiksTest, SolidColorApplyColorFilter)
| impeller::testing::APPLY_COLOR_FILTER_GRADIENT_TEST (Linear)
| impeller::testing::APPLY_COLOR_FILTER_GRADIENT_TEST (Radial)
| impeller::testing::APPLY_COLOR_FILTER_GRADIENT_TEST (Conical)
| impeller::testing::APPLY_COLOR_FILTER_GRADIENT_TEST (Sweep)
| impeller::testing::TEST_P (AiksTest, DrawScaledTextWithPerspectiveNoSaveLayer)
| impeller::testing::TEST_P (AiksTest, DrawScaledTextWithPerspectiveSaveLayer)
| impeller::testing::TEST_P (AiksTest, PipelineBlendSingleParameter)
| impeller::testing::TEST_P (AiksTest, ClippedBlurFilterRendersCorrectlyInteractive)
| impeller::testing::TEST_P (AiksTest, ClippedBlurFilterRendersCorrectly)
| impeller::testing::TEST_P (AiksTest, CaptureContext)
| impeller::testing::TEST_P (AiksTest, CaptureInactivatedByDefault)
| impeller::testing::TEST_P (AiksTest, ReleasesTextureOnTeardown)
| impeller::testing::TEST_P (AiksTest, VerticesGeometryUVPositionData)
| impeller::testing::TEST_P (AiksTest, ClearBlendWithBlur)
| impeller::testing::TEST_P (AiksTest, ClearBlend)
| impeller::testing::TEST_P (AiksTest, MatrixImageFilterMagnify)
| impeller::testing::TEST_P (AiksTest, ClearColorOptimizationWhenSubpassIsBiggerThanParentPass)
| impeller::testing::TEST_P (AiksTest, MaskBlurWithZeroSigmaIsSkipped)
| impeller::testing::TEST_P (AiksTest, SubpassWithClearColorOptimization)

## Macro Definition Documentation

## ◆ APPLY_COLOR_FILTER_GRADIENT_TEST

#define APPLY_COLOR_FILTER_GRADIENT_TEST | ( |  | name | ) |

Value:
TEST_P(AiksTest, name##GradientApplyColorFilter) { \
auto contents = name##GradientContents(); \
contents.SetColors({Color::CornflowerBlue().WithAlpha(0.75)}); \
auto result = contents.ApplyColorFilter([](const Color& color) { \
return color.Blend(Color::LimeGreen().WithAlpha(0.75), \
BlendMode::kScreen); \
}); \
ASSERT_TRUE(result); \
\
std::vector<Color> expected = {Color(0.433247, 0.879523, 0.825324, 0.75)}; \
ASSERT_COLORS_NEAR(contents.GetColors(), expected); \
}

Definition at line 3364 of file aiks_unittests.cc.

## ◆ BLEND_MODE_TEST

#define BLEND_MODE_TEST | ( |  | blend_mode | ) |

Value:
TEST_P(AiksTest, BlendMode##blend_mode) { \
auto src_image = std::make_shared<Image>( \
CreateTextureForFixture("blend_mode_src.png")); \
auto dst_image = std::make_shared<Image>( \
CreateTextureForFixture("blend_mode_dst.png")); \
OpenPlaygroundHere( \
BlendModeTest(BlendMode::k##blend_mode, src_image, dst_image)); \
}

Definition at line 2604 of file aiks_unittests.cc.

## ◆ BLEND_MODE_TUPLE

#define BLEND_MODE_TUPLE | ( |  | blend_mode | ) | {#blend_mode, BlendMode::k##blend_mode},

Definition at line 1603 of file aiks_unittests.cc.

impeller::BlendMode
BlendMode
Definition: color.h:57
impeller::testing::TEST_P
TEST_P(AiksTest, SubpassWithClearColorOptimization)
Definition: aiks_unittests.cc:3647
impeller::testing::BlendModeTest
static Picture BlendModeTest(BlendMode blend_mode, const std::shared_ptr< Image > &src_image, const std::shared_ptr< Image > &dst_image)
Definition: aiks_unittests.cc:2523
impeller::testing::AiksTest
AiksPlayground AiksTest
Definition: aiks_unittests.cc:52