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

Unified Diff: gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc

Issue 2445323006: command buffer: remove "unsafe" from autogenerated ES3 apis; cleanly separate ES3 tests (Closed)
Patch Set: address comment Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
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 5e5dcfbb20c1d14595bbd795382e50ca0d4d80ec..4a2fe99b5af1cbf15c27ec80be3fec5b92dfebf1 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc
@@ -509,37 +509,22 @@ void GLES2DecoderTestBase::InitDecoderWithCommandLine(
DoCreateProgram(client_program_id_, kServiceProgramId);
DoCreateShader(GL_VERTEX_SHADER, client_shader_id_, kServiceShaderId);
- // Unsafe commands.
- bool reset_unsafe_es3_apis_enabled = false;
- if (!decoder_->unsafe_es3_apis_enabled()) {
- decoder_->set_unsafe_es3_apis_enabled(true);
- reset_unsafe_es3_apis_enabled = true;
- }
-
- const gl::GLVersionInfo* version = context_->GetVersionInfo();
- if (version->IsAtLeastGL(3, 3) || version->IsAtLeastGLES(3, 0)) {
+ if (init.context_type == CONTEXT_TYPE_WEBGL2 ||
+ init.context_type == CONTEXT_TYPE_OPENGLES3) {
EXPECT_CALL(*gl_, GenSamplers(_, _))
.WillOnce(SetArgPointee<1>(kServiceSamplerId))
.RetiresOnSaturation();
GenHelper<cmds::GenSamplersImmediate>(client_sampler_id_);
- }
- if (version->IsAtLeastGL(4, 0) || version->IsAtLeastGLES(3, 0)) {
+
EXPECT_CALL(*gl_, GenTransformFeedbacks(_, _))
.WillOnce(SetArgPointee<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);
}
- if (reset_unsafe_es3_apis_enabled) {
- decoder_->set_unsafe_es3_apis_enabled(false);
- }
-
EXPECT_EQ(GL_NO_ERROR, GetGLError());
}
@@ -562,8 +547,7 @@ void GLES2DecoderTestBase::ResetDecoder() {
.Times(1)
.RetiresOnSaturation();
}
- if (group_->feature_info()->gl_version_info().IsAtLeastGL(4, 0) ||
- group_->feature_info()->gl_version_info().IsAtLeastGLES(3, 0)) {
+ if (group_->feature_info()->IsWebGL2OrES3Context()) {
// |client_transformfeedback_id_|
EXPECT_CALL(*gl_, DeleteTransformFeedbacks(1, _))
.Times(1)

Powered by Google App Engine
This is Rietveld 408576698