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

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

Issue 1095893002: gpu: Fix some context lost marking glitches+leaks and add UMA stats (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: kbr's comment Created 5 years, 8 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_drawing.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_drawing.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_drawing.cc
index fc5e2de2210635fd13febb3e0473920495c68be0..87e95b7e9f0c3098f614da6f7aeedb58b30eab26 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_drawing.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_drawing.cc
@@ -739,35 +739,6 @@ TEST_P(GLES2DecoderWithShaderTest, DrawArraysSimulatedAttrib0OOMFails) {
EXPECT_FALSE(GetDecoder()->WasContextLost());
}
-// Test that we lose context.
-TEST_P(GLES2DecoderManualInitTest, LoseContextWhenOOM) {
- InitState init;
- init.has_alpha = true;
- init.has_depth = true;
- init.request_alpha = true;
- init.request_depth = true;
- init.bind_generates_resource = true;
- init.lose_context_when_out_of_memory = true;
- InitDecoder(init);
- SetupDefaultProgram();
-
- const GLsizei kFakeLargeCount = 0x1234;
- SetupTexture();
- AddExpectationsForSimulatedAttrib0WithError(
- kFakeLargeCount, 0, GL_OUT_OF_MEMORY);
- EXPECT_CALL(*gl_, DrawArrays(_, _, _)).Times(0).RetiresOnSaturation();
- // Other contexts in the group should be lost also.
- EXPECT_CALL(*mock_decoder_, LoseContext(GL_UNKNOWN_CONTEXT_RESET_ARB))
- .Times(1)
- .RetiresOnSaturation();
- DrawArrays cmd;
- cmd.Init(GL_TRIANGLES, 0, kFakeLargeCount);
- // This context should be lost.
- EXPECT_EQ(error::kLostContext, ExecuteCmd(cmd));
- EXPECT_EQ(GL_OUT_OF_MEMORY, GetGLError());
- EXPECT_TRUE(decoder_->WasContextLost());
-}
-
TEST_P(GLES2DecoderWithShaderTest, DrawArraysBadTextureUsesBlack) {
DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId);
// This is an NPOT texture. As the default filtering requires mips
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder_unittest_context_lost.cc ('k') | gpu/command_buffer/tests/gl_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698