Chromium Code Reviews| 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 "ui/gfx/buffer_types.h" | 8 #include "ui/gfx/buffer_types.h" |
| 9 #include "ui/gl/gl_bindings.h" | 9 #include "ui/gl/gl_bindings.h" |
| 10 | 10 |
| 11 namespace gl { | 11 namespace gl { |
| 12 | 12 |
| 13 class GLImageTestSupport { | 13 class GLImageTestSupport { |
| 14 public: | 14 public: |
| 15 // Initialize GL for image testing. | 15 // Initialize GL for image testing. |
| 16 static void InitializeGL(); | 16 static void InitializeGL(); |
| 17 | 17 |
| 18 // Cleanup GL after being initialized for image testing. | 18 // Cleanup GL after being initialized for image testing. |
| 19 static void CleanupGL(); | 19 static void CleanupGL(); |
| 20 | 20 |
| 21 // Initialize buffer of a specific |format| to |color|. | 21 // Initialize buffer of a specific |format| to |color|. |
| 22 static void SetBufferDataToColor(int width, | 22 static void SetBufferDataToColor(int width, |
| 23 int height, | 23 int height, |
| 24 int stride, | 24 int stride, |
| 25 int plane, | 25 int plane, |
| 26 gfx::BufferFormat format, | 26 gfx::BufferFormat format, |
| 27 const uint8_t color[4], | 27 const uint8_t color[4], |
| 28 uint8_t* data); | 28 uint8_t* data); |
| 29 | |
| 30 // Create GL program drawing a texture on a framebuffer. | |
| 31 static GLuint CreateSingleTextureProgram(); | |
|
reveman
2015/12/18 21:51:04
instead of adding this, can we keep this code in u
dshwang
2016/01/11 15:31:10
Done.
| |
| 29 }; | 32 }; |
| 30 | 33 |
| 31 } // namespace gl | 34 } // namespace gl |
| 32 | 35 |
| 33 #endif // UI_GL_TEST_GL_IMAGE_TEST_SUPPORT_H_ | 36 #endif // UI_GL_TEST_GL_IMAGE_TEST_SUPPORT_H_ |
| OLD | NEW |