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

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

Issue 2302323002: Reset PIXEL_UNPACK_BUFFER at texture manager initialization time (Closed)
Patch Set: update expectation 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 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 b4ce41f18c7e54b923fd40c3ef58603cd08f1499..0c400fb193c92f4ee216609318ba0050d950b11b 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc
@@ -232,6 +232,21 @@ void GLES2DecoderTestBase::InitDecoderWithCommandLine(
EXPECT_CALL(*mock_decoder_, DoCommands(_, _, _, _)).WillRepeatedly(
Invoke(mock_decoder_.get(), &MockGLES2Decoder::FakeDoCommands));
+ EXPECT_CALL(*gl_, GetString(GL_VERSION))
+ .WillOnce(Return(
+ reinterpret_cast<const uint8_t*>(
+ normalized_init.gl_version.c_str())))
+ .RetiresOnSaturation();
+ std::unique_ptr<gl::GLVersionInfo> version_info;
+ version_info.reset(
+ new gl::GLVersionInfo(normalized_init.gl_version.c_str(), "", ""));
+
+ if (version_info->IsAtLeastGL(3, 2) || version_info->IsAtLeastGLES(3, 0)) {
+ EXPECT_CALL(*gl_, BindBuffer(GL_PIXEL_UNPACK_BUFFER, 0))
+ .Times(1)
+ .RetiresOnSaturation();
+ }
+
EXPECT_TRUE(group_->Initialize(mock_decoder_.get(), init.context_type,
DisallowedFeatures()));

Powered by Google App Engine
This is Rietveld 408576698