| 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 "gpu/command_buffer/service/texture_manager.h" | 5 #include "gpu/command_buffer/service/texture_manager.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 TextureRef* texture_ref, GLenum pname, GLint value, GLenum error) { | 102 TextureRef* texture_ref, GLenum pname, GLint value, GLenum error) { |
| 103 TestHelper::SetTexParameteriWithExpectations( | 103 TestHelper::SetTexParameteriWithExpectations( |
| 104 gl_.get(), error_state_.get(), manager_.get(), | 104 gl_.get(), error_state_.get(), manager_.get(), |
| 105 texture_ref, pname, value, error); | 105 texture_ref, pname, value, error); |
| 106 } | 106 } |
| 107 | 107 |
| 108 void SetupFeatureInfo(const char* gl_extensions, | 108 void SetupFeatureInfo(const char* gl_extensions, |
| 109 const char* gl_version, | 109 const char* gl_version, |
| 110 bool enable_es3) { | 110 bool enable_es3) { |
| 111 TestHelper::SetupFeatureInfoInitExpectationsWithGLVersion( | 111 TestHelper::SetupFeatureInfoInitExpectationsWithGLVersion( |
| 112 gl_.get(), gl_extensions, "", gl_version, | 112 gl_.get(), gl_extensions, "", gl_version, enable_es3); |
| 113 feature_info_->context_type(), enable_es3); | 113 if (enable_es3) |
| 114 feature_info_->InitializeForTesting(); | 114 feature_info_->InitializeForTesting(CONTEXT_TYPE_OPENGLES3); |
| 115 else |
| 116 feature_info_->InitializeForTesting(); |
| 115 if (enable_es3) { | 117 if (enable_es3) { |
| 116 EXPECT_CALL(*gl_, GetIntegerv(GL_MAX_COLOR_ATTACHMENTS, _)) | 118 EXPECT_CALL(*gl_, GetIntegerv(GL_MAX_COLOR_ATTACHMENTS, _)) |
| 117 .WillOnce(SetArgPointee<1>(8)) | 119 .WillOnce(SetArgPointee<1>(8)) |
| 118 .RetiresOnSaturation(); | 120 .RetiresOnSaturation(); |
| 119 EXPECT_CALL(*gl_, GetIntegerv(GL_MAX_DRAW_BUFFERS, _)) | 121 EXPECT_CALL(*gl_, GetIntegerv(GL_MAX_DRAW_BUFFERS, _)) |
| 120 .WillOnce(SetArgPointee<1>(8)) | 122 .WillOnce(SetArgPointee<1>(8)) |
| 121 .RetiresOnSaturation(); | 123 .RetiresOnSaturation(); |
| 122 feature_info_->EnableES3Validators(); | 124 feature_info_->EnableES3Validators(); |
| 123 } | 125 } |
| 124 } | 126 } |
| (...skipping 2070 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2195 texture_manager1_->Destroy(false); | 2197 texture_manager1_->Destroy(false); |
| 2196 texture_manager1_.reset(); | 2198 texture_manager1_.reset(); |
| 2197 GpuServiceTest::TearDown(); | 2199 GpuServiceTest::TearDown(); |
| 2198 } | 2200 } |
| 2199 | 2201 |
| 2200 protected: | 2202 protected: |
| 2201 void SetupFeatureInfo(const char* gl_extensions, | 2203 void SetupFeatureInfo(const char* gl_extensions, |
| 2202 const char* gl_version, | 2204 const char* gl_version, |
| 2203 bool enable_es3) { | 2205 bool enable_es3) { |
| 2204 TestHelper::SetupFeatureInfoInitExpectationsWithGLVersion( | 2206 TestHelper::SetupFeatureInfoInitExpectationsWithGLVersion( |
| 2205 gl_.get(), gl_extensions, "", gl_version, | 2207 gl_.get(), gl_extensions, "", gl_version, enable_es3); |
| 2206 feature_info_->context_type(), enable_es3); | |
| 2207 feature_info_->InitializeForTesting(); | 2208 feature_info_->InitializeForTesting(); |
| 2208 if (enable_es3) { | 2209 if (enable_es3) { |
| 2209 EXPECT_CALL(*gl_, GetIntegerv(GL_MAX_COLOR_ATTACHMENTS, _)) | 2210 EXPECT_CALL(*gl_, GetIntegerv(GL_MAX_COLOR_ATTACHMENTS, _)) |
| 2210 .WillOnce(SetArgPointee<1>(8)) | 2211 .WillOnce(SetArgPointee<1>(8)) |
| 2211 .RetiresOnSaturation(); | 2212 .RetiresOnSaturation(); |
| 2212 EXPECT_CALL(*gl_, GetIntegerv(GL_MAX_DRAW_BUFFERS, _)) | 2213 EXPECT_CALL(*gl_, GetIntegerv(GL_MAX_DRAW_BUFFERS, _)) |
| 2213 .WillOnce(SetArgPointee<1>(8)) | 2214 .WillOnce(SetArgPointee<1>(8)) |
| 2214 .RetiresOnSaturation(); | 2215 .RetiresOnSaturation(); |
| 2215 feature_info_->EnableES3Validators(); | 2216 feature_info_->EnableES3Validators(); |
| 2216 } | 2217 } |
| (...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2694 ExpectValid( | 2695 ExpectValid( |
| 2695 true, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, GL_DEPTH24_STENCIL8); | 2696 true, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, GL_DEPTH24_STENCIL8); |
| 2696 ExpectValid(true, GL_DEPTH_STENCIL, GL_FLOAT_32_UNSIGNED_INT_24_8_REV, | 2697 ExpectValid(true, GL_DEPTH_STENCIL, GL_FLOAT_32_UNSIGNED_INT_24_8_REV, |
| 2697 GL_DEPTH32F_STENCIL8); | 2698 GL_DEPTH32F_STENCIL8); |
| 2698 | 2699 |
| 2699 ExpectInvalid(true, GL_RGB_INTEGER, GL_INT, GL_RGBA8); | 2700 ExpectInvalid(true, GL_RGB_INTEGER, GL_INT, GL_RGBA8); |
| 2700 } | 2701 } |
| 2701 | 2702 |
| 2702 } // namespace gles2 | 2703 } // namespace gles2 |
| 2703 } // namespace gpu | 2704 } // namespace gpu |
| OLD | NEW |