• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_PERFORMANCE_OVERLAY_LAYER_H_
6 #define FLUTTER_FLOW_LAYERS_PERFORMANCE_OVERLAY_LAYER_H_
7 
8 #include <string>
9 
10 #include "flutter/flow/layers/layer.h"
11 #include "flutter/fml/macros.h"
12 
13 namespace flutter {
14 
15 const int kDisplayRasterizerStatistics = 1 << 0;
16 const int kVisualizeRasterizerStatistics = 1 << 1;
17 const int kDisplayEngineStatistics = 1 << 2;
18 const int kVisualizeEngineStatistics = 1 << 3;
19 
20 class PerformanceOverlayLayer : public Layer {
21  public:
22   explicit PerformanceOverlayLayer(uint64_t options,
23                                    const char* font_path = nullptr);
24 
25   void Paint(PaintContext& context) const override;
26 
27  private:
28   int options_;
29   std::string font_path_;
30 
31   FML_DISALLOW_COPY_AND_ASSIGN(PerformanceOverlayLayer);
32 };
33 
34 }  // namespace flutter
35 
36 #endif  // FLUTTER_FLOW_LAYERS_PERFORMANCE_OVERLAY_LAYER_H_
37