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

Unified Diff: gpu/command_buffer/client/gles2_implementation_unittest.cc

Issue 634083002: gpu: Compositor management of GpuMemoryBuffer instances. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cc-pre-chromium-image-refactor
Patch Set: rebase Created 6 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/client/gles2_implementation_unittest.cc
diff --git a/gpu/command_buffer/client/gles2_implementation_unittest.cc b/gpu/command_buffer/client/gles2_implementation_unittest.cc
index 658b7e290cfd3b9f22bbaef0e7fc1fa6c3a2b852..b4e266777f8ddfaebaa135fdc367fd4b4226adef 100644
--- a/gpu/command_buffer/client/gles2_implementation_unittest.cc
+++ b/gpu/command_buffer/client/gles2_implementation_unittest.cc
@@ -3369,9 +3369,9 @@ TEST_F(GLES2ImplementationManualInitTest, LoseContextOnOOM) {
};
GLsizei max = std::numeric_limits<GLsizei>::max();
- EXPECT_CALL(*gpu_control_, CreateGpuMemoryBuffer(max, max, _, _, _))
- .WillOnce(Return(static_cast<gfx::GpuMemoryBuffer*>(NULL)));
- gl_->CreateImageCHROMIUM(max, max, 0, GL_IMAGE_MAP_CHROMIUM);
+ EXPECT_CALL(*gpu_control_, CreateGpuMemoryBufferImage(max, max, _, _))
+ .WillOnce(Return(-1));
+ gl_->CreateGpuMemoryBufferImageCHROMIUM(max, max, GL_RGBA, GL_MAP_CHROMIUM);
// The context should be lost.
Cmds expected;
expected.cmd.Init(GL_GUILTY_CONTEXT_RESET_ARB, GL_UNKNOWN_CONTEXT_RESET_ARB);
@@ -3387,9 +3387,9 @@ TEST_F(GLES2ImplementationManualInitTest, NoLoseContextOnOOM) {
};
GLsizei max = std::numeric_limits<GLsizei>::max();
- EXPECT_CALL(*gpu_control_, CreateGpuMemoryBuffer(max, max, _, _, _))
- .WillOnce(Return(static_cast<gfx::GpuMemoryBuffer*>(NULL)));
- gl_->CreateImageCHROMIUM(max, max, 0, GL_IMAGE_MAP_CHROMIUM);
+ EXPECT_CALL(*gpu_control_, CreateGpuMemoryBufferImage(max, max, _, _))
+ .WillOnce(Return(-1));
+ gl_->CreateGpuMemoryBufferImageCHROMIUM(max, max, GL_RGBA, GL_MAP_CHROMIUM);
// The context should not be lost.
EXPECT_TRUE(NoCommandsWritten());
}
« no previous file with comments | « gpu/command_buffer/client/gles2_implementation_autogen.h ('k') | gpu/command_buffer/client/gles2_interface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698