buffer_format_utils.h 687 B

12345678910111213141516171819202122
  1. // Copyright 2019 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 UI_GL_BUFFER_FORMAT_UTILS_H_
  5. #define UI_GL_BUFFER_FORMAT_UTILS_H_
  6. #include "ui/gfx/buffer_types.h"
  7. #include "ui/gl/gl_export.h"
  8. namespace gl {
  9. // Map buffer format to GL internalformat. Return GL_NONE if no sensible
  10. // mapping.
  11. GL_EXPORT unsigned BufferFormatToGLInternalFormat(gfx::BufferFormat format);
  12. // Map buffer format to GL type. Return GL_NONE if no sensible mapping.
  13. GL_EXPORT unsigned BufferFormatToGLDataType(gfx::BufferFormat format);
  14. } // namespace gl
  15. #endif // UI_GL_BUFFER_FORMAT_UTILS_H_