Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: gpu/command_buffer/service/texture_manager_unittest.cc

Issue 1325433003: command_buffer: Add support for creating non-WebGL ES 3 contexts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: missing hunk Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 1942 matching lines...) Expand 10 before | Expand all | Expand 10 after
1953 1953
1954 EXPECT_CALL(*gl_, DeleteTextures(1, _)) 1954 EXPECT_CALL(*gl_, DeleteTextures(1, _))
1955 .Times(1) 1955 .Times(1)
1956 .RetiresOnSaturation(); 1956 .RetiresOnSaturation();
1957 texture_manager1_->RemoveTexture(10); 1957 texture_manager1_->RemoveTexture(10);
1958 texture_manager2_->RemoveTexture(20); 1958 texture_manager2_->RemoveTexture(20);
1959 } 1959 }
1960 1960
1961 TEST_F(SharedTextureTest, FBOCompletenessCheck) { 1961 TEST_F(SharedTextureTest, FBOCompletenessCheck) {
1962 const GLenum kCompleteValue = GL_FRAMEBUFFER_COMPLETE; 1962 const GLenum kCompleteValue = GL_FRAMEBUFFER_COMPLETE;
1963 FramebufferManager framebuffer_manager1( 1963 FramebufferManager framebuffer_manager1(1, 1, CONTEXT_TYPE_OPENGLES2,
1964 1, 1, ContextGroup::CONTEXT_TYPE_UNDEFINED, NULL); 1964 nullptr);
1965 texture_manager1_->set_framebuffer_manager(&framebuffer_manager1); 1965 texture_manager1_->set_framebuffer_manager(&framebuffer_manager1);
1966 FramebufferManager framebuffer_manager2( 1966 FramebufferManager framebuffer_manager2(1, 1, CONTEXT_TYPE_OPENGLES2,
1967 1, 1, ContextGroup::CONTEXT_TYPE_UNDEFINED, NULL); 1967 nullptr);
1968 texture_manager2_->set_framebuffer_manager(&framebuffer_manager2); 1968 texture_manager2_->set_framebuffer_manager(&framebuffer_manager2);
1969 1969
1970 scoped_refptr<TextureRef> ref1 = texture_manager1_->CreateTexture(10, 10); 1970 scoped_refptr<TextureRef> ref1 = texture_manager1_->CreateTexture(10, 10);
1971 framebuffer_manager1.CreateFramebuffer(10, 10); 1971 framebuffer_manager1.CreateFramebuffer(10, 10);
1972 scoped_refptr<Framebuffer> framebuffer1 = 1972 scoped_refptr<Framebuffer> framebuffer1 =
1973 framebuffer_manager1.GetFramebuffer(10); 1973 framebuffer_manager1.GetFramebuffer(10);
1974 framebuffer1->AttachTexture( 1974 framebuffer1->AttachTexture(
1975 GL_COLOR_ATTACHMENT0, ref1.get(), GL_TEXTURE_2D, 0, 0); 1975 GL_COLOR_ATTACHMENT0, ref1.get(), GL_TEXTURE_2D, 0, 0);
1976 EXPECT_FALSE(framebuffer_manager1.IsComplete(framebuffer1.get())); 1976 EXPECT_FALSE(framebuffer_manager1.IsComplete(framebuffer1.get()));
1977 EXPECT_NE(kCompleteValue, framebuffer1->IsPossiblyComplete()); 1977 EXPECT_NE(kCompleteValue, framebuffer1->IsPossiblyComplete());
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
2343 ExpectValid(GL_DEPTH_COMPONENT, GL_FLOAT, GL_DEPTH_COMPONENT32F); 2343 ExpectValid(GL_DEPTH_COMPONENT, GL_FLOAT, GL_DEPTH_COMPONENT32F);
2344 ExpectValid(GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, GL_DEPTH24_STENCIL8); 2344 ExpectValid(GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, GL_DEPTH24_STENCIL8);
2345 ExpectValid(GL_DEPTH_STENCIL, GL_FLOAT_32_UNSIGNED_INT_24_8_REV, 2345 ExpectValid(GL_DEPTH_STENCIL, GL_FLOAT_32_UNSIGNED_INT_24_8_REV,
2346 GL_DEPTH32F_STENCIL8); 2346 GL_DEPTH32F_STENCIL8);
2347 2347
2348 ExpectInvalid(GL_RGB_INTEGER, GL_INT, GL_RGBA8); 2348 ExpectInvalid(GL_RGB_INTEGER, GL_INT, GL_RGBA8);
2349 } 2349 }
2350 2350
2351 } // namespace gles2 2351 } // namespace gles2
2352 } // namespace gpu 2352 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc ('k') | gpu/command_buffer/tests/es3_misc_functions_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698