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

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

Issue 500243002: Remove implicit conversions from scoped_refptr to T* in gpu/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert silliness Created 6 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
« no previous file with comments | « gpu/command_buffer/service/texture_definition.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> 7 #include <utility>
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "gpu/command_buffer/service/error_state_mock.h" 10 #include "gpu/command_buffer/service/error_state_mock.h"
(...skipping 2083 matching lines...) Expand 10 before | Expand all | Expand 10 after
2094 target, 2094 target,
2095 0, 2095 0,
2096 GL_RGBA, 2096 GL_RGBA,
2097 0, 2097 0,
2098 0, 2098 0,
2099 1, 2099 1,
2100 0, 2100 0,
2101 GL_RGBA, 2101 GL_RGBA,
2102 GL_UNSIGNED_BYTE, 2102 GL_UNSIGNED_BYTE,
2103 true); 2103 true);
2104 manager_->SetLevelImage(texture_ref_.get(), target, 0, image); 2104 manager_->SetLevelImage(texture_ref_.get(), target, 0, image.get());
2105 GLuint service_id = texture->service_id(); 2105 GLuint service_id = texture->service_id();
2106 Texture* produced_texture = Produce(texture_ref_.get()); 2106 Texture* produced_texture = Produce(texture_ref_.get());
2107 2107
2108 GLuint client_id = texture2_->client_id(); 2108 GLuint client_id = texture2_->client_id();
2109 manager_->RemoveTexture(client_id); 2109 manager_->RemoveTexture(client_id);
2110 Consume(client_id, produced_texture); 2110 Consume(client_id, produced_texture);
2111 scoped_refptr<TextureRef> restored_texture = manager_->GetTexture(client_id); 2111 scoped_refptr<TextureRef> restored_texture = manager_->GetTexture(client_id);
2112 EXPECT_EQ(produced_texture, restored_texture->texture()); 2112 EXPECT_EQ(produced_texture, restored_texture->texture());
2113 EXPECT_EQ(service_id, restored_texture->service_id()); 2113 EXPECT_EQ(service_id, restored_texture->service_id());
2114 EXPECT_EQ(image.get(), restored_texture->texture()->GetLevelImage(target, 0)); 2114 EXPECT_EQ(image.get(), restored_texture->texture()->GetLevelImage(target, 0));
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
2500 2500
2501 EXPECT_CALL(*gl_, DeleteTextures(1, _)) 2501 EXPECT_CALL(*gl_, DeleteTextures(1, _))
2502 .Times(1) 2502 .Times(1)
2503 .RetiresOnSaturation(); 2503 .RetiresOnSaturation();
2504 texture_manager1_->RemoveTexture(10); 2504 texture_manager1_->RemoveTexture(10);
2505 texture_manager2_->RemoveTexture(20); 2505 texture_manager2_->RemoveTexture(20);
2506 } 2506 }
2507 2507
2508 } // namespace gles2 2508 } // namespace gles2
2509 } // namespace gpu 2509 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/texture_definition.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698