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

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

Issue 2443553002: Create correct GLES3 context for GLES3 unittest (Closed)
Patch Set: remove context_type since it is equivalent to enable_es3 Created 4 years, 1 month 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/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 18 matching lines...) Expand all
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 feature_info_ = new FeatureInfo();
35 TestHelper::SetupFeatureInfoInitExpectationsWithGLVersion( 35 TestHelper::SetupFeatureInfoInitExpectationsWithGLVersion(
36 gl_.get(), 36 gl_.get(),
37 depth24_supported ? "GL_OES_depth24" : "", 37 depth24_supported ? "GL_OES_depth24" : "",
38 "", 38 "",
39 use_gles ? "OpenGL ES 2.0" : "2.1", 39 use_gles ? "OpenGL ES 2.0" : "2.1");
40 feature_info_->context_type());
41 feature_info_->InitializeForTesting(); 40 feature_info_->InitializeForTesting();
42 manager_.reset(new RenderbufferManager( 41 manager_.reset(new RenderbufferManager(
43 memory_tracker, kMaxSize, kMaxSamples, feature_info_.get())); 42 memory_tracker, kMaxSize, kMaxSamples, feature_info_.get()));
44 } 43 }
45 44
46 void TearDown() override { 45 void TearDown() override {
47 manager_->Destroy(true); 46 manager_->Destroy(true);
48 manager_.reset(); 47 manager_.reset();
49 GpuServiceTest::TearDown(); 48 GpuServiceTest::TearDown();
50 } 49 }
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 TEST_F(RenderbufferManagerFormatNonGLESTest, UseUnsizedDepthFormatOnNonGLES) { 331 TEST_F(RenderbufferManagerFormatNonGLESTest, UseUnsizedDepthFormatOnNonGLES) {
333 GLenum impl_format = 332 GLenum impl_format =
334 manager_->InternalRenderbufferFormatToImplFormat(GL_DEPTH_COMPONENT16); 333 manager_->InternalRenderbufferFormatToImplFormat(GL_DEPTH_COMPONENT16);
335 EXPECT_EQ(static_cast<GLenum>(GL_DEPTH_COMPONENT), impl_format); 334 EXPECT_EQ(static_cast<GLenum>(GL_DEPTH_COMPONENT), impl_format);
336 } 335 }
337 336
338 } // namespace gles2 337 } // namespace gles2
339 } // namespace gpu 338 } // namespace gpu
340 339
341 340
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698