OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <GLES2/gl2extchromium.h> | 7 #include <GLES2/gl2extchromium.h> |
| 8 #include <stdint.h> |
8 | 9 |
9 #include "gpu/command_buffer/tests/gl_manager.h" | 10 #include "gpu/command_buffer/tests/gl_manager.h" |
10 #include "gpu/command_buffer/tests/gl_test_utils.h" | 11 #include "gpu/command_buffer/tests/gl_test_utils.h" |
11 #include "testing/gmock/include/gmock/gmock.h" | 12 #include "testing/gmock/include/gmock/gmock.h" |
12 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
13 | 14 |
14 namespace gpu { | 15 namespace gpu { |
15 | 16 |
16 class GLChromiumFramebufferMultisampleTest : public testing::Test { | 17 class GLChromiumFramebufferMultisampleTest : public testing::Test { |
17 protected: | 18 protected: |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 width, | 140 width, |
140 height, | 141 height, |
141 0, | 142 0, |
142 0, | 143 0, |
143 width, | 144 width, |
144 height, | 145 height, |
145 GL_COLOR_BUFFER_BIT, | 146 GL_COLOR_BUFFER_BIT, |
146 GL_NEAREST); | 147 GL_NEAREST); |
147 | 148 |
148 // Verify. | 149 // Verify. |
149 const uint8 green[] = {0, 255, 0, 255}; | 150 const uint8_t green[] = {0, 255, 0, 255}; |
150 const uint8 black[] = {0, 0, 0, 0}; | 151 const uint8_t black[] = {0, 0, 0, 0}; |
151 glBindFramebuffer(GL_READ_FRAMEBUFFER, resolve_fbo); | 152 glBindFramebuffer(GL_READ_FRAMEBUFFER, resolve_fbo); |
152 EXPECT_TRUE( | 153 EXPECT_TRUE( |
153 GLTestHelper::CheckPixels(width / 4, (3 * height) / 4, 1, 1, 0, green)); | 154 GLTestHelper::CheckPixels(width / 4, (3 * height) / 4, 1, 1, 0, green)); |
154 EXPECT_TRUE(GLTestHelper::CheckPixels(width - 1, 0, 1, 1, 0, black)); | 155 EXPECT_TRUE(GLTestHelper::CheckPixels(width - 1, 0, 1, 1, 0, black)); |
155 } | 156 } |
156 | 157 |
157 } // namespace gpu | 158 } // namespace gpu |
158 | 159 |
OLD | NEW |