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

Unified Diff: gpu/command_buffer/tests/gl_test_utils.h

Issue 2602563002: Refactor DrawTextureQuad and CheckPixels in gl_tests util (Closed)
Patch Set: rebase only Created 3 years, 12 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/command_buffer/tests/gl_stream_draw_unittest.cc ('k') | gpu/command_buffer/tests/gl_test_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/tests/gl_test_utils.h
diff --git a/gpu/command_buffer/tests/gl_test_utils.h b/gpu/command_buffer/tests/gl_test_utils.h
index d4292248285766b79cac5febb3d9f2cd8572fee6..e89fbfbb7fd7a11f197f2e8273268c13cf9cd55d 100644
--- a/gpu/command_buffer/tests/gl_test_utils.h
+++ b/gpu/command_buffer/tests/gl_test_utils.h
@@ -12,10 +12,6 @@
#include <vector>
-namespace gfx {
-class Size;
-} // namespace gfx
-
class GLTestHelper {
public:
static const uint8_t kCheckClearValue = 123u;
@@ -59,17 +55,23 @@ class GLTestHelper {
GLint location, const GLfloat color[4], GLenum usage);
// Checks an area of pixels for a color.
+ // If mask is nullptr, compare all color channels; otherwise, compare the
+ // channels whose corresponding mask bit is true.
static bool CheckPixels(GLint x,
GLint y,
GLsizei width,
GLsizei height,
GLint tolerance,
- const uint8_t* color);
+ const uint8_t* color,
+ const uint8_t* mask);
// Uses ReadPixels to save an area of the current FBO/Backbuffer.
static bool SaveBackbufferAsBMP(const char* filename, int width, int height);
- static void DrawTextureQuad(GLenum target, const gfx::Size& size);
+ static void DrawTextureQuad(const char* vertex_src,
+ const char* fragment_src,
+ const char* position_name,
+ const char* sampler_name);
};
#endif // GPU_COMMAND_BUFFER_TESTS_GL_TEST_UTILS_H_
« no previous file with comments | « gpu/command_buffer/tests/gl_stream_draw_unittest.cc ('k') | gpu/command_buffer/tests/gl_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698