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

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

Issue 1349783006: Cleanup: Pass std::string as const reference if possible (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert third_party changes 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 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 static const GLuint kClient1Id = 1; 474 static const GLuint kClient1Id = 1;
475 static const GLuint kService1Id = 11; 475 static const GLuint kService1Id = 11;
476 static const bool kUseDefaultTextures = false; 476 static const bool kUseDefaultTextures = false;
477 477
478 TextureTestBase() 478 TextureTestBase()
479 : feature_info_(new FeatureInfo()) { 479 : feature_info_(new FeatureInfo()) {
480 } 480 }
481 ~TextureTestBase() override { texture_ref_ = NULL; } 481 ~TextureTestBase() override { texture_ref_ = NULL; }
482 482
483 protected: 483 protected:
484 void SetUpBase(MemoryTracker* memory_tracker, std::string extensions) { 484 void SetUpBase(MemoryTracker* memory_tracker, const std::string& extensions) {
485 GpuServiceTest::SetUp(); 485 GpuServiceTest::SetUp();
486 if (!extensions.empty()) { 486 if (!extensions.empty()) {
487 TestHelper::SetupFeatureInfoInitExpectations(gl_.get(), 487 TestHelper::SetupFeatureInfoInitExpectations(gl_.get(),
488 extensions.c_str()); 488 extensions.c_str());
489 feature_info_->Initialize(); 489 feature_info_->Initialize();
490 } 490 }
491 491
492 manager_.reset(new TextureManager(memory_tracker, 492 manager_.reset(new TextureManager(memory_tracker,
493 feature_info_.get(), 493 feature_info_.get(),
494 kMaxTextureSize, 494 kMaxTextureSize,
(...skipping 1848 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

Powered by Google App Engine
This is Rietveld 408576698