OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "base/memory/scoped_ptr.h" | 5 #include "base/memory/scoped_ptr.h" |
6 #include "cc/test/test_web_graphics_context_3d.h" | 6 #include "cc/test/test_web_graphics_context_3d.h" |
7 #include "gpu/GLES2/gl2extchromium.h" | 7 #include "gpu/GLES2/gl2extchromium.h" |
8 #include "testing/gmock/include/gmock/gmock.h" | 8 #include "testing/gmock/include/gmock/gmock.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
10 #include "third_party/khronos/GLES2/gl2ext.h" | 10 #include "third_party/khronos/GLES2/gl2ext.h" |
(...skipping 75 matching lines...) Loading... |
86 // Get texture parameters on the first texture and verify they are still | 86 // Get texture parameters on the first texture and verify they are still |
87 // intact. | 87 // intact. |
88 context->bindTexture(GL_TEXTURE_2D, first_texture); | 88 context->bindTexture(GL_TEXTURE_2D, first_texture); |
89 | 89 |
90 EXPECT_TRUE( | 90 EXPECT_TRUE( |
91 check_parameter_value(context.get(), GL_TEXTURE_MIN_FILTER, GL_LINEAR)); | 91 check_parameter_value(context.get(), GL_TEXTURE_MIN_FILTER, GL_LINEAR)); |
92 EXPECT_TRUE( | 92 EXPECT_TRUE( |
93 check_parameter_value(context.get(), GL_TEXTURE_MAG_FILTER, GL_NEAREST)); | 93 check_parameter_value(context.get(), GL_TEXTURE_MAG_FILTER, GL_NEAREST)); |
94 } | 94 } |
95 | 95 |
| 96 TEST(TestWebGraphicsContext3DTest, UseMultipleRenderAndFramebuffers) { |
| 97 scoped_ptr<TestWebGraphicsContext3D> context( |
| 98 TestWebGraphicsContext3D::Create()); |
| 99 |
| 100 GLuint ids[2]; |
| 101 context->genFramebuffers(2, ids); |
| 102 EXPECT_NE(ids[0], ids[1]); |
| 103 context->deleteFramebuffers(2, ids); |
| 104 |
| 105 context->genRenderbuffers(2, ids); |
| 106 EXPECT_NE(ids[0], ids[1]); |
| 107 context->deleteRenderbuffers(2, ids); |
| 108 } |
| 109 |
96 } // namespace | 110 } // namespace |
97 } // namespace cc | 111 } // namespace cc |
OLD | NEW |