summaryrefslogtreecommitdiff
path: root/chromium/ui/gfx/gpu_extra_info.h
blob: 90fe896677da7364daad2a5ccde2374b3109d063 (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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
// Copyright (c) 2019 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_GFX_GPU_EXTRA_INFO_H_
#define UI_GFX_GPU_EXTRA_INFO_H_

#include <string>
#include <vector>

#include "ui/gfx/buffer_types.h"
#include "ui/gfx/gfx_export.h"

#if defined(USE_OZONE) || defined(USE_X11)
typedef unsigned long VisualID;
#endif

namespace gfx {

// Specification of a feature that can be enabled/disable in ANGLE
struct GFX_EXPORT ANGLEFeature {
  ANGLEFeature();
  ANGLEFeature(const ANGLEFeature& other);
  ANGLEFeature(ANGLEFeature&& other);
  ~ANGLEFeature();
  ANGLEFeature& operator=(const ANGLEFeature& other);
  ANGLEFeature& operator=(ANGLEFeature&& other);

  // Name of the feature in camel_case.
  std::string name;

  // Name of the category that the feature belongs to.
  std::string category;

  // One sentence description of the feature, why it's available.
  std::string description;

  // Full link to cr/angle bug if applicable.
  std::string bug;

  // Status, can be "enabled" or "disabled".
  std::string status;

  // Condition, contains the condition that set 'status'.
  std::string condition;
};
using ANGLEFeatures = std::vector<ANGLEFeature>;

struct GFX_EXPORT GpuExtraInfo {
  GpuExtraInfo();
  GpuExtraInfo(const GpuExtraInfo&);
  GpuExtraInfo(GpuExtraInfo&&);
  ~GpuExtraInfo();
  GpuExtraInfo& operator=(const GpuExtraInfo&);
  GpuExtraInfo& operator=(GpuExtraInfo&&);

  // List of the currently available ANGLE features. May be empty if not
  // applicable.
  ANGLEFeatures angle_features;

#if defined(USE_OZONE) || defined(USE_X11)
  VisualID system_visual = 0;
  VisualID rgba_visual = 0;

  std::vector<gfx::BufferUsageAndFormat> gpu_memory_buffer_support_x11;
#endif
};

}  // namespace gfx

#endif  // UI_GFX_GPU_EXTRA_INFO_H_