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

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

Issue 761903003: Update from https://crrev.com/306655 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 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 // 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 #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/service/gles2_cmd_decoder_unittest_base.h" 9 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h"
10 #include "gpu/command_buffer/service/cmd_buffer_engine.h" 10 #include "gpu/command_buffer/service/cmd_buffer_engine.h"
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(data))); 245 EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(data)));
246 EXPECT_EQ(valid_uniform ? GL_NO_ERROR : GL_INVALID_OPERATION, 246 EXPECT_EQ(valid_uniform ? GL_NO_ERROR : GL_INVALID_OPERATION,
247 GetGLError()); 247 GetGLError());
248 } 248 }
249 } 249 }
250 }; 250 };
251 251
252 INSTANTIATE_TEST_CASE_P(Service, GLES2DecoderTest2, ::testing::Bool()); 252 INSTANTIATE_TEST_CASE_P(Service, GLES2DecoderTest2, ::testing::Bool());
253 253
254 template <> 254 template <>
255 void GLES2DecoderTestBase::SpecializedSetup<cmds::RenderbufferStorage, 0>(
256 bool valid) {
257 DoBindRenderbuffer(GL_RENDERBUFFER, client_renderbuffer_id_,
258 kServiceRenderbufferId);
259 if (valid) {
260 EnsureRenderbufferBound(false);
261 EXPECT_CALL(*gl_, GetError())
262 .WillOnce(Return(GL_NO_ERROR))
263 .RetiresOnSaturation();
264 EXPECT_CALL(*gl_,
265 RenderbufferStorageEXT(GL_RENDERBUFFER, _, 3, 4))
266 .Times(1)
267 .RetiresOnSaturation();
268 EXPECT_CALL(*gl_, GetError())
269 .WillOnce(Return(GL_NO_ERROR))
270 .RetiresOnSaturation();
271 }
272 }
273
274 template <>
255 void GLES2DecoderTestBase::SpecializedSetup<cmds::GenQueriesEXTImmediate, 0>( 275 void GLES2DecoderTestBase::SpecializedSetup<cmds::GenQueriesEXTImmediate, 0>(
256 bool valid) { 276 bool valid) {
257 if (!valid) { 277 if (!valid) {
258 // Make the client_query_id_ so that trying to make it again 278 // Make the client_query_id_ so that trying to make it again
259 // will fail. 279 // will fail.
260 cmds::GenQueriesEXTImmediate& cmd = 280 cmds::GenQueriesEXTImmediate& cmd =
261 *GetImmediateAs<cmds::GenQueriesEXTImmediate>(); 281 *GetImmediateAs<cmds::GenQueriesEXTImmediate>();
262 cmd.Init(1, &client_query_id_); 282 cmd.Init(1, &client_query_id_);
263 EXPECT_EQ(error::kNoError, 283 EXPECT_EQ(error::kNoError,
264 ExecuteImmediateCmd(cmd, sizeof(client_query_id_))); 284 ExecuteImmediateCmd(cmd, sizeof(client_query_id_)));
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 TestAcceptedUniform(GL_FLOAT_MAT3, Program::kUniformMatrix3f); 576 TestAcceptedUniform(GL_FLOAT_MAT3, Program::kUniformMatrix3f);
557 } 577 }
558 578
559 TEST_P(GLES2DecoderTest2, AcceptsUniform_GL_FLOAT_MAT4) { 579 TEST_P(GLES2DecoderTest2, AcceptsUniform_GL_FLOAT_MAT4) {
560 TestAcceptedUniform(GL_FLOAT_MAT4, Program::kUniformMatrix4f); 580 TestAcceptedUniform(GL_FLOAT_MAT4, Program::kUniformMatrix4f);
561 } 581 }
562 582
563 } // namespace gles2 583 } // namespace gles2
564 } // namespace gpu 584 } // namespace gpu
565 585
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698