| Flutter Impeller |

playground_test.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_TOOLKIT_INTEROP_PLAYGROUND_TEST_H_
6 #define FLUTTER_IMPELLER_TOOLKIT_INTEROP_PLAYGROUND_TEST_H_
7
8 #include <functional>
9
10 #include "impeller/playground/playground_test.h"
11 #include "impeller/toolkit/interop/context.h"
12 #include "impeller/toolkit/interop/surface.h"
13
14 namespace impeller::interop::testing {
15
16 class PlaygroundTest : public ::impeller::PlaygroundTest {
17 public:
18 PlaygroundTest();
19
20 // |PlaygroundTest|
21 ~PlaygroundTest() override;
22
23 PlaygroundTest(const PlaygroundTest&) = delete;
24
25 PlaygroundTest& operator=(const PlaygroundTest&) = delete;
26
27 // |PlaygroundTest|
28 void SetUp() override;
29
30 // |PlaygroundTest|
31 void TearDown() override;
32
33 ScopedObject<Context> CreateContext() const;
34
35 ScopedObject<Context> GetInteropContext();
36
37 using InteropPlaygroundCallback =
38 std::function<bool(const ScopedObject<Context>& context,
39 const ScopedObject<Surface>& surface)>;
40 bool OpenPlaygroundHere(InteropPlaygroundCallback callback);
41
42 private:
43 ScopedObject<Context> interop_context_;
44 };
45
46 } // namespace impeller::interop::testing
47
48 #endif // FLUTTER_IMPELLER_TOOLKIT_INTEROP_PLAYGROUND_TEST_H_
impeller::interop::testing::PlaygroundTest::PlaygroundTest
PlaygroundTest()
Definition: playground_test.cc:15
surface.h
impeller::interop::ScopedObject
Definition: object.h:67
impeller::interop::testing::PlaygroundTest::GetInteropContext
ScopedObject< Context > GetInteropContext()
Definition: playground_test.cc:79
playground_test.h
impeller::interop::testing
Definition: impeller_unittests.cc:24
impeller::interop::testing::PlaygroundTest
Definition: playground_test.h:16
impeller::interop::testing::PlaygroundTest::TearDown
void TearDown() override
Definition: playground_test.cc:36
impeller::interop::testing::PlaygroundTest::~PlaygroundTest
~PlaygroundTest() override
impeller::interop::testing::PlaygroundTest::OpenPlaygroundHere
bool OpenPlaygroundHere(InteropPlaygroundCallback callback)
Definition: playground_test.cc:64
impeller::interop::testing::PlaygroundTest::InteropPlaygroundCallback
std::function< bool(const ScopedObject< Context > &context, const ScopedObject< Surface > &surface)> InteropPlaygroundCallback
Definition: playground_test.h:39
impeller::interop::testing::PlaygroundTest::SetUp
void SetUp() override
Definition: playground_test.cc:31
impeller::interop::testing::PlaygroundTest::CreateContext
ScopedObject< Context > CreateContext() const
Definition: playground_test.cc:40
impeller::PlaygroundTest
Definition: playground_test.h:21
impeller::interop::testing::PlaygroundTest::operator=
PlaygroundTest & operator=(const PlaygroundTest &)=delete
context.h