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

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

Issue 23660006: FeatureInfo: Remove allowed_extensions and init workarounds early (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix android_webview build Created 7 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 | 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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 InSequence sequence; 112 InSequence sequence;
113 113
114 TestHelper::SetupContextGroupInitExpectations(gl_.get(), 114 TestHelper::SetupContextGroupInitExpectations(gl_.get(),
115 DisallowedFeatures(), extensions); 115 DisallowedFeatures(), extensions);
116 116
117 // We initialize the ContextGroup with a MockGLES2Decoder so that 117 // We initialize the ContextGroup with a MockGLES2Decoder so that
118 // we can use the ContextGroup to figure out how the real GLES2Decoder 118 // we can use the ContextGroup to figure out how the real GLES2Decoder
119 // will initialize itself. 119 // will initialize itself.
120 mock_decoder_.reset(new MockGLES2Decoder()); 120 mock_decoder_.reset(new MockGLES2Decoder());
121 EXPECT_TRUE( 121 EXPECT_TRUE(
122 group_->Initialize(mock_decoder_.get(), DisallowedFeatures(), NULL)); 122 group_->Initialize(mock_decoder_.get(), DisallowedFeatures()));
123 123
124 AddExpectationsForVertexAttribManager(); 124 AddExpectationsForVertexAttribManager();
125 125
126 AddExpectationsForBindVertexArrayOES(); 126 AddExpectationsForBindVertexArrayOES();
127 127
128 EXPECT_CALL(*gl_, EnableVertexAttribArray(0)) 128 EXPECT_CALL(*gl_, EnableVertexAttribArray(0))
129 .Times(1) 129 .Times(1)
130 .RetiresOnSaturation(); 130 .RetiresOnSaturation();
131 static GLuint attrib_0_id[] = { 131 static GLuint attrib_0_id[] = {
132 kServiceAttrib0BufferId, 132 kServiceAttrib0BufferId,
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 260
261 int32 attributes[] = { 261 int32 attributes[] = {
262 EGL_ALPHA_SIZE, request_alpha ? 8 : 0, 262 EGL_ALPHA_SIZE, request_alpha ? 8 : 0,
263 EGL_DEPTH_SIZE, request_depth ? 24 : 0, 263 EGL_DEPTH_SIZE, request_depth ? 24 : 0,
264 EGL_STENCIL_SIZE, request_stencil ? 8 : 0, 264 EGL_STENCIL_SIZE, request_stencil ? 8 : 0,
265 }; 265 };
266 std::vector<int32> attribs(attributes, attributes + arraysize(attributes)); 266 std::vector<int32> attribs(attributes, attributes + arraysize(attributes));
267 267
268 decoder_.reset(GLES2Decoder::Create(group_.get())); 268 decoder_.reset(GLES2Decoder::Create(group_.get()));
269 decoder_->GetLogger()->set_log_synthesized_gl_errors(false); 269 decoder_->GetLogger()->set_log_synthesized_gl_errors(false);
270 decoder_->Initialize( 270 decoder_->Initialize(surface_,
271 surface_, context_, false, surface_->GetSize(), DisallowedFeatures(), 271 context_,
272 NULL, attribs); 272 false,
273 surface_->GetSize(),
274 DisallowedFeatures(),
275 attribs);
273 decoder_->MakeCurrent(); 276 decoder_->MakeCurrent();
274 decoder_->set_engine(engine_.get()); 277 decoder_->set_engine(engine_.get());
275 278
276 EXPECT_CALL(*gl_, GenBuffersARB(_, _)) 279 EXPECT_CALL(*gl_, GenBuffersARB(_, _))
277 .WillOnce(SetArgumentPointee<1>(kServiceBufferId)) 280 .WillOnce(SetArgumentPointee<1>(kServiceBufferId))
278 .RetiresOnSaturation(); 281 .RetiresOnSaturation();
279 GenHelper<cmds::GenBuffersImmediate>(client_buffer_id_); 282 GenHelper<cmds::GenBuffersImmediate>(client_buffer_id_);
280 EXPECT_CALL(*gl_, GenFramebuffersEXT(_, _)) 283 EXPECT_CALL(*gl_, GenFramebuffersEXT(_, _))
281 .WillOnce(SetArgumentPointee<1>(kServiceFramebufferId)) 284 .WillOnce(SetArgumentPointee<1>(kServiceFramebufferId))
282 .RetiresOnSaturation(); 285 .RetiresOnSaturation();
(...skipping 1142 matching lines...) Expand 10 before | Expand all | Expand 10 after
1425 SetupDefaultProgram(); 1428 SetupDefaultProgram();
1426 } 1429 }
1427 1430
1428 // Include the auto-generated part of this file. We split this because it means 1431 // Include the auto-generated part of this file. We split this because it means
1429 // we can easily edit the non-auto generated parts right here in this file 1432 // we can easily edit the non-auto generated parts right here in this file
1430 // instead of having to edit some template or the code generator. 1433 // instead of having to edit some template or the code generator.
1431 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h" 1434 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h"
1432 1435
1433 } // namespace gles2 1436 } // namespace gles2
1434 } // namespace gpu 1437 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder_mock.h ('k') | gpu/command_buffer/service/in_process_command_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698