Flutter Engine
physical_shape_layer.h
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 #ifndef FLUTTER_FLOW_LAYERS_PHYSICAL_SHAPE_LAYER_H_
6 #define FLUTTER_FLOW_LAYERS_PHYSICAL_SHAPE_LAYER_H_
7 
8 #include "flutter/flow/layers/container_layer.h"
9 
10 namespace flutter {
11 
13  public:
14  PhysicalShapeLayer(SkColor color,
15  SkColor shadow_color,
16  float elevation,
17  const SkPath& path,
18  Clip clip_behavior);
19 
20  void Diff(DiffContext* context, const Layer* old_layer) override;
21 
22  void Preroll(PrerollContext* context, const SkMatrix& matrix) override;
23 
24  void Paint(PaintContext& context) const override;
25 
26  bool UsesSaveLayer() const {
27  return clip_behavior_ == Clip::antiAliasWithSaveLayer;
28  }
29 
30  float elevation() const { return elevation_; }
31 
32  private:
33  SkColor color_;
34  SkColor shadow_color_;
35  float elevation_ = 0.0f;
36  SkPath path_;
37  Clip clip_behavior_;
38 };
39 
40 } // namespace flutter
41 
42 #endif // FLUTTER_FLOW_LAYERS_PHYSICAL_SHAPE_LAYER_H_
void Diff(DiffContext *context, const Layer *old_layer) override
void Preroll(PrerollContext *context, const SkMatrix &matrix) override
void Paint(PaintContext &context) const override
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
Definition: switches.h:57
Clip
Definition: layer.h:41
PhysicalShapeLayer(SkColor color, SkColor shadow_color, float elevation, const SkPath &path, Clip clip_behavior)