5#include "flutter/testing/testing.h"
6#include "gmock/gmock.h"
18 std::shared_ptr<CommandBuffer> command_buffer =
20 if (!command_buffer) {
25 "Clear Subpass",
size, command_buffer,
31 ->Submit({command_buffer})
36 if (render_target.ok()) {
37 return render_target.value().GetRenderTargetTexture();
94void expectRenderCoverageEqual(
const std::optional<Entity>&
result,
95 const std::optional<Rect> contents_coverage,
96 const Rect& expected) {
100 std::optional<Rect> result_coverage =
result.value().GetCoverage();
103 if (result_coverage.has_value() && contents_coverage.has_value()) {
112 std::shared_ptr<Texture>
texture = MakeTexture(
ISize(100, 100));
119 std::shared_ptr<ContentContext>
renderer = GetContentContext();
120 std::optional<Entity>
result =
127 std::shared_ptr<Texture>
texture = MakeTexture(
ISize(100, 100));
136 std::shared_ptr<ContentContext>
renderer = GetContentContext();
137 std::optional<Entity>
result =
144 RenderCoverageMatchesGetCoverageClippedSubpassTranslate) {
145 std::shared_ptr<Texture>
texture = MakeTexture(
ISize(100, 100));
156 std::shared_ptr<ContentContext>
renderer = GetContentContext();
157 std::optional<Entity>
result =
164 std::shared_ptr<Texture>
texture = MakeTexture(
ISize(100, 100));
173 std::shared_ptr<ContentContext>
renderer = GetContentContext();
174 std::optional<Entity>
result =
181 RenderCoverageMatchesGetCoverageClippedSubpassScale) {
182 std::shared_ptr<Texture>
texture = MakeTexture(
ISize(100, 100));
193 std::shared_ptr<ContentContext>
renderer = GetContentContext();
194 std::optional<Entity>
result =
201 std::shared_ptr<Texture>
texture = MakeTexture(
ISize(100, 100));
212 std::shared_ptr<ContentContext>
renderer = GetContentContext();
213 std::optional<Entity>
result =
static sk_sp< Effect > Create()
static bool ok(int result)
std::shared_ptr< ContentContext > GetContentContext() const
void SetTransform(const Matrix &transform)
Set the global transform matrix for this Entity.
@ kSubpassPrependSnapshotTransform
@ kSubpassAppendSnapshotTransform
std::optional< Entity > GetEntity(const ContentContext &renderer, const Entity &entity, const std::optional< Rect > &coverage_hint) const
Create an Entity that renders this filter's output.
std::optional< Rect > GetCoverage(const Entity &entity) const override
Get the area of the render pass that will be affected when this contents is rendered.
void SetInputs(FilterInput::Vector inputs)
The input texture sources for this filter. Each input's emitted texture is expected to have premultip...
void SetEffectTransform(const Matrix &effect_transform)
Sets the transform which gets appended to the effect of this filter. Note that this is in addition to...
std::optional< Rect > GetFilterCoverage(const FilterInput::Vector &inputs, const Entity &entity, const Matrix &effect_transform) const override
Internal utility method for |GetLocalCoverage| that computes the output coverage of this filter acros...
void SetMatrix(Matrix matrix)
void SetRenderingMode(Entity::RenderingMode rendering_mode) override
Marks this filter chain as applying in a subpass scenario.
bool IsTranslationOnly() const override
Returns true if this filter graph doesn't perform any basis transforms to the filtered content....
std::shared_ptr< Context > GetContext() const
Render passes encode render commands directed as one specific render target into an underlying comman...
std::shared_ptr< Texture > MakeTexture(ISize size)
Create a texture that has been cleared to transparent black.
inline ::testing::AssertionResult RectNear(impeller::Rect a, impeller::Rect b)
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
TEST(AiksCanvasTest, EmptyCullRect)
INSTANTIATE_PLAYGROUND_SUITE(AiksTest)
TEST_P(AiksTest, CanRenderAdvancedBlendColorFilterWithSaveLayer)
SK_API sk_sp< PrecompileColorFilter > Matrix()
static constexpr Matrix MakeTranslation(const Vector3 &t)
static constexpr Matrix MakeScale(const Vector3 &s)
static constexpr TRect MakeXYWH(Type x, Type y, Type width, Type height)
static constexpr TRect MakeLTRB(Type left, Type top, Type right, Type bottom)
#define EXPECT_TRUE(handle)