Flutter Impeller
local_matrix_filter_contents.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 
6 
7 namespace impeller {
8 
10 
12 
14  matrix_ = matrix;
15 }
16 
18  const Matrix& parent_transform) const {
19  return matrix_;
20 }
21 
22 std::optional<Entity> LocalMatrixFilterContents::RenderFilter(
23  const FilterInput::Vector& inputs,
24  const ContentContext& renderer,
25  const Entity& entity,
26  const Matrix& effect_transform,
27  const Rect& coverage,
28  const std::optional<Rect>& coverage_hint) const {
29  return Entity::FromSnapshot(
30  inputs[0]->GetSnapshot("LocalMatrix", renderer, entity),
31  entity.GetBlendMode(), entity.GetStencilDepth());
32 }
33 
34 } // namespace impeller
impeller::Entity::GetStencilDepth
uint32_t GetStencilDepth() const
Definition: entity.cc:89
impeller::Entity::FromSnapshot
static std::optional< Entity > FromSnapshot(const std::optional< Snapshot > &snapshot, BlendMode blend_mode=BlendMode::kSourceOver, uint32_t stencil_depth=0)
Create an entity that can be used to render a given snapshot.
Definition: entity.cc:21
impeller::LocalMatrixFilterContents::LocalMatrixFilterContents
LocalMatrixFilterContents()
local_matrix_filter_contents.h
impeller::Entity
Definition: entity.h:21
impeller::LocalMatrixFilterContents::GetLocalTransform
Matrix GetLocalTransform(const Matrix &parent_transform) const override
Definition: local_matrix_filter_contents.cc:17
impeller::Entity::GetBlendMode
BlendMode GetBlendMode() const
Definition: entity.cc:101
impeller::LocalMatrixFilterContents::SetMatrix
void SetMatrix(Matrix matrix)
Definition: local_matrix_filter_contents.cc:13
impeller::LocalMatrixFilterContents::~LocalMatrixFilterContents
~LocalMatrixFilterContents() override
impeller::FilterInput::Vector
std::vector< FilterInput::Ref > Vector
Definition: filter_input.h:32
impeller
Definition: aiks_context.cc:10
impeller::ContentContext
Definition: content_context.h:344
impeller::TRect
Definition: rect.h:20
impeller::Matrix
A 4x4 matrix using column-major storage.
Definition: matrix.h:36