OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |