Flutter Engine
Loading...
Searching...
No Matches
filter_input_unittests.cc
Go to the documentation of this file.
1
// Copyright 2013 The Flutter Authors. All rights reserved.
2
// Use of this source code is governed by a BSD-style license that can be
3
// found in the LICENSE file.
4
5
#include <memory>
6
#include "
flutter/testing/testing.h
"
7
#include "gtest/gtest.h"
8
#include "
impeller/entity/contents/filters/inputs/filter_input.h
"
9
#include "
impeller/entity/entity.h
"
10
#include "
impeller/geometry/geometry_asserts.h
"
11
12
namespace
impeller
{
13
namespace
testing {
14
15
TEST
(FilterInputTest, CanSetLocalTransformForTexture) {
16
std::shared_ptr<Texture>
texture
=
nullptr
;
17
auto
input
=
18
FilterInput::Make
(
texture
,
Matrix::MakeTranslation
({1.0, 0.0, 0.0}));
19
Entity
e;
20
e.
SetTransform
(
Matrix::MakeTranslation
({0.0, 2.0, 0.0}));
21
22
ASSERT_MATRIX_NEAR
(
input
->GetLocalTransform(e),
23
Matrix::MakeTranslation
({1.0, 0.0, 0.0}));
24
ASSERT_MATRIX_NEAR
(
input
->GetTransform(e),
25
Matrix::MakeTranslation
({1.0, 2.0, 0.0}));
26
}
27
28
}
// namespace testing
29
}
// namespace impeller
impeller::Entity
Definition
entity.h:26
impeller::Entity::SetTransform
void SetTransform(const Matrix &transform)
Set the global transform matrix for this Entity.
Definition
entity.cc:60
impeller::FilterInput::Make
static FilterInput::Ref Make(Variant input, bool msaa_enabled=true)
Definition
filter_input.cc:19
input
static int input(yyscan_t yyscanner)
entity.h
filter_input.h
geometry_asserts.h
ASSERT_MATRIX_NEAR
#define ASSERT_MATRIX_NEAR(a, b)
Definition
geometry_asserts.h:189
texture
FlTexture * texture
Definition
mock_texture_registrar.cc:24
flutter::TEST
TEST(FrameTimingsRecorderTest, RecordVsync)
Definition
frame_timings_recorder_unittests.cc:22
impeller
Definition
texture.h:16
impeller::Matrix::MakeTranslation
static constexpr Matrix MakeTranslation(const Vector3 &t)
Definition
matrix.h:95
testing.h
impeller
entity
contents
filters
inputs
filter_input_unittests.cc
Generated on Thu Nov 6 2025 16:11:22 for Flutter Engine by
1.9.8