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

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

Issue 375733004: Fixes for re-enabling more MSVC level 4 warnings: gpu/ edition (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
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 <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 client_query_id_(123), 96 client_query_id_(123),
97 client_vertexarray_id_(124), 97 client_vertexarray_id_(124),
98 service_renderbuffer_id_(0), 98 service_renderbuffer_id_(0),
99 service_renderbuffer_valid_(false), 99 service_renderbuffer_valid_(false),
100 ignore_cached_state_for_test_(GetParam()), 100 ignore_cached_state_for_test_(GetParam()),
101 cached_color_mask_red_(true), 101 cached_color_mask_red_(true),
102 cached_color_mask_green_(true), 102 cached_color_mask_green_(true),
103 cached_color_mask_blue_(true), 103 cached_color_mask_blue_(true),
104 cached_color_mask_alpha_(true), 104 cached_color_mask_alpha_(true),
105 cached_depth_mask_(true), 105 cached_depth_mask_(true),
106 cached_stencil_front_mask_(0xFFFFFFFFU), 106 cached_stencil_front_mask_(static_cast<GLuint>(-1)),
no sievers 2014/07/08 00:51:13 -1u?
107 cached_stencil_back_mask_(0xFFFFFFFFU) { 107 cached_stencil_back_mask_(static_cast<GLuint>(-1)) {
108 memset(immediate_buffer_, 0xEE, sizeof(immediate_buffer_)); 108 memset(immediate_buffer_, 0xEE, sizeof(immediate_buffer_));
109 } 109 }
110 110
111 GLES2DecoderTestBase::~GLES2DecoderTestBase() {} 111 GLES2DecoderTestBase::~GLES2DecoderTestBase() {}
112 112
113 void GLES2DecoderTestBase::SetUp() { 113 void GLES2DecoderTestBase::SetUp() {
114 InitState init; 114 InitState init;
115 init.gl_version = "3.0"; 115 init.gl_version = "3.0";
116 init.has_alpha = true; 116 init.has_alpha = true;
117 init.has_depth = true; 117 init.has_depth = true;
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after
723 } 723 }
724 } 724 }
725 725
726 void GLES2DecoderTestBase::SetupExpectationsForDepthMask(bool mask) { 726 void GLES2DecoderTestBase::SetupExpectationsForDepthMask(bool mask) {
727 if (ignore_cached_state_for_test_ || cached_depth_mask_ != mask) { 727 if (ignore_cached_state_for_test_ || cached_depth_mask_ != mask) {
728 cached_depth_mask_ = mask; 728 cached_depth_mask_ = mask;
729 EXPECT_CALL(*gl_, DepthMask(mask)).Times(1).RetiresOnSaturation(); 729 EXPECT_CALL(*gl_, DepthMask(mask)).Times(1).RetiresOnSaturation();
730 } 730 }
731 } 731 }
732 732
733 void GLES2DecoderTestBase::SetupExpectationsForStencilMask(uint32 front_mask, 733 void GLES2DecoderTestBase::SetupExpectationsForStencilMask(GLuint front_mask,
734 uint32 back_mask) { 734 GLuint back_mask) {
735 if (ignore_cached_state_for_test_ || 735 if (ignore_cached_state_for_test_ ||
736 cached_stencil_front_mask_ != front_mask) { 736 cached_stencil_front_mask_ != front_mask) {
737 cached_stencil_front_mask_ = front_mask; 737 cached_stencil_front_mask_ = front_mask;
738 EXPECT_CALL(*gl_, StencilMaskSeparate(GL_FRONT, front_mask)) 738 EXPECT_CALL(*gl_, StencilMaskSeparate(GL_FRONT, front_mask))
739 .Times(1) 739 .Times(1)
740 .RetiresOnSaturation(); 740 .RetiresOnSaturation();
741 } 741 }
742 742
743 if (ignore_cached_state_for_test_ || 743 if (ignore_cached_state_for_test_ ||
744 cached_stencil_back_mask_ != back_mask) { 744 cached_stencil_back_mask_ != back_mask) {
(...skipping 917 matching lines...) Expand 10 before | Expand all | Expand 10 after
1662 SetupDefaultProgram(); 1662 SetupDefaultProgram();
1663 } 1663 }
1664 1664
1665 // Include the auto-generated part of this file. We split this because it means 1665 // Include the auto-generated part of this file. We split this because it means
1666 // we can easily edit the non-auto generated parts right here in this file 1666 // we can easily edit the non-auto generated parts right here in this file
1667 // instead of having to edit some template or the code generator. 1667 // instead of having to edit some template or the code generator.
1668 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h" 1668 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h"
1669 1669
1670 } // namespace gles2 1670 } // namespace gles2
1671 } // namespace gpu 1671 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698