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/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 | 9 |
10 #include "base/string_number_conversions.h" | 10 #include "base/string_number_conversions.h" |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 int32 attributes[] = { | 192 int32 attributes[] = { |
193 EGL_ALPHA_SIZE, request_alpha ? 8 : 0, | 193 EGL_ALPHA_SIZE, request_alpha ? 8 : 0, |
194 EGL_DEPTH_SIZE, request_depth ? 24 : 0, | 194 EGL_DEPTH_SIZE, request_depth ? 24 : 0, |
195 EGL_STENCIL_SIZE, request_stencil ? 8 : 0, | 195 EGL_STENCIL_SIZE, request_stencil ? 8 : 0, |
196 }; | 196 }; |
197 std::vector<int32> attribs(attributes, attributes + arraysize(attributes)); | 197 std::vector<int32> attribs(attributes, attributes + arraysize(attributes)); |
198 | 198 |
199 decoder_.reset(GLES2Decoder::Create(group_.get())); | 199 decoder_.reset(GLES2Decoder::Create(group_.get())); |
200 decoder_->set_log_synthesized_gl_errors(false); | 200 decoder_->set_log_synthesized_gl_errors(false); |
201 decoder_->Initialize( | 201 decoder_->Initialize( |
202 surface_, context_, false, surface_->GetSize(), DisallowedFeatures(), | 202 surface_, context_, surface_->GetSize(), DisallowedFeatures(), |
203 NULL, attribs); | 203 NULL, attribs); |
204 decoder_->set_engine(engine_.get()); | 204 decoder_->set_engine(engine_.get()); |
205 | 205 |
206 EXPECT_CALL(*gl_, GenBuffersARB(_, _)) | 206 EXPECT_CALL(*gl_, GenBuffersARB(_, _)) |
207 .WillOnce(SetArgumentPointee<1>(kServiceBufferId)) | 207 .WillOnce(SetArgumentPointee<1>(kServiceBufferId)) |
208 .RetiresOnSaturation(); | 208 .RetiresOnSaturation(); |
209 GenHelper<GenBuffersImmediate>(client_buffer_id_); | 209 GenHelper<GenBuffersImmediate>(client_buffer_id_); |
210 EXPECT_CALL(*gl_, GenFramebuffersEXT(_, _)) | 210 EXPECT_CALL(*gl_, GenFramebuffersEXT(_, _)) |
211 .WillOnce(SetArgumentPointee<1>(kServiceFramebufferId)) | 211 .WillOnce(SetArgumentPointee<1>(kServiceFramebufferId)) |
212 .RetiresOnSaturation(); | 212 .RetiresOnSaturation(); |
(...skipping 970 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1183 num_vertices, buffer_id, GL_NO_ERROR); | 1183 num_vertices, buffer_id, GL_NO_ERROR); |
1184 } | 1184 } |
1185 | 1185 |
1186 void GLES2DecoderWithShaderTestBase::SetUp() { | 1186 void GLES2DecoderWithShaderTestBase::SetUp() { |
1187 GLES2DecoderTestBase::SetUp(); | 1187 GLES2DecoderTestBase::SetUp(); |
1188 SetupDefaultProgram(); | 1188 SetupDefaultProgram(); |
1189 } | 1189 } |
1190 | 1190 |
1191 } // namespace gles2 | 1191 } // namespace gles2 |
1192 } // namespace gpu | 1192 } // namespace gpu |
OLD | NEW |