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

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

Issue 6512012: Fix small incompatibility issues with Visual Studio 2010.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 10 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
« no previous file with comments | « no previous file | views/focus/focus_manager_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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.h" 5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h"
6 6
7 #include "gpu/command_buffer/common/gles2_cmd_format.h" 7 #include "gpu/command_buffer/common/gles2_cmd_format.h"
8 #include "gpu/command_buffer/common/gles2_cmd_utils.h" 8 #include "gpu/command_buffer/common/gles2_cmd_utils.h"
9 #include "gpu/command_buffer/common/gl_mock.h" 9 #include "gpu/command_buffer/common/gl_mock.h"
10 #include "gpu/command_buffer/common/id_allocator.h" 10 #include "gpu/command_buffer/common/id_allocator.h"
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); 230 EXPECT_EQ(GL_INVALID_OPERATION, GetGLError());
231 EXPECT_EQ(GL_NO_ERROR, GetGLError()); 231 EXPECT_EQ(GL_NO_ERROR, GetGLError());
232 232
233 // Try with size > 2 (ie, vec3 instead of vec2) 233 // Try with size > 2 (ie, vec3 instead of vec2)
234 DoVertexAttribPointer(1, 3, GL_FLOAT, 0, 0); 234 DoVertexAttribPointer(1, 3, GL_FLOAT, 0, 0);
235 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); 235 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
236 EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); 236 EXPECT_EQ(GL_INVALID_OPERATION, GetGLError());
237 EXPECT_EQ(GL_NO_ERROR, GetGLError()); 237 EXPECT_EQ(GL_NO_ERROR, GetGLError());
238 238
239 // Try with stride > 8 (vec2 + vec2 byte) 239 // Try with stride > 8 (vec2 + vec2 byte)
240 GLfloat f; 240 DoVertexAttribPointer(1, 2, GL_FLOAT, sizeof(GLfloat) * 3, 0);
241 DoVertexAttribPointer(1, 2, GL_FLOAT, sizeof(f) * 2 + sizeof(f), 0);
242 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); 241 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
243 EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); 242 EXPECT_EQ(GL_INVALID_OPERATION, GetGLError());
244 EXPECT_EQ(GL_NO_ERROR, GetGLError()); 243 EXPECT_EQ(GL_NO_ERROR, GetGLError());
245 } 244 }
246 245
247 TEST_F(GLES2DecoderWithShaderTest, DrawElementsNoAttributesSucceeds) { 246 TEST_F(GLES2DecoderWithShaderTest, DrawElementsNoAttributesSucceeds) {
248 SetupTexture(); 247 SetupTexture();
249 SetupIndexBuffer(); 248 SetupIndexBuffer();
250 AddExpectationsForSimulatedAttrib0(kMaxValidIndex + 1, 0); 249 AddExpectationsForSimulatedAttrib0(kMaxValidIndex + 1, 0);
251 EXPECT_CALL(*gl_, DrawElements(GL_TRIANGLES, kValidIndexRangeCount, 250 EXPECT_CALL(*gl_, DrawElements(GL_TRIANGLES, kValidIndexRangeCount,
(...skipping 2573 matching lines...) Expand 10 before | Expand all | Expand 10 after
2825 // TODO(gman): TexImage2DImmediate 2824 // TODO(gman): TexImage2DImmediate
2826 2825
2827 // TODO(gman): TexSubImage2DImmediate 2826 // TODO(gman): TexSubImage2DImmediate
2828 2827
2829 // TODO(gman): UseProgram 2828 // TODO(gman): UseProgram
2830 2829
2831 // TODO(gman): SwapBuffers 2830 // TODO(gman): SwapBuffers
2832 2831
2833 } // namespace gles2 2832 } // namespace gles2
2834 } // namespace gpu 2833 } // namespace gpu
OLDNEW
« no previous file with comments | « no previous file | views/focus/focus_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698