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

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: gn 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 1905 matching lines...) Expand 10 before | Expand all | Expand 10 after
1916 EXPECT_CALL(*gl_, DeleteTextures(1, _)) 1916 EXPECT_CALL(*gl_, DeleteTextures(1, _))
1917 .Times(1) 1917 .Times(1)
1918 .RetiresOnSaturation(); 1918 .RetiresOnSaturation();
1919 texture_manager1_->RemoveTexture(10); 1919 texture_manager1_->RemoveTexture(10);
1920 texture_manager2_->RemoveTexture(20); 1920 texture_manager2_->RemoveTexture(20);
1921 } 1921 }
1922 1922
1923 TEST_F(SharedTextureTest, FBOCompletenessCheck) { 1923 TEST_F(SharedTextureTest, FBOCompletenessCheck) {
1924 const GLenum kCompleteValue = GL_FRAMEBUFFER_COMPLETE; 1924 const GLenum kCompleteValue = GL_FRAMEBUFFER_COMPLETE;
1925 FramebufferManager framebuffer_manager1( 1925 FramebufferManager framebuffer_manager1(
1926 1, 1, ContextGroup::CONTEXT_TYPE_UNDEFINED, NULL); 1926 1, 1, ContextGroup::CONTEXT_TYPE_OPENGLES2, NULL);
1927 texture_manager1_->set_framebuffer_manager(&framebuffer_manager1); 1927 texture_manager1_->set_framebuffer_manager(&framebuffer_manager1);
1928 FramebufferManager framebuffer_manager2( 1928 FramebufferManager framebuffer_manager2(
1929 1, 1, ContextGroup::CONTEXT_TYPE_UNDEFINED, NULL); 1929 1, 1, ContextGroup::CONTEXT_TYPE_OPENGLES2, NULL);
1930 texture_manager2_->set_framebuffer_manager(&framebuffer_manager2); 1930 texture_manager2_->set_framebuffer_manager(&framebuffer_manager2);
1931 1931
1932 scoped_refptr<TextureRef> ref1 = texture_manager1_->CreateTexture(10, 10); 1932 scoped_refptr<TextureRef> ref1 = texture_manager1_->CreateTexture(10, 10);
1933 framebuffer_manager1.CreateFramebuffer(10, 10); 1933 framebuffer_manager1.CreateFramebuffer(10, 10);
1934 scoped_refptr<Framebuffer> framebuffer1 = 1934 scoped_refptr<Framebuffer> framebuffer1 =
1935 framebuffer_manager1.GetFramebuffer(10); 1935 framebuffer_manager1.GetFramebuffer(10);
1936 framebuffer1->AttachTexture( 1936 framebuffer1->AttachTexture(
1937 GL_COLOR_ATTACHMENT0, ref1.get(), GL_TEXTURE_2D, 0, 0); 1937 GL_COLOR_ATTACHMENT0, ref1.get(), GL_TEXTURE_2D, 0, 0);
1938 EXPECT_FALSE(framebuffer_manager1.IsComplete(framebuffer1.get())); 1938 EXPECT_FALSE(framebuffer_manager1.IsComplete(framebuffer1.get()));
1939 EXPECT_NE(kCompleteValue, framebuffer1->IsPossiblyComplete()); 1939 EXPECT_NE(kCompleteValue, framebuffer1->IsPossiblyComplete());
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
2312 ExpectValid(GL_DEPTH_COMPONENT, GL_FLOAT, GL_DEPTH_COMPONENT32F); 2312 ExpectValid(GL_DEPTH_COMPONENT, GL_FLOAT, GL_DEPTH_COMPONENT32F);
2313 ExpectValid(GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, GL_DEPTH24_STENCIL8); 2313 ExpectValid(GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, GL_DEPTH24_STENCIL8);
2314 ExpectValid(GL_DEPTH_STENCIL, GL_FLOAT_32_UNSIGNED_INT_24_8_REV, 2314 ExpectValid(GL_DEPTH_STENCIL, GL_FLOAT_32_UNSIGNED_INT_24_8_REV,
2315 GL_DEPTH32F_STENCIL8); 2315 GL_DEPTH32F_STENCIL8);
2316 2316
2317 ExpectInvalid(GL_RGB_INTEGER, GL_INT, GL_RGBA8); 2317 ExpectInvalid(GL_RGB_INTEGER, GL_INT, GL_RGBA8);
2318 } 2318 }
2319 2319
2320 } // namespace gles2 2320 } // namespace gles2
2321 } // namespace gpu 2321 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698