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

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

Issue 9910004: Implement Discard and EnsureBackbufferCHROMIUM using command buffer instead of IPC. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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 // 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 3738 matching lines...) Expand 10 before | Expand all | Expand 10 after
3749 static_cast<GLuint>(12)); 3749 static_cast<GLuint>(12));
3750 EXPECT_EQ(static_cast<uint32>(VertexAttribDivisorANGLE::kCmdId), 3750 EXPECT_EQ(static_cast<uint32>(VertexAttribDivisorANGLE::kCmdId),
3751 cmd.header.command); 3751 cmd.header.command);
3752 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); 3752 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u);
3753 EXPECT_EQ(static_cast<GLuint>(11), cmd.index); 3753 EXPECT_EQ(static_cast<GLuint>(11), cmd.index);
3754 EXPECT_EQ(static_cast<GLuint>(12), cmd.divisor); 3754 EXPECT_EQ(static_cast<GLuint>(12), cmd.divisor);
3755 CheckBytesWrittenMatchesExpectedSize( 3755 CheckBytesWrittenMatchesExpectedSize(
3756 next_cmd, sizeof(cmd)); 3756 next_cmd, sizeof(cmd));
3757 } 3757 }
3758 3758
3759 TEST_F(GLES2FormatTest, DiscardBackbufferCHROMIUM) {
3760 DiscardBackbufferCHROMIUM& cmd = *GetBufferAs<DiscardBackbufferCHROMIUM>();
3761 void* next_cmd = cmd.Set(
3762 &cmd);
3763 EXPECT_EQ(static_cast<uint32>(DiscardBackbufferCHROMIUM::kCmdId),
3764 cmd.header.command);
3765 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u);
3766 CheckBytesWrittenMatchesExpectedSize(
3767 next_cmd, sizeof(cmd));
3768 }
3769
3770 TEST_F(GLES2FormatTest, EnsureBackbufferCHROMIUM) {
3771 EnsureBackbufferCHROMIUM& cmd = *GetBufferAs<EnsureBackbufferCHROMIUM>();
3772 void* next_cmd = cmd.Set(
3773 &cmd);
3774 EXPECT_EQ(static_cast<uint32>(EnsureBackbufferCHROMIUM::kCmdId),
3775 cmd.header.command);
3776 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u);
3777 CheckBytesWrittenMatchesExpectedSize(
3778 next_cmd, sizeof(cmd));
3779 }
3780
3759 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_TEST_AUTOGEN_H_ 3781 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_TEST_AUTOGEN_H_
3760 3782
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