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

Side by Side Diff: gpu/command_buffer/common/gles2_cmd_format_test_autogen.h

Issue 11568029: Add a command to lose the context (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add docs, lose parent and children, fix typo Created 8 years 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 // This file is auto-generated from 5 // This file is auto-generated from
6 // gpu/command_buffer/build_gles2_cmd_buffer.py 6 // gpu/command_buffer/build_gles2_cmd_buffer.py
7 // DO NOT EDIT! 7 // DO NOT EDIT!
8 8
9 // This file contains unit tests for gles2 commmands 9 // This file contains unit tests for gles2 commmands
10 // It is included by gles2_cmd_format_test.cc 10 // It is included by gles2_cmd_format_test.cc
(...skipping 4346 matching lines...) Expand 10 before | Expand all | Expand 10 after
4357 cmd.header.command); 4357 cmd.header.command);
4358 EXPECT_EQ(kExpectedCmdSize, cmd.header.size * 4u); 4358 EXPECT_EQ(kExpectedCmdSize, cmd.header.size * 4u);
4359 EXPECT_EQ(static_cast<GLenum>(1), cmd.target); 4359 EXPECT_EQ(static_cast<GLenum>(1), cmd.target);
4360 EXPECT_EQ(static_cast<GLsizei>(2), cmd.count); 4360 EXPECT_EQ(static_cast<GLsizei>(2), cmd.count);
4361 CheckBytesWrittenMatchesExpectedSize( 4361 CheckBytesWrittenMatchesExpectedSize(
4362 next_cmd, sizeof(cmd) + 4362 next_cmd, sizeof(cmd) +
4363 RoundSizeToMultipleOfEntries(sizeof(data))); 4363 RoundSizeToMultipleOfEntries(sizeof(data)));
4364 // TODO(gman): Check that data was inserted; 4364 // TODO(gman): Check that data was inserted;
4365 } 4365 }
4366 4366
4367 TEST_F(GLES2FormatTest, LoseContextCHROMIUM) {
4368 LoseContextCHROMIUM& cmd = *GetBufferAs<LoseContextCHROMIUM>();
4369 void* next_cmd = cmd.Set(
4370 &cmd,
4371 static_cast<GLenum>(11),
4372 static_cast<GLenum>(12));
4373 EXPECT_EQ(static_cast<uint32>(LoseContextCHROMIUM::kCmdId),
4374 cmd.header.command);
4375 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u);
4376 EXPECT_EQ(static_cast<GLenum>(11), cmd.current);
4377 EXPECT_EQ(static_cast<GLenum>(12), cmd.other);
4378 CheckBytesWrittenMatchesExpectedSize(
4379 next_cmd, sizeof(cmd));
4380 }
4381
4367 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_TEST_AUTOGEN_H_ 4382 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_TEST_AUTOGEN_H_
4368 4383
OLDNEW
« no previous file with comments | « gpu/command_buffer/common/gles2_cmd_format_autogen.h ('k') | gpu/command_buffer/common/gles2_cmd_ids_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698