| 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 2296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2307 EXPECT_CALL(*gl_, DeleteTextures(1, _)) | 2307 EXPECT_CALL(*gl_, DeleteTextures(1, _)) |
| 2308 .Times(1) | 2308 .Times(1) |
| 2309 .RetiresOnSaturation(); | 2309 .RetiresOnSaturation(); |
| 2310 texture_manager1_->RemoveTexture(10); | 2310 texture_manager1_->RemoveTexture(10); |
| 2311 texture_manager2_->RemoveTexture(20); | 2311 texture_manager2_->RemoveTexture(20); |
| 2312 } | 2312 } |
| 2313 | 2313 |
| 2314 TEST_F(SharedTextureTest, FBOCompletenessCheck) { | 2314 TEST_F(SharedTextureTest, FBOCompletenessCheck) { |
| 2315 const GLenum kCompleteValue = GL_FRAMEBUFFER_COMPLETE; | 2315 const GLenum kCompleteValue = GL_FRAMEBUFFER_COMPLETE; |
| 2316 FramebufferManager framebuffer_manager1(1, 1, nullptr); | 2316 FramebufferManager framebuffer_manager1(1, 1, nullptr); |
| 2317 texture_manager1_->set_framebuffer_manager(&framebuffer_manager1); | 2317 texture_manager1_->AddFramebufferManager(&framebuffer_manager1); |
| 2318 FramebufferManager framebuffer_manager2(1, 1, nullptr); | 2318 FramebufferManager framebuffer_manager2(1, 1, nullptr); |
| 2319 texture_manager2_->set_framebuffer_manager(&framebuffer_manager2); | 2319 texture_manager2_->AddFramebufferManager(&framebuffer_manager2); |
| 2320 | 2320 |
| 2321 scoped_refptr<TextureRef> ref1 = texture_manager1_->CreateTexture(10, 10); | 2321 scoped_refptr<TextureRef> ref1 = texture_manager1_->CreateTexture(10, 10); |
| 2322 framebuffer_manager1.CreateFramebuffer(10, 10); | 2322 framebuffer_manager1.CreateFramebuffer(10, 10); |
| 2323 scoped_refptr<Framebuffer> framebuffer1 = | 2323 scoped_refptr<Framebuffer> framebuffer1 = |
| 2324 framebuffer_manager1.GetFramebuffer(10); | 2324 framebuffer_manager1.GetFramebuffer(10); |
| 2325 framebuffer1->AttachTexture( | 2325 framebuffer1->AttachTexture( |
| 2326 GL_COLOR_ATTACHMENT0, ref1.get(), GL_TEXTURE_2D, 0, 0); | 2326 GL_COLOR_ATTACHMENT0, ref1.get(), GL_TEXTURE_2D, 0, 0); |
| 2327 EXPECT_FALSE(framebuffer_manager1.IsComplete(framebuffer1.get())); | 2327 EXPECT_FALSE(framebuffer_manager1.IsComplete(framebuffer1.get())); |
| 2328 EXPECT_NE(kCompleteValue, | 2328 EXPECT_NE(kCompleteValue, |
| 2329 framebuffer1->IsPossiblyComplete(feature_info_.get())); | 2329 framebuffer1->IsPossiblyComplete(feature_info_.get())); |
| (...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2718 ExpectValid( | 2718 ExpectValid( |
| 2719 true, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, GL_DEPTH24_STENCIL8); | 2719 true, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, GL_DEPTH24_STENCIL8); |
| 2720 ExpectValid(true, GL_DEPTH_STENCIL, GL_FLOAT_32_UNSIGNED_INT_24_8_REV, | 2720 ExpectValid(true, GL_DEPTH_STENCIL, GL_FLOAT_32_UNSIGNED_INT_24_8_REV, |
| 2721 GL_DEPTH32F_STENCIL8); | 2721 GL_DEPTH32F_STENCIL8); |
| 2722 | 2722 |
| 2723 ExpectInvalid(true, GL_RGB_INTEGER, GL_INT, GL_RGBA8); | 2723 ExpectInvalid(true, GL_RGB_INTEGER, GL_INT, GL_RGBA8); |
| 2724 } | 2724 } |
| 2725 | 2725 |
| 2726 } // namespace gles2 | 2726 } // namespace gles2 |
| 2727 } // namespace gpu | 2727 } // namespace gpu |
| OLD | NEW |