summaryrefslogtreecommitdiffstats
path: root/ui/gl/gl_enums.h
blob: 30dee6c46b6e3054296b32ead8d6b52b30eefb15 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef UI_GL_GL_ENUMS_H_
#define UI_GL_GL_ENUMS_H_

#include <string>

#include "base/basictypes.h"
#include "ui/gl/gl_export.h"

namespace gfx {

class GL_EXPORT GLEnums {
 public:
  struct EnumToString {
    uint32_t value;
    const char* name;
  };

  static std::string GetStringEnum(uint32_t value);
  static std::string GetStringBool(uint32_t value);
  static std::string GetStringError(uint32_t value);

 private:
  static const EnumToString* const enum_to_string_table_;
  static const size_t enum_to_string_table_len_;
};

}  // namespace gfx

#endif  // UI_GL_GL_ENUMS_H_