Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Classes | Namespaces | Macros | Functions
aiks_blend_unittests.cc File Reference
#include "flutter/impeller/aiks/aiks_unittests.h"
#include "flutter/testing/testing.h"
#include "impeller/aiks/canvas.h"
#include "impeller/aiks/color_filter.h"
#include "impeller/geometry/color.h"
#include "impeller/geometry/scalar.h"

Go to the source code of this file.

Classes

struct  impeller::testing::BlendModeSelection
 

Namespaces

namespace  impeller
 
namespace  impeller::testing
 

Macros

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

Functions

 impeller::testing::TEST_P (AiksTest, CanRenderAdvancedBlendColorFilterWithSaveLayer)
 
 impeller::testing::TEST_P (AiksTest, BlendModeShouldCoverWholeScreen)
 
 impeller::testing::TEST_P (AiksTest, CanDrawPaintWithAdvancedBlend)
 
 impeller::testing::TEST_P (AiksTest, DrawPaintWithAdvancedBlendOverFilter)
 
 impeller::testing::TEST_P (AiksTest, DrawAdvancedBlendPartlyOffscreen)
 
 impeller::testing::TEST_P (AiksTest, PaintBlendModeIsRespected)
 
 impeller::testing::TEST_P (AiksTest, BlendModePlusAlphaWideGamut)
 
 impeller::testing::TEST_P (AiksTest, BlendModePlusAlphaColorFilterWideGamut)
 
static BlendModeSelection impeller::testing::GetBlendModeSelection ()
 
 impeller::testing::TEST_P (AiksTest, ColorWheel)
 
 impeller::testing::TEST_P (AiksTest, ForegroundBlendSubpassCollapseOptimization)
 
 impeller::testing::TEST_P (AiksTest, ClearBlend)
 
static Picture impeller::testing::BlendModeTest (Vector2 content_scale, BlendMode blend_mode, const std::shared_ptr< Image > &src_image, const std::shared_ptr< Image > &dst_image, Scalar src_alpha)
 
 impeller::testing::TEST_P (AiksTest, CanDrawPaintMultipleTimesInteractive)
 
 impeller::testing::TEST_P (AiksTest, ForegroundPipelineBlendAppliesTransformCorrectly)
 
 impeller::testing::TEST_P (AiksTest, ForegroundAdvancedBlendAppliesTransformCorrectly)
 

Macro Definition Documentation

◆ BLEND_MODE_SRC_ALPHA_TEST

#define BLEND_MODE_SRC_ALPHA_TEST (   blend_mode)
Value:
TEST_P(AiksTest, BlendModeSrcAlpha##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")); \
auto callback = [&](AiksContext& renderer) -> std::optional<Picture> { \
return BlendModeTest(GetContentScale(), BlendMode::k##blend_mode, \
src_image, dst_image, /*src_alpha=*/0.5); \
}; \
OpenPlaygroundHere(callback); \
}
FlKeyEvent uint64_t FlKeyResponderAsyncCallback callback

Definition at line 510 of file aiks_blend_unittests.cc.

511 { \
512 auto src_image = std::make_shared<Image>( \
513 CreateTextureForFixture("blend_mode_src.png")); \
514 auto dst_image = std::make_shared<Image>( \
515 CreateTextureForFixture("blend_mode_dst.png")); \
516 auto callback = [&](AiksContext& renderer) -> std::optional<Picture> { \
517 return BlendModeTest(GetContentScale(), BlendMode::k##blend_mode, \
518 src_image, dst_image, /*src_alpha=*/0.5); \
519 }; \
520 OpenPlaygroundHere(callback); \
521 }
static Picture BlendModeTest(Vector2 content_scale, BlendMode blend_mode, const std::shared_ptr< Image > &src_image, const std::shared_ptr< Image > &dst_image, Scalar src_alpha)

◆ 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")); \
auto callback = [&](AiksContext& renderer) -> std::optional<Picture> { \
return BlendModeTest(GetContentScale(), BlendMode::k##blend_mode, \
src_image, dst_image, /*src_alpha=*/1.0); \
}; \
OpenPlaygroundHere(callback); \
}

Definition at line 496 of file aiks_blend_unittests.cc.

497 { \
498 auto src_image = std::make_shared<Image>( \
499 CreateTextureForFixture("blend_mode_src.png")); \
500 auto dst_image = std::make_shared<Image>( \
501 CreateTextureForFixture("blend_mode_dst.png")); \
502 auto callback = [&](AiksContext& renderer) -> std::optional<Picture> { \
503 return BlendModeTest(GetContentScale(), BlendMode::k##blend_mode, \
504 src_image, dst_image, /*src_alpha=*/1.0); \
505 }; \
506 OpenPlaygroundHere(callback); \
507 }

◆ BLEND_MODE_TUPLE

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

Definition at line 181 of file aiks_blend_unittests.cc.