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

Side by Side Diff: gpu/command_buffer/client/cmd_buffer_helper_test.cc

Issue 488011: Another round of gcc fixes for GPU command buffers. (Closed)
Patch Set: Merge fixes Created 11 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
OLDNEW
1 /* 1 /*
2 * Copyright 2009, Google Inc. 2 * Copyright 2009, Google Inc.
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 }; 145 };
146 146
147 // Checks that commands in the buffer are properly executed, and that the 147 // Checks that commands in the buffer are properly executed, and that the
148 // status/error stay valid. 148 // status/error stay valid.
149 TEST_F(CommandBufferHelperTest, TestCommandProcessing) { 149 TEST_F(CommandBufferHelperTest, TestCommandProcessing) {
150 // Check initial state of the engine - it should have been configured by the 150 // Check initial state of the engine - it should have been configured by the
151 // helper. 151 // helper.
152 EXPECT_TRUE(parser_ != NULL); 152 EXPECT_TRUE(parser_ != NULL);
153 EXPECT_FALSE(command_buffer_->GetErrorStatus()); 153 EXPECT_FALSE(command_buffer_->GetErrorStatus());
154 EXPECT_EQ(parse_error::kParseNoError, command_buffer_->ResetParseError()); 154 EXPECT_EQ(parse_error::kParseNoError, command_buffer_->ResetParseError());
155 EXPECT_EQ(0u, command_buffer_->GetGetOffset()); 155 EXPECT_EQ(0, command_buffer_->GetGetOffset());
156 156
157 // Add 3 commands through the helper 157 // Add 3 commands through the helper
158 AddCommandWithExpect(parse_error::kParseNoError, 1, 0, NULL); 158 AddCommandWithExpect(parse_error::kParseNoError, 1, 0, NULL);
159 159
160 CommandBufferEntry args1[2]; 160 CommandBufferEntry args1[2];
161 args1[0].value_uint32 = 3; 161 args1[0].value_uint32 = 3;
162 args1[1].value_float = 4.f; 162 args1[1].value_float = 4.f;
163 AddCommandWithExpect(parse_error::kParseNoError, 2, 2, args1); 163 AddCommandWithExpect(parse_error::kParseNoError, 2, 2, args1);
164 164
165 CommandBufferEntry args2[2]; 165 CommandBufferEntry args2[2];
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 288
289 // Check that the commands did happen. 289 // Check that the commands did happen.
290 Mock::VerifyAndClearExpectations(api_mock_.get()); 290 Mock::VerifyAndClearExpectations(api_mock_.get());
291 291
292 // Check the error status. 292 // Check the error status.
293 EXPECT_FALSE(command_buffer_->GetErrorStatus()); 293 EXPECT_FALSE(command_buffer_->GetErrorStatus());
294 EXPECT_EQ(parse_error::kParseNoError, command_buffer_->ResetParseError()); 294 EXPECT_EQ(parse_error::kParseNoError, command_buffer_->ResetParseError());
295 } 295 }
296 296
297 } // namespace gpu 297 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/build_gles2_cmd_buffer.py ('k') | gpu/command_buffer/common/gles2_cmd_format_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698