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/renderbuffer_manager.h" | 5 #include "gpu/command_buffer/service/renderbuffer_manager.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 #include "gpu/command_buffer/common/gles2_cmd_utils.h" | 10 #include "gpu/command_buffer/common/gles2_cmd_utils.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 class RenderbufferManagerTestBase : public GpuServiceTest { | 24 class RenderbufferManagerTestBase : public GpuServiceTest { |
25 public: | 25 public: |
26 static const GLint kMaxSize = 128; | 26 static const GLint kMaxSize = 128; |
27 static const GLint kMaxSamples = 4; | 27 static const GLint kMaxSamples = 4; |
28 | 28 |
29 protected: | 29 protected: |
30 void SetUpBase(MemoryTracker* memory_tracker, | 30 void SetUpBase(MemoryTracker* memory_tracker, |
31 bool depth24_supported, | 31 bool depth24_supported, |
32 bool use_gles) { | 32 bool use_gles) { |
33 GpuServiceTest::SetUp(); | 33 GpuServiceTest::SetUp(); |
34 feature_info_ = new FeatureInfo(); | 34 GpuDriverBugWorkarounds::Initialize(gpu_driver_bug_workarounds_); |
| 35 feature_info_ = new FeatureInfo(gpu_driver_bug_workarounds_); |
35 TestHelper::SetupFeatureInfoInitExpectationsWithGLVersion( | 36 TestHelper::SetupFeatureInfoInitExpectationsWithGLVersion( |
36 gl_.get(), | 37 gl_.get(), |
37 depth24_supported ? "GL_OES_depth24" : "", | 38 depth24_supported ? "GL_OES_depth24" : "", |
38 "", | 39 "", |
39 use_gles ? "OpenGL ES 2.0" : "2.1"); | 40 use_gles ? "OpenGL ES 2.0" : "2.1"); |
40 feature_info_->InitializeForTesting(); | 41 feature_info_->InitializeForTesting(); |
41 manager_.reset(new RenderbufferManager( | 42 manager_.reset(new RenderbufferManager( |
42 memory_tracker, kMaxSize, kMaxSamples, feature_info_.get())); | 43 memory_tracker, kMaxSize, kMaxSamples, feature_info_.get())); |
43 } | 44 } |
44 | 45 |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
331 TEST_F(RenderbufferManagerFormatNonGLESTest, UseUnsizedDepthFormatOnNonGLES) { | 332 TEST_F(RenderbufferManagerFormatNonGLESTest, UseUnsizedDepthFormatOnNonGLES) { |
332 GLenum impl_format = | 333 GLenum impl_format = |
333 manager_->InternalRenderbufferFormatToImplFormat(GL_DEPTH_COMPONENT16); | 334 manager_->InternalRenderbufferFormatToImplFormat(GL_DEPTH_COMPONENT16); |
334 EXPECT_EQ(static_cast<GLenum>(GL_DEPTH_COMPONENT), impl_format); | 335 EXPECT_EQ(static_cast<GLenum>(GL_DEPTH_COMPONENT), impl_format); |
335 } | 336 } |
336 | 337 |
337 } // namespace gles2 | 338 } // namespace gles2 |
338 } // namespace gpu | 339 } // namespace gpu |
339 | 340 |
340 | 341 |
OLD | NEW |