| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "gpu/command_buffer/service/error_state_mock.h" | 5 #include "gpu/command_buffer/service/error_state_mock.h" |
| 6 #include "gpu/command_buffer/service/framebuffer_manager.h" | 6 #include "gpu/command_buffer/service/framebuffer_manager.h" |
| 7 #include "gpu/command_buffer/service/feature_info.h" | 7 #include "gpu/command_buffer/service/feature_info.h" |
| 8 #include "gpu/command_buffer/service/renderbuffer_manager.h" | 8 #include "gpu/command_buffer/service/renderbuffer_manager.h" |
| 9 #include "gpu/command_buffer/service/test_helper.h" | 9 #include "gpu/command_buffer/service/test_helper.h" |
| 10 #include "gpu/command_buffer/service/texture_manager.h" | 10 #include "gpu/command_buffer/service/texture_manager.h" |
| (...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 428 EXPECT_EQ(static_cast<GLenum>(GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT), | 428 EXPECT_EQ(static_cast<GLenum>(GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT), |
| 429 framebuffer_->IsPossiblyComplete()); | 429 framebuffer_->IsPossiblyComplete()); |
| 430 | 430 |
| 431 texture_manager_.CreateTexture(kTextureClient1Id, kTextureService1Id); | 431 texture_manager_.CreateTexture(kTextureClient1Id, kTextureService1Id); |
| 432 scoped_refptr<TextureRef> texture1( | 432 scoped_refptr<TextureRef> texture1( |
| 433 texture_manager_.GetTexture(kTextureClient1Id)); | 433 texture_manager_.GetTexture(kTextureClient1Id)); |
| 434 ASSERT_TRUE(texture1.get() != NULL); | 434 ASSERT_TRUE(texture1.get() != NULL); |
| 435 | 435 |
| 436 // check adding one attachment | 436 // check adding one attachment |
| 437 framebuffer_->AttachTexture( | 437 framebuffer_->AttachTexture( |
| 438 GL_COLOR_ATTACHMENT0, texture1.get(), kTarget1, kLevel1); | 438 GL_COLOR_ATTACHMENT0, texture1.get(), kTarget1, kLevel1, kSamples1); |
| 439 EXPECT_FALSE(framebuffer_->HasUnclearedAttachment(GL_COLOR_ATTACHMENT0)); | 439 EXPECT_FALSE(framebuffer_->HasUnclearedAttachment(GL_COLOR_ATTACHMENT0)); |
| 440 EXPECT_EQ(static_cast<GLenum>(GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT), | 440 EXPECT_EQ(static_cast<GLenum>(GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT), |
| 441 framebuffer_->IsPossiblyComplete()); | 441 framebuffer_->IsPossiblyComplete()); |
| 442 EXPECT_TRUE(framebuffer_->IsCleared()); | 442 EXPECT_TRUE(framebuffer_->IsCleared()); |
| 443 EXPECT_EQ(static_cast<GLenum>(0), framebuffer_->GetColorAttachmentFormat()); | 443 EXPECT_EQ(static_cast<GLenum>(0), framebuffer_->GetColorAttachmentFormat()); |
| 444 | 444 |
| 445 // Try format that doesn't work with COLOR_ATTACHMENT0 | 445 // Try format that doesn't work with COLOR_ATTACHMENT0 |
| 446 texture_manager_.SetTarget(texture1.get(), GL_TEXTURE_2D); | 446 texture_manager_.SetTarget(texture1.get(), GL_TEXTURE_2D); |
| 447 texture_manager_.SetLevelInfo(texture1.get(), | 447 texture_manager_.SetLevelInfo(texture1.get(), |
| 448 GL_TEXTURE_2D, | 448 GL_TEXTURE_2D, |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 511 kFormat2, | 511 kFormat2, |
| 512 kWidth2, | 512 kWidth2, |
| 513 kHeight2, | 513 kHeight2, |
| 514 kDepth, | 514 kDepth, |
| 515 kBorder, | 515 kBorder, |
| 516 kFormat2, | 516 kFormat2, |
| 517 kType, | 517 kType, |
| 518 true); | 518 true); |
| 519 | 519 |
| 520 framebuffer_->AttachTexture( | 520 framebuffer_->AttachTexture( |
| 521 GL_COLOR_ATTACHMENT0, texture2.get(), kTarget2, kLevel2); | 521 GL_COLOR_ATTACHMENT0, texture2.get(), kTarget2, kLevel2, kSamples2); |
| 522 EXPECT_EQ(static_cast<GLenum>(kFormat2), | 522 EXPECT_EQ(static_cast<GLenum>(kFormat2), |
| 523 framebuffer_->GetColorAttachmentFormat()); | 523 framebuffer_->GetColorAttachmentFormat()); |
| 524 EXPECT_EQ(static_cast<GLenum>(GL_FRAMEBUFFER_COMPLETE), | 524 EXPECT_EQ(static_cast<GLenum>(GL_FRAMEBUFFER_COMPLETE), |
| 525 framebuffer_->IsPossiblyComplete()); | 525 framebuffer_->IsPossiblyComplete()); |
| 526 EXPECT_TRUE(framebuffer_->IsCleared()); | 526 EXPECT_TRUE(framebuffer_->IsCleared()); |
| 527 | 527 |
| 528 attachment = framebuffer_->GetAttachment(GL_COLOR_ATTACHMENT0); | 528 attachment = framebuffer_->GetAttachment(GL_COLOR_ATTACHMENT0); |
| 529 ASSERT_TRUE(attachment != NULL); | 529 ASSERT_TRUE(attachment != NULL); |
| 530 EXPECT_EQ(kWidth2, attachment->width()); | 530 EXPECT_EQ(kWidth2, attachment->width()); |
| 531 EXPECT_EQ(kHeight2, attachment->height()); | 531 EXPECT_EQ(kHeight2, attachment->height()); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 567 0, | 567 0, |
| 568 kDepth, | 568 kDepth, |
| 569 kBorder, | 569 kBorder, |
| 570 kFormat3, | 570 kFormat3, |
| 571 kType, | 571 kType, |
| 572 false); | 572 false); |
| 573 EXPECT_EQ(static_cast<GLenum>(GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT), | 573 EXPECT_EQ(static_cast<GLenum>(GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT), |
| 574 framebuffer_->IsPossiblyComplete()); | 574 framebuffer_->IsPossiblyComplete()); |
| 575 | 575 |
| 576 // Check removing it. | 576 // Check removing it. |
| 577 framebuffer_->AttachTexture(GL_COLOR_ATTACHMENT0, NULL, 0, 0); | 577 framebuffer_->AttachTexture(GL_COLOR_ATTACHMENT0, NULL, 0, 0, 0); |
| 578 EXPECT_TRUE(framebuffer_->GetAttachment(GL_COLOR_ATTACHMENT0) == NULL); | 578 EXPECT_TRUE(framebuffer_->GetAttachment(GL_COLOR_ATTACHMENT0) == NULL); |
| 579 EXPECT_EQ(static_cast<GLenum>(0), framebuffer_->GetColorAttachmentFormat()); | 579 EXPECT_EQ(static_cast<GLenum>(0), framebuffer_->GetColorAttachmentFormat()); |
| 580 | 580 |
| 581 EXPECT_EQ(static_cast<GLenum>(GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT), | 581 EXPECT_EQ(static_cast<GLenum>(GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT), |
| 582 framebuffer_->IsPossiblyComplete()); | 582 framebuffer_->IsPossiblyComplete()); |
| 583 EXPECT_TRUE(framebuffer_->IsCleared()); | 583 EXPECT_TRUE(framebuffer_->IsCleared()); |
| 584 } | 584 } |
| 585 | 585 |
| 586 TEST_F(FramebufferInfoTest, UnbindRenderbuffer) { | 586 TEST_F(FramebufferInfoTest, UnbindRenderbuffer) { |
| 587 const GLuint kRenderbufferClient1Id = 33; | 587 const GLuint kRenderbufferClient1Id = 33; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 618 EXPECT_TRUE(framebuffer_->GetAttachment(GL_DEPTH_ATTACHMENT) == NULL); | 618 EXPECT_TRUE(framebuffer_->GetAttachment(GL_DEPTH_ATTACHMENT) == NULL); |
| 619 } | 619 } |
| 620 | 620 |
| 621 TEST_F(FramebufferInfoTest, UnbindTexture) { | 621 TEST_F(FramebufferInfoTest, UnbindTexture) { |
| 622 const GLuint kTextureClient1Id = 33; | 622 const GLuint kTextureClient1Id = 33; |
| 623 const GLuint kTextureService1Id = 333; | 623 const GLuint kTextureService1Id = 333; |
| 624 const GLuint kTextureClient2Id = 34; | 624 const GLuint kTextureClient2Id = 34; |
| 625 const GLuint kTextureService2Id = 334; | 625 const GLuint kTextureService2Id = 334; |
| 626 const GLenum kTarget1 = GL_TEXTURE_2D; | 626 const GLenum kTarget1 = GL_TEXTURE_2D; |
| 627 const GLint kLevel1 = 0; | 627 const GLint kLevel1 = 0; |
| 628 const GLint kSamples1 = 0; |
| 628 | 629 |
| 629 texture_manager_.CreateTexture(kTextureClient1Id, kTextureService1Id); | 630 texture_manager_.CreateTexture(kTextureClient1Id, kTextureService1Id); |
| 630 scoped_refptr<TextureRef> texture1( | 631 scoped_refptr<TextureRef> texture1( |
| 631 texture_manager_.GetTexture(kTextureClient1Id)); | 632 texture_manager_.GetTexture(kTextureClient1Id)); |
| 632 ASSERT_TRUE(texture1.get() != NULL); | 633 ASSERT_TRUE(texture1.get() != NULL); |
| 633 texture_manager_.CreateTexture(kTextureClient2Id, kTextureService2Id); | 634 texture_manager_.CreateTexture(kTextureClient2Id, kTextureService2Id); |
| 634 scoped_refptr<TextureRef> texture2( | 635 scoped_refptr<TextureRef> texture2( |
| 635 texture_manager_.GetTexture(kTextureClient2Id)); | 636 texture_manager_.GetTexture(kTextureClient2Id)); |
| 636 ASSERT_TRUE(texture2.get() != NULL); | 637 ASSERT_TRUE(texture2.get() != NULL); |
| 637 | 638 |
| 638 // Attach to 2 attachment points. | 639 // Attach to 2 attachment points. |
| 639 framebuffer_->AttachTexture( | 640 framebuffer_->AttachTexture( |
| 640 GL_COLOR_ATTACHMENT0, texture1.get(), kTarget1, kLevel1); | 641 GL_COLOR_ATTACHMENT0, texture1.get(), kTarget1, kLevel1, kSamples1); |
| 641 framebuffer_->AttachTexture( | 642 framebuffer_->AttachTexture( |
| 642 GL_DEPTH_ATTACHMENT, texture1.get(), kTarget1, kLevel1); | 643 GL_DEPTH_ATTACHMENT, texture1.get(), kTarget1, kLevel1, kSamples1); |
| 643 // Check they were attached. | 644 // Check they were attached. |
| 644 EXPECT_TRUE(framebuffer_->GetAttachment(GL_COLOR_ATTACHMENT0) != NULL); | 645 EXPECT_TRUE(framebuffer_->GetAttachment(GL_COLOR_ATTACHMENT0) != NULL); |
| 645 EXPECT_TRUE(framebuffer_->GetAttachment(GL_DEPTH_ATTACHMENT) != NULL); | 646 EXPECT_TRUE(framebuffer_->GetAttachment(GL_DEPTH_ATTACHMENT) != NULL); |
| 646 // Unbind unattached texture. | 647 // Unbind unattached texture. |
| 647 framebuffer_->UnbindTexture(kTarget1, texture2.get()); | 648 framebuffer_->UnbindTexture(kTarget1, texture2.get()); |
| 648 // Should be no-op. | 649 // Should be no-op. |
| 649 EXPECT_TRUE(framebuffer_->GetAttachment(GL_COLOR_ATTACHMENT0) != NULL); | 650 EXPECT_TRUE(framebuffer_->GetAttachment(GL_COLOR_ATTACHMENT0) != NULL); |
| 650 EXPECT_TRUE(framebuffer_->GetAttachment(GL_DEPTH_ATTACHMENT) != NULL); | 651 EXPECT_TRUE(framebuffer_->GetAttachment(GL_DEPTH_ATTACHMENT) != NULL); |
| 651 // Unbind texture. | 652 // Unbind texture. |
| 652 framebuffer_->UnbindTexture(kTarget1, texture1.get()); | 653 framebuffer_->UnbindTexture(kTarget1, texture1.get()); |
| 653 // Check they were detached | 654 // Check they were detached |
| 654 EXPECT_TRUE(framebuffer_->GetAttachment(GL_COLOR_ATTACHMENT0) == NULL); | 655 EXPECT_TRUE(framebuffer_->GetAttachment(GL_COLOR_ATTACHMENT0) == NULL); |
| 655 EXPECT_TRUE(framebuffer_->GetAttachment(GL_DEPTH_ATTACHMENT) == NULL); | 656 EXPECT_TRUE(framebuffer_->GetAttachment(GL_DEPTH_ATTACHMENT) == NULL); |
| 656 } | 657 } |
| 657 | 658 |
| 658 TEST_F(FramebufferInfoTest, IsCompleteMarkAsComplete) { | 659 TEST_F(FramebufferInfoTest, IsCompleteMarkAsComplete) { |
| 659 const GLuint kRenderbufferClient1Id = 33; | 660 const GLuint kRenderbufferClient1Id = 33; |
| 660 const GLuint kRenderbufferService1Id = 333; | 661 const GLuint kRenderbufferService1Id = 333; |
| 661 const GLuint kTextureClient2Id = 34; | 662 const GLuint kTextureClient2Id = 34; |
| 662 const GLuint kTextureService2Id = 334; | 663 const GLuint kTextureService2Id = 334; |
| 663 const GLenum kTarget1 = GL_TEXTURE_2D; | 664 const GLenum kTarget1 = GL_TEXTURE_2D; |
| 664 const GLint kLevel1 = 0; | 665 const GLint kLevel1 = 0; |
| 666 const GLint kSamples1 = 0; |
| 665 | 667 |
| 666 renderbuffer_manager_.CreateRenderbuffer( | 668 renderbuffer_manager_.CreateRenderbuffer( |
| 667 kRenderbufferClient1Id, kRenderbufferService1Id); | 669 kRenderbufferClient1Id, kRenderbufferService1Id); |
| 668 Renderbuffer* renderbuffer1 = | 670 Renderbuffer* renderbuffer1 = |
| 669 renderbuffer_manager_.GetRenderbuffer(kRenderbufferClient1Id); | 671 renderbuffer_manager_.GetRenderbuffer(kRenderbufferClient1Id); |
| 670 ASSERT_TRUE(renderbuffer1 != NULL); | 672 ASSERT_TRUE(renderbuffer1 != NULL); |
| 671 texture_manager_.CreateTexture(kTextureClient2Id, kTextureService2Id); | 673 texture_manager_.CreateTexture(kTextureClient2Id, kTextureService2Id); |
| 672 scoped_refptr<TextureRef> texture2( | 674 scoped_refptr<TextureRef> texture2( |
| 673 texture_manager_.GetTexture(kTextureClient2Id)); | 675 texture_manager_.GetTexture(kTextureClient2Id)); |
| 674 ASSERT_TRUE(texture2.get() != NULL); | 676 ASSERT_TRUE(texture2.get() != NULL); |
| 675 | 677 |
| 676 // Check MarkAsComlete marks as complete. | 678 // Check MarkAsComlete marks as complete. |
| 677 manager_.MarkAsComplete(framebuffer_); | 679 manager_.MarkAsComplete(framebuffer_); |
| 678 EXPECT_TRUE(manager_.IsComplete(framebuffer_)); | 680 EXPECT_TRUE(manager_.IsComplete(framebuffer_)); |
| 679 | 681 |
| 680 // Check at attaching marks as not complete. | 682 // Check at attaching marks as not complete. |
| 681 framebuffer_->AttachTexture( | 683 framebuffer_->AttachTexture( |
| 682 GL_COLOR_ATTACHMENT0, texture2.get(), kTarget1, kLevel1); | 684 GL_COLOR_ATTACHMENT0, texture2.get(), kTarget1, kLevel1, kSamples1); |
| 683 EXPECT_FALSE(manager_.IsComplete(framebuffer_)); | 685 EXPECT_FALSE(manager_.IsComplete(framebuffer_)); |
| 684 manager_.MarkAsComplete(framebuffer_); | 686 manager_.MarkAsComplete(framebuffer_); |
| 685 EXPECT_TRUE(manager_.IsComplete(framebuffer_)); | 687 EXPECT_TRUE(manager_.IsComplete(framebuffer_)); |
| 686 framebuffer_->AttachRenderbuffer(GL_DEPTH_ATTACHMENT, renderbuffer1); | 688 framebuffer_->AttachRenderbuffer(GL_DEPTH_ATTACHMENT, renderbuffer1); |
| 687 EXPECT_FALSE(manager_.IsComplete(framebuffer_)); | 689 EXPECT_FALSE(manager_.IsComplete(framebuffer_)); |
| 688 | 690 |
| 689 // Check MarkAttachmentsAsCleared marks as complete. | 691 // Check MarkAttachmentsAsCleared marks as complete. |
| 690 manager_.MarkAttachmentsAsCleared( | 692 manager_.MarkAttachmentsAsCleared( |
| 691 framebuffer_, &renderbuffer_manager_, &texture_manager_); | 693 framebuffer_, &renderbuffer_manager_, &texture_manager_); |
| 692 EXPECT_TRUE(manager_.IsComplete(framebuffer_)); | 694 EXPECT_TRUE(manager_.IsComplete(framebuffer_)); |
| 693 | 695 |
| 694 // Check Unbind marks as not complete. | 696 // Check Unbind marks as not complete. |
| 695 framebuffer_->UnbindRenderbuffer(GL_RENDERBUFFER, renderbuffer1); | 697 framebuffer_->UnbindRenderbuffer(GL_RENDERBUFFER, renderbuffer1); |
| 696 EXPECT_FALSE(manager_.IsComplete(framebuffer_)); | 698 EXPECT_FALSE(manager_.IsComplete(framebuffer_)); |
| 697 manager_.MarkAsComplete(framebuffer_); | 699 manager_.MarkAsComplete(framebuffer_); |
| 698 EXPECT_TRUE(manager_.IsComplete(framebuffer_)); | 700 EXPECT_TRUE(manager_.IsComplete(framebuffer_)); |
| 699 framebuffer_->UnbindTexture(kTarget1, texture2.get()); | 701 framebuffer_->UnbindTexture(kTarget1, texture2.get()); |
| 700 EXPECT_FALSE(manager_.IsComplete(framebuffer_)); | 702 EXPECT_FALSE(manager_.IsComplete(framebuffer_)); |
| 701 } | 703 } |
| 702 | 704 |
| 703 TEST_F(FramebufferInfoTest, GetStatus) { | 705 TEST_F(FramebufferInfoTest, GetStatus) { |
| 704 const GLuint kRenderbufferClient1Id = 33; | 706 const GLuint kRenderbufferClient1Id = 33; |
| 705 const GLuint kRenderbufferService1Id = 333; | 707 const GLuint kRenderbufferService1Id = 333; |
| 706 const GLuint kTextureClient2Id = 34; | 708 const GLuint kTextureClient2Id = 34; |
| 707 const GLuint kTextureService2Id = 334; | 709 const GLuint kTextureService2Id = 334; |
| 708 const GLenum kTarget1 = GL_TEXTURE_2D; | 710 const GLenum kTarget1 = GL_TEXTURE_2D; |
| 709 const GLint kLevel1 = 0; | 711 const GLint kLevel1 = 0; |
| 712 const GLint kSamples1 = 0; |
| 710 | 713 |
| 711 renderbuffer_manager_.CreateRenderbuffer( | 714 renderbuffer_manager_.CreateRenderbuffer( |
| 712 kRenderbufferClient1Id, kRenderbufferService1Id); | 715 kRenderbufferClient1Id, kRenderbufferService1Id); |
| 713 Renderbuffer* renderbuffer1 = | 716 Renderbuffer* renderbuffer1 = |
| 714 renderbuffer_manager_.GetRenderbuffer(kRenderbufferClient1Id); | 717 renderbuffer_manager_.GetRenderbuffer(kRenderbufferClient1Id); |
| 715 ASSERT_TRUE(renderbuffer1 != NULL); | 718 ASSERT_TRUE(renderbuffer1 != NULL); |
| 716 texture_manager_.CreateTexture(kTextureClient2Id, kTextureService2Id); | 719 texture_manager_.CreateTexture(kTextureClient2Id, kTextureService2Id); |
| 717 scoped_refptr<TextureRef> texture2( | 720 scoped_refptr<TextureRef> texture2( |
| 718 texture_manager_.GetTexture(kTextureClient2Id)); | 721 texture_manager_.GetTexture(kTextureClient2Id)); |
| 719 ASSERT_TRUE(texture2.get() != NULL); | 722 ASSERT_TRUE(texture2.get() != NULL); |
| 720 texture_manager_.SetTarget(texture2.get(), GL_TEXTURE_2D); | 723 texture_manager_.SetTarget(texture2.get(), GL_TEXTURE_2D); |
| 721 | 724 |
| 722 EXPECT_CALL(*gl_, CheckFramebufferStatusEXT(GL_FRAMEBUFFER)) | 725 EXPECT_CALL(*gl_, CheckFramebufferStatusEXT(GL_FRAMEBUFFER)) |
| 723 .WillOnce(Return(GL_FRAMEBUFFER_COMPLETE)) | 726 .WillOnce(Return(GL_FRAMEBUFFER_COMPLETE)) |
| 724 .RetiresOnSaturation(); | 727 .RetiresOnSaturation(); |
| 725 framebuffer_->GetStatus(&texture_manager_, GL_FRAMEBUFFER); | 728 framebuffer_->GetStatus(&texture_manager_, GL_FRAMEBUFFER); |
| 726 | 729 |
| 727 // Check a second call for the same type does not call anything | 730 // Check a second call for the same type does not call anything |
| 728 if (!framebuffer_->AllowFramebufferComboCompleteMapForTesting()) { | 731 if (!framebuffer_->AllowFramebufferComboCompleteMapForTesting()) { |
| 729 EXPECT_CALL(*gl_, CheckFramebufferStatusEXT(GL_FRAMEBUFFER)) | 732 EXPECT_CALL(*gl_, CheckFramebufferStatusEXT(GL_FRAMEBUFFER)) |
| 730 .WillOnce(Return(GL_FRAMEBUFFER_COMPLETE)) | 733 .WillOnce(Return(GL_FRAMEBUFFER_COMPLETE)) |
| 731 .RetiresOnSaturation(); | 734 .RetiresOnSaturation(); |
| 732 } | 735 } |
| 733 framebuffer_->GetStatus(&texture_manager_, GL_FRAMEBUFFER); | 736 framebuffer_->GetStatus(&texture_manager_, GL_FRAMEBUFFER); |
| 734 | 737 |
| 735 // Check changing the attachments calls CheckFramebufferStatus. | 738 // Check changing the attachments calls CheckFramebufferStatus. |
| 736 framebuffer_->AttachTexture( | 739 framebuffer_->AttachTexture( |
| 737 GL_COLOR_ATTACHMENT0, texture2.get(), kTarget1, kLevel1); | 740 GL_COLOR_ATTACHMENT0, texture2.get(), kTarget1, kLevel1, kSamples1); |
| 738 EXPECT_CALL(*gl_, CheckFramebufferStatusEXT(GL_FRAMEBUFFER)) | 741 EXPECT_CALL(*gl_, CheckFramebufferStatusEXT(GL_FRAMEBUFFER)) |
| 739 .WillOnce(Return(GL_FRAMEBUFFER_COMPLETE)).RetiresOnSaturation(); | 742 .WillOnce(Return(GL_FRAMEBUFFER_COMPLETE)).RetiresOnSaturation(); |
| 740 framebuffer_->GetStatus(&texture_manager_, GL_FRAMEBUFFER); | 743 framebuffer_->GetStatus(&texture_manager_, GL_FRAMEBUFFER); |
| 741 | 744 |
| 742 // Check a second call for the same type does not call anything. | 745 // Check a second call for the same type does not call anything. |
| 743 if (!framebuffer_->AllowFramebufferComboCompleteMapForTesting()) { | 746 if (!framebuffer_->AllowFramebufferComboCompleteMapForTesting()) { |
| 744 EXPECT_CALL(*gl_, CheckFramebufferStatusEXT(GL_FRAMEBUFFER)) | 747 EXPECT_CALL(*gl_, CheckFramebufferStatusEXT(GL_FRAMEBUFFER)) |
| 745 .WillOnce(Return(GL_FRAMEBUFFER_COMPLETE)) | 748 .WillOnce(Return(GL_FRAMEBUFFER_COMPLETE)) |
| 746 .RetiresOnSaturation(); | 749 .RetiresOnSaturation(); |
| 747 } | 750 } |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 817 .WillOnce(Return(GL_FRAMEBUFFER_COMPLETE)) | 820 .WillOnce(Return(GL_FRAMEBUFFER_COMPLETE)) |
| 818 .RetiresOnSaturation(); | 821 .RetiresOnSaturation(); |
| 819 } | 822 } |
| 820 framebuffer_->GetStatus(&texture_manager_, GL_READ_FRAMEBUFFER); | 823 framebuffer_->GetStatus(&texture_manager_, GL_READ_FRAMEBUFFER); |
| 821 } | 824 } |
| 822 | 825 |
| 823 } // namespace gles2 | 826 } // namespace gles2 |
| 824 } // namespace gpu | 827 } // namespace gpu |
| 825 | 828 |
| 826 | 829 |
| OLD | NEW |