config.h 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. // Copyright (c) 2011 The Chromium 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. #ifndef GPU_GLES2_CONFORM_SUPPORT_EGL_CONFIG_H_
  5. #define GPU_GLES2_CONFORM_SUPPORT_EGL_CONFIG_H_
  6. #include <EGL/egl.h>
  7. namespace gles2_conform_support {
  8. namespace egl {
  9. class Config {
  10. public:
  11. explicit Config(EGLint surface_type);
  12. Config(const Config&) = delete;
  13. Config& operator=(const Config&) = delete;
  14. ~Config();
  15. bool Matches(const EGLint* attrib_list) const;
  16. bool GetAttrib(EGLint attribute, EGLint* value) const;
  17. static bool ValidateAttributeList(const EGLint* attrib_list);
  18. private:
  19. // Total color component bits in the color buffer.
  20. EGLint buffer_size_;
  21. // Bits of Red in the color buffer.
  22. EGLint red_size_;
  23. // Bits of Green in the color buffer.
  24. EGLint green_size_;
  25. // Bits of Blue in the color buffer.
  26. EGLint blue_size_;
  27. // Bits of Luminance in the color buffer.
  28. EGLint luminance_size_;
  29. // Bits of Alpha in the color buffer.
  30. EGLint alpha_size_;
  31. // Bits of Alpha Mask in the mask buffer.
  32. EGLint alpha_mask_size_;
  33. // True if bindable to RGB textures.
  34. EGLBoolean bind_to_texture_rgb_;
  35. // True if bindable to RGBA textures.
  36. EGLBoolean bind_to_texture_rgba_;
  37. // Color buffer type.
  38. EGLenum color_buffer_type_;
  39. // Any caveats for the configuration.
  40. EGLenum config_caveat_;
  41. // Unique EGLConfig identifier.
  42. EGLint config_id_;
  43. // Whether contexts created with this config are conformant.
  44. EGLint conformant_;
  45. // Bits of Z in the depth buffer.
  46. EGLint depth_size_;
  47. // Frame buffer level.
  48. EGLint level_;
  49. // Maximum width of pbuffer.
  50. EGLint max_pbuffer_width_;
  51. // Maximum height of pbuffer.
  52. EGLint max_pbuffer_height_;
  53. // Maximum size of pbuffer.
  54. EGLint max_pbuffer_pixels_;
  55. // Minimum swap interval.
  56. EGLint min_swap_interval_;
  57. // Maximum swap interval.
  58. EGLint max_swap_interval_;
  59. // True if native rendering APIs can render to surface.
  60. EGLBoolean native_renderable_;
  61. // Handle of corresponding native visual.
  62. EGLint native_visual_id_;
  63. // Native visual type of the associated visual.
  64. EGLint native_visual_type_;
  65. // Which client rendering APIs are supported.
  66. EGLint renderable_type_;
  67. // Number of multisample buffers.
  68. EGLint sample_buffers_;
  69. // Number of samples per pixel.
  70. EGLint samples_;
  71. // Bits of Stencil in the stencil buffer.
  72. EGLint stencil_size_;
  73. // Which types of EGL surfaces are supported.
  74. EGLint surface_type_;
  75. // Type of transparency supported
  76. EGLenum transparent_type_;
  77. // Transparent red value
  78. EGLint transparent_red_value_;
  79. // Transparent green value
  80. EGLint transparent_green_value_;
  81. // Transparent blue value
  82. EGLint transparent_blue_value_;
  83. };
  84. } // namespace egl
  85. } // namespace gles2_conform_support
  86. #endif // GPU_GLES2_CONFORM_SUPPORT_EGL_CONFIG_H_