Index: gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc |
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc |
index 807d48853d7fbccbe7cbc92b8a95c819ebb4c670..07d1eaf2a4945b372d030ae4a557880bcb7f42de 100644 |
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc |
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc |
@@ -57,7 +57,6 @@ |
break; |
} |
} |
- |
if (init->use_native_vao) { |
if (contains_vao_extension) |
return; |
@@ -76,10 +75,6 @@ |
// Make sure we don't set up an invalid InitState. |
CHECK(!contains_vao_extension); |
} |
- |
- if (!init->extensions.empty()) |
- init->extensions += " "; |
- init->extensions += "GL_EXT_framebuffer_object "; |
} |
} // namespace Anonymous |
@@ -123,9 +118,7 @@ |
void GLES2DecoderTestBase::SetUp() { |
InitState init; |
- // Autogenerated tests do not overwrite version or extension string, |
- // so we have to pick something that supports everything here. |
- init.gl_version = "4.4"; |
+ init.gl_version = "3.0"; |
init.has_alpha = true; |
init.has_depth = true; |
init.request_alpha = true; |
@@ -143,9 +136,7 @@ |
} |
GLES2DecoderTestBase::InitState::InitState() |
- : extensions("GL_EXT_framebuffer_object"), |
- gl_version("2.1"), |
- has_alpha(false), |
+ : has_alpha(false), |
has_depth(false), |
has_stencil(false), |
request_alpha(false), |
@@ -165,9 +156,6 @@ |
const base::CommandLine* command_line) { |
InitState normalized_init = init; |
NormalizeInitState(&normalized_init); |
- // For easier substring/extension matching |
- DCHECK(normalized_init.extensions.empty() || |
- *normalized_init.extensions.rbegin() == ' '); |
Framebuffer::ClearFramebufferCompleteComboMap(); |
gfx::SetGLGetProcAddressProc(gfx::MockGLInterface::GetGLProcAddress); |
@@ -178,6 +166,9 @@ |
SetupMockGLBehaviors(); |
+ // Only create stream texture manager if extension is requested. |
+ std::vector<std::string> list; |
+ base::SplitString(normalized_init.extensions, ' ', &list); |
scoped_refptr<FeatureInfo> feature_info; |
if (command_line) |
feature_info = new FeatureInfo(*command_line); |
@@ -432,27 +423,15 @@ |
decoder_->set_unsafe_es3_apis_enabled(true); |
reset_unsafe_es3_apis_enabled = true; |
} |
- |
- const gfx::GLVersionInfo* version = context_->GetVersionInfo(); |
- if (version->IsAtLeastGL(3, 3) || version->IsAtLeastGLES(3, 0)) { |
- EXPECT_CALL(*gl_, GenSamplers(_, _)) |
- .WillOnce(SetArgumentPointee<1>(kServiceSamplerId)) |
- .RetiresOnSaturation(); |
- GenHelper<cmds::GenSamplersImmediate>(client_sampler_id_); |
- } |
- if (version->IsAtLeastGL(4, 0) || version->IsAtLeastGLES(3, 0)) { |
- EXPECT_CALL(*gl_, GenTransformFeedbacks(_, _)) |
- .WillOnce(SetArgumentPointee<1>(kServiceTransformFeedbackId)) |
- .RetiresOnSaturation(); |
- GenHelper<cmds::GenTransformFeedbacksImmediate>( |
- client_transformfeedback_id_); |
- } |
- |
- if (init.extensions.find("GL_ARB_sync ") != std::string::npos || |
- version->IsAtLeastGL(3, 2) || version->IsAtLeastGLES(3, 0)) { |
- DoFenceSync(client_sync_id_, kServiceSyncId); |
- } |
- |
+ EXPECT_CALL(*gl_, GenSamplers(_, _)) |
+ .WillOnce(SetArgumentPointee<1>(kServiceSamplerId)) |
+ .RetiresOnSaturation(); |
+ GenHelper<cmds::GenSamplersImmediate>(client_sampler_id_); |
+ EXPECT_CALL(*gl_, GenTransformFeedbacks(_, _)) |
+ .WillOnce(SetArgumentPointee<1>(kServiceTransformFeedbackId)) |
+ .RetiresOnSaturation(); |
+ GenHelper<cmds::GenTransformFeedbacksImmediate>(client_transformfeedback_id_); |
+ DoFenceSync(client_sync_id_, kServiceSyncId); |
if (reset_unsafe_es3_apis_enabled) { |
decoder_->set_unsafe_es3_apis_enabled(false); |
} |