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

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

Issue 342993005: Fix parameter type for glGenTextures. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 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
« no previous file with comments | « gpu/command_buffer/service/texture_manager.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
8
7 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
8 #include "gpu/command_buffer/service/error_state_mock.h" 10 #include "gpu/command_buffer/service/error_state_mock.h"
9 #include "gpu/command_buffer/service/feature_info.h" 11 #include "gpu/command_buffer/service/feature_info.h"
10 #include "gpu/command_buffer/service/framebuffer_manager.h" 12 #include "gpu/command_buffer/service/framebuffer_manager.h"
11 #include "gpu/command_buffer/service/gles2_cmd_decoder_mock.h" 13 #include "gpu/command_buffer/service/gles2_cmd_decoder_mock.h"
12 #include "gpu/command_buffer/service/gpu_service_test.h" 14 #include "gpu/command_buffer/service/gpu_service_test.h"
13 #include "gpu/command_buffer/service/mailbox_manager.h" 15 #include "gpu/command_buffer/service/mailbox_manager.h"
14 #include "gpu/command_buffer/service/memory_tracking.h" 16 #include "gpu/command_buffer/service/memory_tracking.h"
15 #include "gpu/command_buffer/service/mocks.h" 17 #include "gpu/command_buffer/service/mocks.h"
16 #include "gpu/command_buffer/service/test_helper.h" 18 #include "gpu/command_buffer/service/test_helper.h"
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 manager.Initialize(); 213 manager.Initialize();
212 const GLuint kClient1Id = 1; 214 const GLuint kClient1Id = 1;
213 const GLuint kService1Id = 11; 215 const GLuint kService1Id = 11;
214 // Check we can create texture. 216 // Check we can create texture.
215 manager.CreateTexture(kClient1Id, kService1Id); 217 manager.CreateTexture(kClient1Id, kService1Id);
216 // Check texture got created. 218 // Check texture got created.
217 TextureRef* texture_ref = manager.GetTexture(kClient1Id); 219 TextureRef* texture_ref = manager.GetTexture(kClient1Id);
218 ASSERT_TRUE(texture_ref != NULL); 220 ASSERT_TRUE(texture_ref != NULL);
219 TestHelper::SetTexParameteriWithExpectations( 221 TestHelper::SetTexParameteriWithExpectations(
220 gl_.get(), error_state_.get(), &manager, texture_ref, 222 gl_.get(), error_state_.get(), &manager, texture_ref,
221 GL_TEXTURE_USAGE_ANGLE, GL_FRAMEBUFFER_ATTACHMENT_ANGLE,GL_NO_ERROR); 223 GL_TEXTURE_USAGE_ANGLE, GL_FRAMEBUFFER_ATTACHMENT_ANGLE, GL_NO_ERROR);
222 EXPECT_EQ(static_cast<GLenum>(GL_FRAMEBUFFER_ATTACHMENT_ANGLE), 224 EXPECT_EQ(static_cast<GLenum>(GL_FRAMEBUFFER_ATTACHMENT_ANGLE),
223 texture_ref->texture()->usage()); 225 texture_ref->texture()->usage());
224 manager.Destroy(false); 226 manager.Destroy(false);
225 } 227 }
226 228
227 TEST_F(TextureManagerTest, Destroy) { 229 TEST_F(TextureManagerTest, Destroy) {
228 const GLuint kClient1Id = 1; 230 const GLuint kClient1Id = 1;
229 const GLuint kService1Id = 11; 231 const GLuint kService1Id = 11;
230 TestHelper::SetupTextureManagerInitExpectations( 232 TestHelper::SetupTextureManagerInitExpectations(
231 gl_.get(), "", kUseDefaultTextures); 233 gl_.get(), "", kUseDefaultTextures);
(...skipping 2274 matching lines...) Expand 10 before | Expand all | Expand 10 after
2506 2508
2507 EXPECT_CALL(*gl_, DeleteTextures(1, _)) 2509 EXPECT_CALL(*gl_, DeleteTextures(1, _))
2508 .Times(1) 2510 .Times(1)
2509 .RetiresOnSaturation(); 2511 .RetiresOnSaturation();
2510 texture_manager1_->RemoveTexture(10); 2512 texture_manager1_->RemoveTexture(10);
2511 texture_manager2_->RemoveTexture(20); 2513 texture_manager2_->RemoveTexture(20);
2512 } 2514 }
2513 2515
2514 } // namespace gles2 2516 } // namespace gles2
2515 } // namespace gpu 2517 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/texture_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698