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

Unified Diff: gpu/command_buffer/service/gles2_cmd_decoder_unittest_programs.cc

Issue 289993002: Remove shm versions of immediate commands from command buffer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@functions-with-extension-flag
Patch Set: try to avoid compiler warning on buffer overflow and template specialization linker problem with tw… Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: gpu/command_buffer/service/gles2_cmd_decoder_unittest_programs.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_programs.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_programs.cc
index 5c0cecf40c79dba7e2c18b3505aac0035a0b506b..ec7fd48d011b9465ea77856a9d051bcf766a3d51 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_programs.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_programs.cc
@@ -795,32 +795,6 @@ TEST_P(GLES2DecoderWithShaderTest, Uniform1iValidArgs) {
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
}
-TEST_P(GLES2DecoderWithShaderTest, Uniform1ivValidArgs) {
- EXPECT_CALL(
- *gl_,
- Uniform1iv(kUniform1RealLocation,
- 1,
- reinterpret_cast<const GLint*>(shared_memory_address_)));
- Uniform1iv cmd;
- cmd.Init(kUniform1FakeLocation, 1, shared_memory_id_, shared_memory_offset_);
- EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
-}
-
-TEST_P(GLES2DecoderWithShaderTest, Uniform1ivInvalidArgs2_0) {
- EXPECT_CALL(*gl_, Uniform1iv(_, _, _)).Times(0);
- Uniform1iv cmd;
- cmd.Init(kUniform1FakeLocation, 1, kInvalidSharedMemoryId, 0);
- EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd));
-}
-
-TEST_P(GLES2DecoderWithShaderTest, Uniform1ivInvalidArgs2_1) {
- EXPECT_CALL(*gl_, Uniform1iv(_, _, _)).Times(0);
- Uniform1iv cmd;
- cmd.Init(
- kUniform1FakeLocation, 1, shared_memory_id_, kInvalidSharedMemoryOffset);
- EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd));
-}
-
TEST_P(GLES2DecoderWithShaderTest, Uniform1ivImmediateValidArgs) {
Uniform1ivImmediate& cmd = *GetImmediateAs<Uniform1ivImmediate>();
EXPECT_CALL(*gl_,
@@ -834,19 +808,23 @@ TEST_P(GLES2DecoderWithShaderTest, Uniform1ivImmediateValidArgs) {
EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(temp)));
}
-TEST_P(GLES2DecoderWithShaderTest, Uniform1ivInvalidValidArgs) {
+TEST_P(GLES2DecoderWithShaderTest, Uniform1ivImmediateInvalidValidArgs) {
EXPECT_CALL(*gl_, Uniform1iv(_, _, _)).Times(0);
- Uniform1iv cmd;
- cmd.Init(kUniform1FakeLocation, 2, shared_memory_id_, shared_memory_offset_);
- EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
+ Uniform1ivImmediate& cmd = *GetImmediateAs<Uniform1ivImmediate>();
+ GLint temp[1 * 2] = {
+ 0,
+ };
+ cmd.Init(kUniform1FakeLocation, 2, &temp[0]);
+ EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(temp)));
EXPECT_EQ(GL_INVALID_OPERATION, GetGLError());
}
TEST_P(GLES2DecoderWithShaderTest, Uniform1ivZeroCount) {
EXPECT_CALL(*gl_, Uniform1iv(_, _, _)).Times(0);
- Uniform1iv cmd;
- cmd.Init(kUniform1FakeLocation, 0, shared_memory_id_, shared_memory_offset_);
- EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
+ Uniform1ivImmediate& cmd = *GetImmediateAs<Uniform1ivImmediate>();
+ GLint temp = 0;
+ cmd.Init(kUniform1FakeLocation, 0, &temp);
+ EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(temp)));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
}

Powered by Google App Engine
This is Rietveld 408576698