| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef UI_GL_TEST_GL_IMAGE_TEST_SUPPORT_H_ | 5 #ifndef UI_GL_TEST_GL_IMAGE_TEST_SUPPORT_H_ |
| 6 #define UI_GL_TEST_GL_IMAGE_TEST_SUPPORT_H_ | 6 #define UI_GL_TEST_GL_IMAGE_TEST_SUPPORT_H_ |
| 7 | 7 |
| 8 #include <stdint.h> |
| 9 |
| 8 #include "ui/gfx/buffer_types.h" | 10 #include "ui/gfx/buffer_types.h" |
| 9 #include "ui/gl/gl_bindings.h" | 11 #include "ui/gl/gl_bindings.h" |
| 10 | 12 |
| 11 namespace gl { | 13 namespace gl { |
| 12 | 14 |
| 13 class GLImageTestSupport { | 15 class GLImageTestSupport { |
| 14 public: | 16 public: |
| 15 // Initialize GL for image testing. | 17 // Initialize GL for image testing. |
| 16 static void InitializeGL(); | 18 static void InitializeGL(); |
| 17 | 19 |
| 18 // Cleanup GL after being initialized for image testing. | 20 // Cleanup GL after being initialized for image testing. |
| 19 static void CleanupGL(); | 21 static void CleanupGL(); |
| 20 | 22 |
| 21 // Initialize buffer of a specific |format| to |color|. | 23 // Initialize buffer of a specific |format| to |color|. |
| 22 static void SetBufferDataToColor(int width, | 24 static void SetBufferDataToColor(int width, |
| 23 int height, | 25 int height, |
| 24 int stride, | 26 int stride, |
| 25 int plane, | 27 int plane, |
| 26 gfx::BufferFormat format, | 28 gfx::BufferFormat format, |
| 27 const uint8_t color[4], | 29 const uint8_t color[4], |
| 28 uint8_t* data); | 30 uint8_t* data); |
| 29 }; | 31 }; |
| 30 | 32 |
| 31 } // namespace gl | 33 } // namespace gl |
| 32 | 34 |
| 33 #endif // UI_GL_TEST_GL_IMAGE_TEST_SUPPORT_H_ | 35 #endif // UI_GL_TEST_GL_IMAGE_TEST_SUPPORT_H_ |
| OLD | NEW |