opacity_layer.h 777 字节
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_OPACITY_LAYER_H_
#define FLUTTER_FLOW_LAYERS_OPACITY_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 OpacityLayer : public ContainerLayer {
 public:
  OpacityLayer();
  ~OpacityLayer() override;

  void set_alpha(int alpha) { alpha_ = alpha; }

19
  void Paint(PaintContext& context) override;
20

21 22
  // TODO(chinmaygarde): Once MZ-139 is addressed, introduce a new node in the
  // session scene hierarchy.
23

24 25 26
 private:
  int alpha_;

A
Adam Barth 已提交
27
  FTL_DISALLOW_COPY_AND_ASSIGN(OpacityLayer);
28 29
};

A
Adam Barth 已提交
30
}  // namespace flow
31

32
#endif  // FLUTTER_FLOW_LAYERS_OPACITY_LAYER_H_