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_0_autogen.h

Issue 2009073002: command_buffer: Guard on extension and profiles in the decoder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Check for GL errors in the unittest Created 4 years, 7 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_0_autogen.h
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h
index 0c5de16eb9429503777567cbdbc59765adcfbffc..98687453a8e4104de487fe52898875ecaf0a07e0 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h
@@ -35,6 +35,7 @@ void GLES2DecoderTestBase::SetupInitCapabilitiesExpectations(bool es3_capable) {
}
void GLES2DecoderTestBase::SetupInitStateExpectations(bool es3_capable) {
+ const auto& feature_info_ = group_->feature_info();
EXPECT_CALL(*gl_, BlendColor(0.0f, 0.0f, 0.0f, 0.0f))
.Times(1)
.RetiresOnSaturation();
@@ -64,22 +65,24 @@ void GLES2DecoderTestBase::SetupInitStateExpectations(bool es3_capable) {
EXPECT_CALL(*gl_, DepthMask(true)).Times(1).RetiresOnSaturation();
EXPECT_CALL(*gl_, DepthRange(0.0f, 1.0f)).Times(1).RetiresOnSaturation();
EXPECT_CALL(*gl_, FrontFace(GL_CCW)).Times(1).RetiresOnSaturation();
- EXPECT_CALL(*gl_, Hint(GL_GENERATE_MIPMAP_HINT, GL_DONT_CARE))
- .Times(1)
- .RetiresOnSaturation();
- if (group_->feature_info()->feature_flags().oes_standard_derivatives) {
+ if (!feature_info_->gl_version_info().is_desktop_core_profile) {
+ EXPECT_CALL(*gl_, Hint(GL_GENERATE_MIPMAP_HINT, GL_DONT_CARE))
+ .Times(1)
+ .RetiresOnSaturation();
+ }
+ if (feature_info_->feature_flags().oes_standard_derivatives) {
EXPECT_CALL(*gl_,
Hint(GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES, GL_DONT_CARE))
.Times(1)
.RetiresOnSaturation();
}
EXPECT_CALL(*gl_, LineWidth(1.0f)).Times(1).RetiresOnSaturation();
- if (group_->feature_info()->feature_flags().chromium_path_rendering) {
+ if (feature_info_->feature_flags().chromium_path_rendering) {
EXPECT_CALL(*gl_, MatrixLoadfEXT(GL_PATH_MODELVIEW_CHROMIUM, _))
.Times(1)
.RetiresOnSaturation();
}
- if (group_->feature_info()->feature_flags().chromium_path_rendering) {
+ if (feature_info_->feature_flags().chromium_path_rendering) {
EXPECT_CALL(*gl_, MatrixLoadfEXT(GL_PATH_PROJECTION_CHROMIUM, _))
.Times(1)
.RetiresOnSaturation();
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder_autogen.h ('k') | gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698