| Flutter Impeller |

playground_impl_gles.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_BACKEND_GLES_PLAYGROUND_IMPL_GLES_H_
6 #define FLUTTER_IMPELLER_PLAYGROUND_BACKEND_GLES_PLAYGROUND_IMPL_GLES_H_
7
8 #include "impeller/playground/playground_impl.h"
9
10 namespace impeller {
11
12 class PlaygroundImplGLES final : public PlaygroundImpl {
13 public:
14 explicit PlaygroundImplGLES(PlaygroundSwitches switches);
15
16 ~PlaygroundImplGLES();
17
18 fml::Status SetCapabilities(
19 const std::shared_ptr<Capabilities>& capabilities) override;
20
21 private:
22 class ReactorWorker;
23
24 static void DestroyWindowHandle(WindowHandle handle);
25 using UniqueHandle = std::unique_ptr<void, decltype(&DestroyWindowHandle)>;
26 UniqueHandle handle_;
27 std::shared_ptr<ReactorWorker> worker_;
28 const bool use_angle_;
29 void* angle_glesv2_;
30
31 // |PlaygroundImpl|
32 std::shared_ptr<Context> GetContext() const override;
33
34 // |PlaygroundImpl|
35 WindowHandle GetWindowHandle() const override;
36
37 // |PlaygroundImpl|
38 std::unique_ptr<Surface> AcquireSurfaceFrame(
39 std::shared_ptr<Context> context) override;
40
41 // |PlaygroundImpl|
42 Playground::GLProcAddressResolver CreateGLProcAddressResolver()
43 const override;
44
45 PlaygroundImplGLES(const PlaygroundImplGLES&) = delete;
46
47 PlaygroundImplGLES& operator=(const PlaygroundImplGLES&) = delete;
48 };
49
50 } // namespace impeller
51
52 #endif // FLUTTER_IMPELLER_PLAYGROUND_BACKEND_GLES_PLAYGROUND_IMPL_GLES_H_
impeller::PlaygroundImplGLES::SetCapabilities
fml::Status SetCapabilities(const std::shared_ptr< Capabilities > &capabilities) override
Definition: playground_impl_gles.cc:195
impeller::PlaygroundImplGLES::~PlaygroundImplGLES
~PlaygroundImplGLES()
impeller::PlaygroundImplGLES
Definition: playground_impl_gles.h:12
impeller::PlaygroundImplGLES::ReactorWorker
Definition: playground_impl_gles.cc:28
impeller::PlaygroundImpl
Definition: playground_impl.h:18
impeller::PlaygroundSwitches
Definition: switches.h:15
impeller::PlaygroundImplGLES::PlaygroundImplGLES
PlaygroundImplGLES(PlaygroundSwitches switches)
Definition: playground_impl_gles.cc:64
playground_impl.h
impeller::Playground::GLProcAddressResolver
std::function< void *(const char *proc_name)> GLProcAddressResolver
Definition: playground.h:117
impeller
Definition: allocation.cc:12
impeller::PlaygroundImpl::WindowHandle
void * WindowHandle
Definition: playground_impl.h:25