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

Side by Side Diff: gpu/command_buffer/service/program_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/program_manager.h" 5 #include "gpu/command_buffer/service/program_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 kMaxDrawBuffers, 63 kMaxDrawBuffers,
64 kMaxDualSourceDrawBuffers, 64 kMaxDualSourceDrawBuffers,
65 kMaxVertexAttribs, 65 kMaxVertexAttribs,
66 gpu_preferences_, 66 gpu_preferences_,
67 feature_info_.get())); 67 feature_info_.get()));
68 } 68 }
69 void SetUpBase(const char* gl_version, 69 void SetUpBase(const char* gl_version,
70 const char* gl_extensions, 70 const char* gl_extensions,
71 FeatureInfo* feature_info = nullptr) { 71 FeatureInfo* feature_info = nullptr) {
72 GpuServiceTest::SetUpWithGLVersion(gl_version, gl_extensions); 72 GpuServiceTest::SetUpWithGLVersion(gl_version, gl_extensions);
73 TestHelper::SetupFeatureInfoInitExpectationsWithGLVersion(
74 gl_.get(), gl_extensions, "", gl_version);
75 if (!feature_info) 73 if (!feature_info)
76 feature_info = new FeatureInfo(); 74 feature_info = new FeatureInfo();
75 TestHelper::SetupFeatureInfoInitExpectationsWithGLVersion(
76 gl_.get(), gl_extensions, "", gl_version, feature_info->context_type());
77 feature_info->InitializeForTesting(); 77 feature_info->InitializeForTesting();
78 feature_info_ = feature_info; 78 feature_info_ = feature_info;
79 SetupProgramManager(); 79 SetupProgramManager();
80 } 80 }
81 void SetUp() override { 81 void SetUp() override {
82 // Parameters same as GpuServiceTest::SetUp 82 // Parameters same as GpuServiceTest::SetUp
83 SetUpBase("2.0", "GL_EXT_framebuffer_object"); 83 SetUpBase("2.0", "GL_EXT_framebuffer_object");
84 } 84 }
85 void TearDown() override { 85 void TearDown() override {
86 manager_->Destroy(false); 86 manager_->Destroy(false);
(...skipping 2434 matching lines...) Expand 10 before | Expand all | Expand 10 after
2521 ProgramManagerDualSourceBlendingES2Test, 2521 ProgramManagerDualSourceBlendingES2Test,
2522 testing::Values( 2522 testing::Values(
2523 make_gl_ext_tuple("3.2", 2523 make_gl_ext_tuple("3.2",
2524 "GL_ARB_draw_buffers GL_ARB_blend_func_extended " 2524 "GL_ARB_draw_buffers GL_ARB_blend_func_extended "
2525 "GL_ARB_program_interface_query"), 2525 "GL_ARB_program_interface_query"),
2526 make_gl_ext_tuple("opengl es 3.1", 2526 make_gl_ext_tuple("opengl es 3.1",
2527 "GL_EXT_draw_buffers GL_EXT_blend_func_extended"))); 2527 "GL_EXT_draw_buffers GL_EXT_blend_func_extended")));
2528 2528
2529 } // namespace gles2 2529 } // namespace gles2
2530 } // namespace gpu 2530 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698