Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
aiks_playground_inspector.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_IMPELLER_AIKS_AIKS_PLAYGROUND_INSPECTOR_H_
6#define FLUTTER_IMPELLER_AIKS_AIKS_PLAYGROUND_INSPECTOR_H_
7
8#include <functional>
9#include <optional>
10
11#include "flutter/fml/macros.h"
16
17namespace impeller {
18
20 public:
22
23 const std::optional<Picture>& RenderInspector(
24 AiksContext& aiks_context,
25 const std::function<std::optional<Picture>()>& picture_callback);
26
27 // Resets (releases) the underlying |Picture| object.
28 //
29 // Underlying issue: <https://github.com/flutter/flutter/issues/134678>.
30 //
31 // The tear-down code is not running in the right order; we still have a
32 // reference to the |Picture| object when the |Context| is being destroyed,
33 // which causes the |Texture| objects to leak.
34 //
35 // TODO(matanlurey): https://github.com/flutter/flutter/issues/134748.
37
38 private:
39 void RenderCapture(CaptureContext& capture_context);
40 void RenderCaptureElement(CaptureElement& element);
41
42 bool capturing_ = false;
43 bool wireframe_ = false;
44 CaptureElement* hovered_element_ = nullptr;
45 CaptureElement* selected_element_ = nullptr;
46 std::optional<Picture> last_picture_;
47
48 AiksInspector(const AiksInspector&) = delete;
49
50 AiksInspector& operator=(const AiksInspector&) = delete;
51};
52
53}; // namespace impeller
54
55#endif // FLUTTER_IMPELLER_AIKS_AIKS_PLAYGROUND_INSPECTOR_H_
const std::optional< Picture > & RenderInspector(AiksContext &aiks_context, const std::function< std::optional< Picture >()> &picture_callback)