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>
7#include "gtest/gtest.h"
11
12namespace impeller {
13namespace testing {
14
15TEST(FilterInputTest, CanSetLocalTransformForTexture) {
16 std::shared_ptr<Texture> texture = nullptr;
17 auto input =
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
void SetTransform(const Matrix &transform)
Set the global transform matrix for this Entity.
Definition entity.cc:60
static FilterInput::Ref Make(Variant input, bool msaa_enabled=true)
static int input(yyscan_t yyscanner)
#define ASSERT_MATRIX_NEAR(a, b)
FlTexture * texture
TEST(FrameTimingsRecorderTest, RecordVsync)
static constexpr Matrix MakeTranslation(const Vector3 &t)
Definition matrix.h:95