Flutter Engine
The Flutter Engine
Namespaces | Macros | Functions
aiks_gradient_unittests.cc File Reference
#include "flutter/impeller/aiks/aiks_unittests.h"
#include "impeller/aiks/canvas.h"
#include "impeller/entity/contents/conical_gradient_contents.h"
#include "impeller/entity/contents/linear_gradient_contents.h"
#include "impeller/entity/contents/radial_gradient_contents.h"
#include "impeller/entity/contents/sweep_gradient_contents.h"
#include "impeller/geometry/geometry_asserts.h"
#include "impeller/geometry/path_builder.h"
#include "impeller/playground/widgets.h"
#include "third_party/imgui/imgui.h"

Go to the source code of this file.

Namespaces

namespace  impeller
 
namespace  impeller::testing
 

Macros

#define APPLY_COLOR_FILTER_GRADIENT_TEST(name)
 

Functions

 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)
 

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); \
}
DlColor color
GAsyncResult * result
SK_API sk_sp< SkShader > Color(SkColor)
DEF_SWITCHES_START aot vmservice shared library name
Definition: switches.h:32
AiksPlayground AiksTest
TEST_P(AiksTest, CanRenderAdvancedBlendColorFilterWithSaveLayer)

Definition at line 25 of file aiks_gradient_unittests.cc.