Flutter Engine
The Flutter Engine
playground_impl.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_PLAYGROUND_PLAYGROUND_IMPL_H_
6#define FLUTTER_IMPELLER_PLAYGROUND_PLAYGROUND_IMPL_H_
7
8#include <memory>
9
14
15namespace impeller {
16
18 public:
19 static std::unique_ptr<PlaygroundImpl> Create(PlaygroundBackend backend,
20 PlaygroundSwitches switches);
21
22 virtual ~PlaygroundImpl();
23
24 using WindowHandle = void*;
25
26 virtual WindowHandle GetWindowHandle() const = 0;
27
28 virtual std::shared_ptr<Context> GetContext() const = 0;
29
30 virtual std::unique_ptr<Surface> AcquireSurfaceFrame(
31 std::shared_ptr<Context> context) = 0;
32
34
36 const std::shared_ptr<Capabilities>& capabilities) = 0;
37
38 protected:
40
41 explicit PlaygroundImpl(PlaygroundSwitches switches);
42
43 private:
44 PlaygroundImpl(const PlaygroundImpl&) = delete;
45
46 PlaygroundImpl& operator=(const PlaygroundImpl&) = delete;
47};
48
49} // namespace impeller
50
51#endif // FLUTTER_IMPELLER_PLAYGROUND_PLAYGROUND_IMPL_H_
const char * backend
PlaygroundImpl(PlaygroundSwitches switches)
Vector2 GetContentScale() const
virtual WindowHandle GetWindowHandle() const =0
virtual std::unique_ptr< Surface > AcquireSurfaceFrame(std::shared_ptr< Context > context)=0
static std::unique_ptr< PlaygroundImpl > Create(PlaygroundBackend backend, PlaygroundSwitches switches)
virtual std::shared_ptr< Context > GetContext() const =0
const PlaygroundSwitches switches_
virtual fml::Status SetCapabilities(const std::shared_ptr< Capabilities > &capabilities)=0
PlaygroundBackend
Definition: playground.h:27