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

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

Issue 2291753002: Prevent crash when using getExtension while a PBO is bound. (Closed)
Patch Set: small corrections Created 4 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/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());
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
45 void TearDown() override { 46 void TearDown() override {
46 manager_->Destroy(true); 47 manager_->Destroy(true);
47 manager_.reset(); 48 manager_.reset();
48 GpuServiceTest::TearDown(); 49 GpuServiceTest::TearDown();
49 } 50 }
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/program_manager_unittest.cc ('k') | gpu/command_buffer/service/test_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698