Flutter Impeller
description_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_RENDERER_BACKEND_GLES_DESCRIPTION_GLES_H_
6 #define FLUTTER_IMPELLER_RENDERER_BACKEND_GLES_DESCRIPTION_GLES_H_
7 
8 #include <set>
9 #include <string>
10 
11 #include "impeller/base/version.h"
12 
13 namespace impeller {
14 
15 class ProcTableGLES;
16 
18  public:
19  explicit DescriptionGLES(const ProcTableGLES& gl);
20 
22 
23  bool IsValid() const;
24 
25  bool IsES() const;
26 
27  std::string GetString() const;
28 
29  Version GetGlVersion() const;
30 
31  bool HasExtension(const std::string& ext) const;
32 
33  /// @brief Returns whether GLES includes the debug extension.
34  bool HasDebugExtension() const;
35 
36  bool IsANGLE() const;
37 
38  private:
39  Version gl_version_;
40  Version sl_version_;
41  bool is_es_ = true;
42  std::string vendor_;
43  std::string renderer_;
44  std::string gl_version_string_;
45  std::string sl_version_string_;
46  std::set<std::string> extensions_;
47  bool is_angle_ = false;
48  bool is_valid_ = false;
49 
50  DescriptionGLES(const DescriptionGLES&) = delete;
51 
52  DescriptionGLES& operator=(const DescriptionGLES&) = delete;
53 };
54 
55 } // namespace impeller
56 
57 #endif // FLUTTER_IMPELLER_RENDERER_BACKEND_GLES_DESCRIPTION_GLES_H_
DescriptionGLES(const ProcTableGLES &gl)
std::string GetString() const
bool HasExtension(const std::string &ext) const
bool HasDebugExtension() const
Returns whether GLES includes the debug extension.