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

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

Issue 2067503003: Add a new command buffer function glScheduleCALayerInUseQueryCHROMIUM. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Include gl_image.h Created 4 years, 6 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 // It's formatted by clang-format using chromium coding style: 7 // It's formatted by clang-format using chromium coding style:
8 // clang-format -i -style=chromium filename 8 // clang-format -i -style=chromium filename
9 // DO NOT EDIT! 9 // DO NOT EDIT!
10 10
(...skipping 4674 matching lines...) Expand 10 before | Expand all | Expand 10 after
4685 EXPECT_EQ(static_cast<GLuint>(13), cmd.background_color); 4685 EXPECT_EQ(static_cast<GLuint>(13), cmd.background_color);
4686 EXPECT_EQ(static_cast<GLuint>(14), cmd.edge_aa_mask); 4686 EXPECT_EQ(static_cast<GLuint>(14), cmd.edge_aa_mask);
4687 EXPECT_EQ(static_cast<GLboolean>(15), cmd.is_clipped); 4687 EXPECT_EQ(static_cast<GLboolean>(15), cmd.is_clipped);
4688 EXPECT_EQ(static_cast<GLint>(16), cmd.sorting_context_id); 4688 EXPECT_EQ(static_cast<GLint>(16), cmd.sorting_context_id);
4689 EXPECT_EQ(static_cast<GLuint>(17), cmd.filter); 4689 EXPECT_EQ(static_cast<GLuint>(17), cmd.filter);
4690 EXPECT_EQ(static_cast<GLuint>(18), cmd.shm_id); 4690 EXPECT_EQ(static_cast<GLuint>(18), cmd.shm_id);
4691 EXPECT_EQ(static_cast<GLuint>(19), cmd.shm_offset); 4691 EXPECT_EQ(static_cast<GLuint>(19), cmd.shm_offset);
4692 CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); 4692 CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd));
4693 } 4693 }
4694 4694
4695 TEST_F(GLES2FormatTest, ScheduleCALayerInUseQueryCHROMIUMImmediate) {
4696 const int kSomeBaseValueToTestWith = 51;
4697 static GLuint data[] = {
4698 static_cast<GLuint>(kSomeBaseValueToTestWith + 0),
4699 };
4700 cmds::ScheduleCALayerInUseQueryCHROMIUMImmediate& cmd =
4701 *GetBufferAs<cmds::ScheduleCALayerInUseQueryCHROMIUMImmediate>();
4702 const GLsizei kNumElements = 1;
4703 const size_t kExpectedCmdSize =
4704 sizeof(cmd) + kNumElements * sizeof(GLuint) * 1;
4705 void* next_cmd = cmd.Set(&cmd, static_cast<GLsizei>(1), data);
4706 EXPECT_EQ(static_cast<uint32_t>(
4707 cmds::ScheduleCALayerInUseQueryCHROMIUMImmediate::kCmdId),
4708 cmd.header.command);
4709 EXPECT_EQ(kExpectedCmdSize, cmd.header.size * 4u);
4710 EXPECT_EQ(static_cast<GLsizei>(1), cmd.count);
4711 CheckBytesWrittenMatchesExpectedSize(
4712 next_cmd, sizeof(cmd) + RoundSizeToMultipleOfEntries(sizeof(data)));
4713 }
4714
4695 TEST_F(GLES2FormatTest, CommitOverlayPlanesCHROMIUM) { 4715 TEST_F(GLES2FormatTest, CommitOverlayPlanesCHROMIUM) {
4696 cmds::CommitOverlayPlanesCHROMIUM& cmd = 4716 cmds::CommitOverlayPlanesCHROMIUM& cmd =
4697 *GetBufferAs<cmds::CommitOverlayPlanesCHROMIUM>(); 4717 *GetBufferAs<cmds::CommitOverlayPlanesCHROMIUM>();
4698 void* next_cmd = cmd.Set(&cmd); 4718 void* next_cmd = cmd.Set(&cmd);
4699 EXPECT_EQ(static_cast<uint32_t>(cmds::CommitOverlayPlanesCHROMIUM::kCmdId), 4719 EXPECT_EQ(static_cast<uint32_t>(cmds::CommitOverlayPlanesCHROMIUM::kCmdId),
4700 cmd.header.command); 4720 cmd.header.command);
4701 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); 4721 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u);
4702 CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); 4722 CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd));
4703 } 4723 }
4704 4724
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after
5250 cmd.header.command); 5270 cmd.header.command);
5251 EXPECT_EQ(sizeof(cmd) + RoundSizeToMultipleOfEntries(sizeof(data)), 5271 EXPECT_EQ(sizeof(cmd) + RoundSizeToMultipleOfEntries(sizeof(data)),
5252 cmd.header.size * 4u); 5272 cmd.header.size * 4u);
5253 EXPECT_EQ(static_cast<GLint>(11), cmd.location); 5273 EXPECT_EQ(static_cast<GLint>(11), cmd.location);
5254 EXPECT_EQ(static_cast<GLboolean>(12), cmd.transpose); 5274 EXPECT_EQ(static_cast<GLboolean>(12), cmd.transpose);
5255 CheckBytesWrittenMatchesExpectedSize( 5275 CheckBytesWrittenMatchesExpectedSize(
5256 next_cmd, sizeof(cmd) + RoundSizeToMultipleOfEntries(sizeof(data))); 5276 next_cmd, sizeof(cmd) + RoundSizeToMultipleOfEntries(sizeof(data)));
5257 } 5277 }
5258 5278
5259 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_TEST_AUTOGEN_H_ 5279 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_TEST_AUTOGEN_H_
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