Flutter Engine
android_context.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_SHELL_PLATFORM_ANDROID_ANDROID_CONTEXT_H_
6 #define FLUTTER_SHELL_PLATFORM_ANDROID_ANDROID_CONTEXT_H_
7 
8 #include "flutter/fml/macros.h"
9 #include "third_party/skia/include/gpu/GrDirectContext.h"
10 
11 namespace flutter {
12 
13 enum class AndroidRenderingAPI {
14  kSoftware,
15  kOpenGLES,
16 };
17 
18 //------------------------------------------------------------------------------
19 /// @brief Holds state that is shared across Android surfaces.
20 ///
22  public:
23  explicit AndroidContext(AndroidRenderingAPI rendering_api);
24 
25  virtual ~AndroidContext();
26 
27  AndroidRenderingAPI RenderingApi() const;
28 
29  virtual bool IsValid() const;
30 
31  private:
32  const AndroidRenderingAPI rendering_api_;
33 
35 };
36 
37 } // namespace flutter
38 
39 #endif // FLUTTER_SHELL_PLATFORM_ANDROID_ANDROID_CONTEXT_H_
Holds state that is shared across Android surfaces.
static bool IsValid(double value)
#define FML_DISALLOW_COPY_AND_ASSIGN(TypeName)
Definition: macros.h:27