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

Side by Side Diff: gpu/command_buffer/tests/gl_ext_srgb_unittest.cc

Issue 2602563002: Refactor DrawTextureQuad and CheckPixels in gl_tests util (Closed)
Patch Set: git cl format Created 3 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #include <GLES2/gl2.h> 5 #include <GLES2/gl2.h>
6 #include <GLES2/gl2ext.h> 6 #include <GLES2/gl2ext.h>
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "gpu/command_buffer/tests/gl_manager.h" 9 #include "gpu/command_buffer/tests/gl_manager.h"
10 #include "gpu/command_buffer/tests/gl_test_utils.h" 10 #include "gpu/command_buffer/tests/gl_test_utils.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 EXPECT_EQ(static_cast<GLenum>(GL_NO_ERROR), glGetError()); 59 EXPECT_EQ(static_cast<GLenum>(GL_NO_ERROR), glGetError());
60 glBindTexture(GL_TEXTURE_2D, 0); 60 glBindTexture(GL_TEXTURE_2D, 0);
61 GLuint fbo = 0; 61 GLuint fbo = 0;
62 glGenFramebuffers(1, &fbo); 62 glGenFramebuffers(1, &fbo);
63 glBindFramebuffer(GL_FRAMEBUFFER, fbo); 63 glBindFramebuffer(GL_FRAMEBUFFER, fbo);
64 glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, 64 glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D,
65 tex, 0); 65 tex, 0);
66 EXPECT_EQ(static_cast<GLenum>(GL_FRAMEBUFFER_COMPLETE), 66 EXPECT_EQ(static_cast<GLenum>(GL_FRAMEBUFFER_COMPLETE),
67 glCheckFramebufferStatus(GL_FRAMEBUFFER)); 67 glCheckFramebufferStatus(GL_FRAMEBUFFER));
68 68
69 GLTestHelper::CheckPixels(0, 0, kSubImageX, kHeight, 0, kImageColor); 69 GLTestHelper::CheckPixels(0, 0, kSubImageX, kHeight, 0, kImageColor, nullptr);
70 GLTestHelper::CheckPixels(0, 0, kWidth, kSubImageY, 0, kImageColor); 70 GLTestHelper::CheckPixels(0, 0, kWidth, kSubImageY, 0, kImageColor, nullptr);
71 GLTestHelper::CheckPixels(kSubImageX, kSubImageY, kSubImageWidth, 71 GLTestHelper::CheckPixels(kSubImageX, kSubImageY, kSubImageWidth,
72 kSubImageHeight, 0, kSubImageColor); 72 kSubImageHeight, 0, kSubImageColor, nullptr);
73 } 73 }
74 74
75 } // namespace gpu 75 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698