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

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc

Issue 2351093002: Fix crash in BlitFramebufferCHROMIUM if a read or draw depth/stencil buffer is not present (Closed)
Patch Set: rebase Created 4 years, 3 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 unified diff | Download patch
OLDNEW
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/gles2_cmd_decoder_unittest_base.h" 5 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 814 matching lines...) Expand 10 before | Expand all | Expand 10 after
825 if ((clear_bits & GL_COLOR_BUFFER_BIT) != 0) { 825 if ((clear_bits & GL_COLOR_BUFFER_BIT) != 0) {
826 EXPECT_CALL(*gl_, ClearColor(0.0f, 0.0f, 0.0f, 0.0f)) 826 EXPECT_CALL(*gl_, ClearColor(0.0f, 0.0f, 0.0f, 0.0f))
827 .Times(1) 827 .Times(1)
828 .RetiresOnSaturation(); 828 .RetiresOnSaturation();
829 SetupExpectationsForColorMask(true, true, true, true); 829 SetupExpectationsForColorMask(true, true, true, true);
830 } 830 }
831 if ((clear_bits & GL_STENCIL_BUFFER_BIT) != 0) { 831 if ((clear_bits & GL_STENCIL_BUFFER_BIT) != 0) {
832 EXPECT_CALL(*gl_, ClearStencil(0)) 832 EXPECT_CALL(*gl_, ClearStencil(0))
833 .Times(1) 833 .Times(1)
834 .RetiresOnSaturation(); 834 .RetiresOnSaturation();
835 EXPECT_CALL(*gl_, StencilMask(static_cast<GLuint>(-1))) 835 SetupExpectationsForStencilMask(static_cast<GLuint>(-1),
836 .Times(1) 836 static_cast<GLuint>(-1));
837 .RetiresOnSaturation();
838 } 837 }
839 if ((clear_bits & GL_DEPTH_BUFFER_BIT) != 0) { 838 if ((clear_bits & GL_DEPTH_BUFFER_BIT) != 0) {
840 EXPECT_CALL(*gl_, ClearDepth(1.0f)) 839 EXPECT_CALL(*gl_, ClearDepth(1.0f))
841 .Times(1) 840 .Times(1)
842 .RetiresOnSaturation(); 841 .RetiresOnSaturation();
843 SetupExpectationsForDepthMask(true); 842 SetupExpectationsForDepthMask(true);
844 } 843 }
845 SetupExpectationsForEnableDisable(GL_SCISSOR_TEST, false); 844 SetupExpectationsForEnableDisable(GL_SCISSOR_TEST, false);
846 EXPECT_CALL(*gl_, Clear(clear_bits)) 845 EXPECT_CALL(*gl_, Clear(clear_bits))
847 .Times(1) 846 .Times(1)
(...skipping 1276 matching lines...) Expand 10 before | Expand all | Expand 10 after
2124 SetupDefaultProgram(); 2123 SetupDefaultProgram();
2125 } 2124 }
2126 2125
2127 // Include the auto-generated part of this file. We split this because it means 2126 // Include the auto-generated part of this file. We split this because it means
2128 // we can easily edit the non-auto generated parts right here in this file 2127 // we can easily edit the non-auto generated parts right here in this file
2129 // instead of having to edit some template or the code generator. 2128 // instead of having to edit some template or the code generator.
2130 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h" 2129 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h"
2131 2130
2132 } // namespace gles2 2131 } // namespace gles2
2133 } // namespace gpu 2132 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | gpu/command_buffer/service/gles2_cmd_decoder_unittest_framebuffers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698