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

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

Issue 13746002: Force GPU switch with CGLSetVirtualScreen only for compositor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Clean up branching mess 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
diff --git a/gpu/command_buffer/service/framebuffer_manager_unittest.cc b/gpu/command_buffer/service/framebuffer_manager_unittest.cc
index e1aedb2c377c5f01d63e65f7e6ebd73754642445..86bb87f347f00aa7e27f701174825c16b1e2de53 100644
--- a/gpu/command_buffer/service/framebuffer_manager_unittest.cc
+++ b/gpu/command_buffer/service/framebuffer_manager_unittest.cc
@@ -678,6 +678,11 @@ TEST_F(FramebufferInfoTest, GetStatus) {
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 @@ TEST_F(FramebufferInfoTest, GetStatus) {
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 @@ TEST_F(FramebufferInfoTest, GetStatus) {
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 @@ TEST_F(FramebufferInfoTest, GetStatus) {
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 @@ TEST_F(FramebufferInfoTest, GetStatus) {
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 @@ TEST_F(FramebufferInfoTest, GetStatus) {
// 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