transform_layer.h 906 字节
Newer Older
1 2 3 4
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

5 6
#ifndef FLUTTER_FLOW_LAYERS_TRANSFORM_LAYER_H_
#define FLUTTER_FLOW_LAYERS_TRANSFORM_LAYER_H_
7

8
#include "flutter/flow/layers/container_layer.h"
9

A
Adam Barth 已提交
10
namespace flow {
11 12 13 14 15 16 17 18

class TransformLayer : public ContainerLayer {
 public:
  TransformLayer();
  ~TransformLayer() override;

  void set_transform(const SkMatrix& transform) { transform_ = transform; }

19
  void Preroll(PrerollContext* context, const SkMatrix& matrix) override;
20
  void Paint(PaintContext& context) override;
21

22
#if defined(OS_FUCHSIA)
23
  void UpdateScene(SceneUpdateContext& context) override;
24 25
#endif  // defined(OS_FUCHSIA)

26 27 28
 private:
  SkMatrix transform_;

A
Adam Barth 已提交
29
  FTL_DISALLOW_COPY_AND_ASSIGN(TransformLayer);
30 31
};

A
Adam Barth 已提交
32
}  // namespace flow
33

34
#endif  // FLUTTER_FLOW_LAYERS_TRANSFORM_LAYER_H_