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

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

Issue 278653002: Reland r264914 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 7 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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 init.gl_version.c_str(), 148 init.gl_version.c_str(),
149 init.bind_generates_resource); 149 init.bind_generates_resource);
150 150
151 // We initialize the ContextGroup with a MockGLES2Decoder so that 151 // We initialize the ContextGroup with a MockGLES2Decoder so that
152 // we can use the ContextGroup to figure out how the real GLES2Decoder 152 // we can use the ContextGroup to figure out how the real GLES2Decoder
153 // will initialize itself. 153 // will initialize itself.
154 mock_decoder_.reset(new MockGLES2Decoder()); 154 mock_decoder_.reset(new MockGLES2Decoder());
155 EXPECT_TRUE( 155 EXPECT_TRUE(
156 group_->Initialize(mock_decoder_.get(), DisallowedFeatures())); 156 group_->Initialize(mock_decoder_.get(), DisallowedFeatures()));
157 157
158 if (group_->feature_info()->feature_flags().native_vertex_array_object) {
159 EXPECT_CALL(*gl_, GenVertexArraysOES(1, _)).Times(1).RetiresOnSaturation();
160 EXPECT_CALL(*gl_, BindVertexArrayOES(_)).Times(1).RetiresOnSaturation();
161 }
162
158 if (group_->feature_info()->workarounds().init_vertex_attributes) 163 if (group_->feature_info()->workarounds().init_vertex_attributes)
159 AddExpectationsForVertexAttribManager(); 164 AddExpectationsForVertexAttribManager();
160 165
161 AddExpectationsForBindVertexArrayOES(); 166 AddExpectationsForBindVertexArrayOES();
162 167
163 EXPECT_CALL(*gl_, EnableVertexAttribArray(0)) 168 EXPECT_CALL(*gl_, EnableVertexAttribArray(0))
164 .Times(1) 169 .Times(1)
165 .RetiresOnSaturation(); 170 .RetiresOnSaturation();
166 static GLuint attrib_0_id[] = { 171 static GLuint attrib_0_id[] = {
167 kServiceAttrib0BufferId, 172 kServiceAttrib0BufferId,
(...skipping 1386 matching lines...) Expand 10 before | Expand all | Expand 10 after
1554 SetupDefaultProgram(); 1559 SetupDefaultProgram();
1555 } 1560 }
1556 1561
1557 // Include the auto-generated part of this file. We split this because it means 1562 // Include the auto-generated part of this file. We split this because it means
1558 // we can easily edit the non-auto generated parts right here in this file 1563 // we can easily edit the non-auto generated parts right here in this file
1559 // instead of having to edit some template or the code generator. 1564 // instead of having to edit some template or the code generator.
1560 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h" 1565 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h"
1561 1566
1562 } // namespace gles2 1567 } // namespace gles2
1563 } // namespace gpu 1568 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | gpu/command_buffer/service/vertex_array_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698