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

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

Issue 13957008: Merge 193302 "Force GPU switch with CGLSetVirtualScreen only for..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1453/src/
Patch Set: Created 7 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
« no previous file with comments | « gpu/command_buffer/service/framebuffer_manager.cc ('k') | gpu/command_buffer/service/gl_context_virtual.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/framebuffer_manager_unittest.cc
===================================================================
--- gpu/command_buffer/service/framebuffer_manager_unittest.cc (revision 194412)
+++ gpu/command_buffer/service/framebuffer_manager_unittest.cc (working copy)
@@ -678,6 +678,11 @@
framebuffer_->GetStatus(&texture_manager_, GL_FRAMEBUFFER);
// Check a second call for the same type does not call anything
+ if (!framebuffer_->AllowFramebufferComboCompleteMapForTesting()) {
+ EXPECT_CALL(*gl_, CheckFramebufferStatusEXT(GL_FRAMEBUFFER))
+ .WillOnce(Return(GL_FRAMEBUFFER_COMPLETE))
+ .RetiresOnSaturation();
+ }
framebuffer_->GetStatus(&texture_manager_, GL_FRAMEBUFFER);
// Check changing the attachments calls CheckFramebufferStatus.
@@ -689,6 +694,11 @@
framebuffer_->GetStatus(&texture_manager_, GL_FRAMEBUFFER);
// Check a second call for the same type does not call anything.
+ if (!framebuffer_->AllowFramebufferComboCompleteMapForTesting()) {
+ EXPECT_CALL(*gl_, CheckFramebufferStatusEXT(GL_FRAMEBUFFER))
+ .WillOnce(Return(GL_FRAMEBUFFER_COMPLETE))
+ .RetiresOnSaturation();
+ }
framebuffer_->GetStatus(&texture_manager_, GL_FRAMEBUFFER);
// Check a second call with a different target calls CheckFramebufferStatus.
@@ -698,6 +708,11 @@
framebuffer_->GetStatus(&texture_manager_, GL_READ_FRAMEBUFFER);
// Check a second call for the same type does not call anything.
+ if (!framebuffer_->AllowFramebufferComboCompleteMapForTesting()) {
+ EXPECT_CALL(*gl_, CheckFramebufferStatusEXT(GL_READ_FRAMEBUFFER))
+ .WillOnce(Return(GL_FRAMEBUFFER_COMPLETE))
+ .RetiresOnSaturation();
+ }
framebuffer_->GetStatus(&texture_manager_, GL_READ_FRAMEBUFFER);
// Check adding another attachment calls CheckFramebufferStatus.
@@ -708,6 +723,11 @@
framebuffer_->GetStatus(&texture_manager_, GL_READ_FRAMEBUFFER);
// Check a second call for the same type does not call anything.
+ if (!framebuffer_->AllowFramebufferComboCompleteMapForTesting()) {
+ EXPECT_CALL(*gl_, CheckFramebufferStatusEXT(GL_READ_FRAMEBUFFER))
+ .WillOnce(Return(GL_FRAMEBUFFER_COMPLETE))
+ .RetiresOnSaturation();
+ }
framebuffer_->GetStatus(&texture_manager_, GL_READ_FRAMEBUFFER);
// Check changing the format calls CheckFramebuffferStatus.
@@ -726,6 +746,11 @@
framebuffer_->GetStatus(&texture_manager_, GL_READ_FRAMEBUFFER);
// Check putting it back does not call CheckFramebufferStatus.
+ if (!framebuffer_->AllowFramebufferComboCompleteMapForTesting()) {
+ EXPECT_CALL(*gl_, CheckFramebufferStatusEXT(GL_READ_FRAMEBUFFER))
+ .WillOnce(Return(GL_FRAMEBUFFER_COMPLETE))
+ .RetiresOnSaturation();
+ }
TestHelper::SetTexParameterWithExpectations(
gl_.get(), decoder_.get(), &texture_manager_,
texture2, GL_TEXTURE_WRAP_S, GL_REPEAT, GL_NO_ERROR);
@@ -733,6 +758,11 @@
// Check Unbinding does not call CheckFramebufferStatus
framebuffer_->UnbindRenderbuffer(GL_RENDERBUFFER, renderbuffer1);
+ if (!framebuffer_->AllowFramebufferComboCompleteMapForTesting()) {
+ EXPECT_CALL(*gl_, CheckFramebufferStatusEXT(GL_READ_FRAMEBUFFER))
+ .WillOnce(Return(GL_FRAMEBUFFER_COMPLETE))
+ .RetiresOnSaturation();
+ }
framebuffer_->GetStatus(&texture_manager_, GL_READ_FRAMEBUFFER);
}
« no previous file with comments | « gpu/command_buffer/service/framebuffer_manager.cc ('k') | gpu/command_buffer/service/gl_context_virtual.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698