OLD | NEW |
| (Empty) |
1 // Copyright 2015 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 | |
5 #ifndef UI_GL_TEST_GL_IMAGE_TEST_SUPPORT_H_ | |
6 #define UI_GL_TEST_GL_IMAGE_TEST_SUPPORT_H_ | |
7 | |
8 #include "ui/gfx/buffer_types.h" | |
9 #include "ui/gl/gl_bindings.h" | |
10 | |
11 namespace gfx { | |
12 | |
13 class GLImageTestSupport { | |
14 public: | |
15 // Initialize GL for image testing. | |
16 static void InitializeGL(); | |
17 | |
18 // Cleanup GL after being initialized for image testing. | |
19 static void CleanupGL(); | |
20 | |
21 // Returns the preferred internal format used for images. | |
22 static GLenum GetPreferredInternalFormat(); | |
23 | |
24 // Returns the preferred buffer format used for images. | |
25 static BufferFormat GetPreferredBufferFormat(); | |
26 | |
27 // Initialize buffer of a specific |format| to |color|. | |
28 static void SetBufferDataToColor(int width, | |
29 int height, | |
30 int stride, | |
31 BufferFormat format, | |
32 const uint8_t color[4], | |
33 uint8_t* data); | |
34 }; | |
35 | |
36 } // namespace gfx | |
37 | |
38 #endif // UI_GL_TEST_GL_IMAGE_TEST_SUPPORT_H_ | |
OLD | NEW |