| Flutter Impeller |

aiks_playground.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_H_
6 #define FLUTTER_IMPELLER_AIKS_AIKS_PLAYGROUND_H_
7
8 #include "flutter/fml/macros.h"
9 #include "impeller/aiks/aiks_context.h"
10 #include "impeller/aiks/aiks_playground_inspector.h"
11 #include "impeller/aiks/picture.h"
12 #include "impeller/playground/playground_test.h"
13 #include "impeller/typographer/typographer_context.h"
14 #include "third_party/imgui/imgui.h"
15
16 namespace impeller {
17
18 class AiksPlayground : public PlaygroundTest {
19 public:
20 using AiksPlaygroundCallback =
21 std::function<std::optional<Picture>(AiksContext& renderer)>;
22
23 AiksPlayground();
24
25 ~AiksPlayground();
26
27 void TearDown() override;
28
29 void SetTypographerContext(
30 std::shared_ptr<TypographerContext> typographer_context);
31
32 bool OpenPlaygroundHere(Picture picture);
33
34 bool OpenPlaygroundHere(AiksPlaygroundCallback callback);
35
36 static bool ImGuiBegin(const char* name,
37 bool* p_open,
38 ImGuiWindowFlags flags);
39
40 private:
41 std::shared_ptr<TypographerContext> typographer_context_;
42 AiksInspector inspector_;
43
44 AiksPlayground(const AiksPlayground&) = delete;
45
46 AiksPlayground& operator=(const AiksPlayground&) = delete;
47 };
48
49 } // namespace impeller
50
51 #endif // FLUTTER_IMPELLER_AIKS_AIKS_PLAYGROUND_H_
impeller::AiksPlayground
Definition: aiks_playground.h:18
aiks_playground_inspector.h
impeller::AiksContext
Definition: aiks_context.h:20
aiks_context.h
typographer_context.h
impeller::AiksPlayground::AiksPlayground
AiksPlayground()
Definition: aiks_playground.cc:15
picture.h
impeller::AiksPlayground::SetTypographerContext
void SetTypographerContext(std::shared_ptr< TypographerContext > typographer_context)
Definition: aiks_playground.cc:20
impeller::AiksInspector
Definition: aiks_playground_inspector.h:19
impeller::AiksPlayground::TearDown
void TearDown() override
Definition: aiks_playground.cc:25
impeller::Picture
Definition: picture.h:20
impeller::AiksPlayground::AiksPlaygroundCallback
std::function< std::optional< Picture >(AiksContext &renderer)> AiksPlaygroundCallback
Definition: aiks_playground.h:21
impeller::AiksPlayground::OpenPlaygroundHere
bool OpenPlaygroundHere(Picture picture)
Definition: aiks_playground.cc:30
impeller::AiksPlayground::ImGuiBegin
static bool ImGuiBegin(const char *name, bool *p_open, ImGuiWindowFlags flags)
Definition: aiks_playground.cc:59
impeller::PlaygroundTest
Definition: playground_test.h:23
impeller::AiksPlayground::~AiksPlayground
~AiksPlayground()
impeller
Definition: aiks_blur_unittests.cc:20
playground_test.h