Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(77)

Side by Side Diff: ui/gl/test/gl_image_test_support.h

Issue 1415723006: ui: Add RGBX_8888 buffer format. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix gles but no conversion needed case Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/gl/gl_tests.gyp ('k') | ui/gl/test/gl_image_test_support.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 gfx { 11 namespace gfx {
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 // 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|. 21 // Initialize buffer of a specific |format| to |color|.
28 static void SetBufferDataToColor(int width, 22 static void SetBufferDataToColor(int width,
29 int height, 23 int height,
30 int stride, 24 int stride,
31 BufferFormat format, 25 BufferFormat format,
32 const uint8_t color[4], 26 const uint8_t color[4],
33 uint8_t* data); 27 uint8_t* data);
34 }; 28 };
35 29
36 } // namespace gfx 30 } // namespace gfx
37 31
38 #endif // UI_GL_TEST_GL_IMAGE_TEST_SUPPORT_H_ 32 #endif // UI_GL_TEST_GL_IMAGE_TEST_SUPPORT_H_
OLDNEW
« no previous file with comments | « ui/gl/gl_tests.gyp ('k') | ui/gl/test/gl_image_test_support.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698