| 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 <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 1835 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1846 EXPECT_CALL(*gl_, DeleteTextures(1, _)) | 1846 EXPECT_CALL(*gl_, DeleteTextures(1, _)) |
| 1847 .Times(1) | 1847 .Times(1) |
| 1848 .RetiresOnSaturation(); | 1848 .RetiresOnSaturation(); |
| 1849 texture_manager1_->RemoveTexture(10); | 1849 texture_manager1_->RemoveTexture(10); |
| 1850 texture_manager2_->RemoveTexture(20); | 1850 texture_manager2_->RemoveTexture(20); |
| 1851 } | 1851 } |
| 1852 | 1852 |
| 1853 TEST_F(SharedTextureTest, FBOCompletenessCheck) { | 1853 TEST_F(SharedTextureTest, FBOCompletenessCheck) { |
| 1854 const GLenum kCompleteValue = GL_FRAMEBUFFER_COMPLETE; | 1854 const GLenum kCompleteValue = GL_FRAMEBUFFER_COMPLETE; |
| 1855 FramebufferManager framebuffer_manager1( | 1855 FramebufferManager framebuffer_manager1( |
| 1856 1, 1, ContextGroup::CONTEXT_TYPE_UNDEFINED); | 1856 1, 1, ContextGroup::CONTEXT_TYPE_UNDEFINED, NULL); |
| 1857 texture_manager1_->set_framebuffer_manager(&framebuffer_manager1); | 1857 texture_manager1_->set_framebuffer_manager(&framebuffer_manager1); |
| 1858 FramebufferManager framebuffer_manager2( | 1858 FramebufferManager framebuffer_manager2( |
| 1859 1, 1, ContextGroup::CONTEXT_TYPE_UNDEFINED); | 1859 1, 1, ContextGroup::CONTEXT_TYPE_UNDEFINED, NULL); |
| 1860 texture_manager2_->set_framebuffer_manager(&framebuffer_manager2); | 1860 texture_manager2_->set_framebuffer_manager(&framebuffer_manager2); |
| 1861 | 1861 |
| 1862 scoped_refptr<TextureRef> ref1 = texture_manager1_->CreateTexture(10, 10); | 1862 scoped_refptr<TextureRef> ref1 = texture_manager1_->CreateTexture(10, 10); |
| 1863 framebuffer_manager1.CreateFramebuffer(10, 10); | 1863 framebuffer_manager1.CreateFramebuffer(10, 10); |
| 1864 scoped_refptr<Framebuffer> framebuffer1 = | 1864 scoped_refptr<Framebuffer> framebuffer1 = |
| 1865 framebuffer_manager1.GetFramebuffer(10); | 1865 framebuffer_manager1.GetFramebuffer(10); |
| 1866 framebuffer1->AttachTexture( | 1866 framebuffer1->AttachTexture( |
| 1867 GL_COLOR_ATTACHMENT0, ref1.get(), GL_TEXTURE_2D, 0, 0); | 1867 GL_COLOR_ATTACHMENT0, ref1.get(), GL_TEXTURE_2D, 0, 0); |
| 1868 EXPECT_FALSE(framebuffer_manager1.IsComplete(framebuffer1.get())); | 1868 EXPECT_FALSE(framebuffer_manager1.IsComplete(framebuffer1.get())); |
| 1869 EXPECT_NE(kCompleteValue, framebuffer1->IsPossiblyComplete()); | 1869 EXPECT_NE(kCompleteValue, framebuffer1->IsPossiblyComplete()); |
| (...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2242 ExpectValid(GL_DEPTH_COMPONENT, GL_FLOAT, GL_DEPTH_COMPONENT32F); | 2242 ExpectValid(GL_DEPTH_COMPONENT, GL_FLOAT, GL_DEPTH_COMPONENT32F); |
| 2243 ExpectValid(GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, GL_DEPTH24_STENCIL8); | 2243 ExpectValid(GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, GL_DEPTH24_STENCIL8); |
| 2244 ExpectValid(GL_DEPTH_STENCIL, GL_FLOAT_32_UNSIGNED_INT_24_8_REV, | 2244 ExpectValid(GL_DEPTH_STENCIL, GL_FLOAT_32_UNSIGNED_INT_24_8_REV, |
| 2245 GL_DEPTH32F_STENCIL8); | 2245 GL_DEPTH32F_STENCIL8); |
| 2246 | 2246 |
| 2247 ExpectInvalid(GL_RGB_INTEGER, GL_INT, GL_RGBA8); | 2247 ExpectInvalid(GL_RGB_INTEGER, GL_INT, GL_RGBA8); |
| 2248 } | 2248 } |
| 2249 | 2249 |
| 2250 } // namespace gles2 | 2250 } // namespace gles2 |
| 2251 } // namespace gpu | 2251 } // namespace gpu |
| OLD | NEW |