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 #include <GLES2/gl2.h> | 5 #include <GLES2/gl2.h> |
6 #include <stdint.h> | 6 #include <stdint.h> |
7 | 7 |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
10 #include "gpu/command_buffer/tests/gl_manager.h" | 10 #include "gpu/command_buffer/tests/gl_manager.h" |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 texture_, 0); | 128 texture_, 0); |
129 | 129 |
130 // force_cube_map_positive_x_allocation workaround prevents Nexus 5 crash. | 130 // force_cube_map_positive_x_allocation workaround prevents Nexus 5 crash. |
131 // TODO(dshwang): remove the workaround when it's fixed. crbug.com/518889 | 131 // TODO(dshwang): remove the workaround when it's fixed. crbug.com/518889 |
132 EXPECT_EQ(static_cast<GLenum>(GL_NO_ERROR), glGetError()); | 132 EXPECT_EQ(static_cast<GLenum>(GL_NO_ERROR), glGetError()); |
133 | 133 |
134 // Check that FB is not complete. | 134 // Check that FB is not complete. |
135 EXPECT_EQ(static_cast<GLenum>(GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT), | 135 EXPECT_EQ(static_cast<GLenum>(GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT), |
136 glCheckFramebufferStatus(GL_FRAMEBUFFER)); | 136 glCheckFramebufferStatus(GL_FRAMEBUFFER)); |
137 GLsizei size = width_ * width_ * 4; | 137 GLsizei size = width_ * width_ * 4; |
138 scoped_ptr<uint8_t[]> pixels(new uint8_t[size]); | 138 std::unique_ptr<uint8_t[]> pixels(new uint8_t[size]); |
139 glReadPixels(0, 0, width_, width_, GL_RGBA, GL_UNSIGNED_BYTE, pixels.get()); | 139 glReadPixels(0, 0, width_, width_, GL_RGBA, GL_UNSIGNED_BYTE, pixels.get()); |
140 EXPECT_EQ(static_cast<GLenum>(GL_INVALID_FRAMEBUFFER_OPERATION), | 140 EXPECT_EQ(static_cast<GLenum>(GL_INVALID_FRAMEBUFFER_OPERATION), |
141 glGetError()); | 141 glGetError()); |
142 } | 142 } |
143 | 143 |
144 } // namespace gpu | 144 } // namespace gpu |
OLD | NEW |