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

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

Issue 116863003: gpu: Reuse transfer buffers more aggresively (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: [WIP] Review comments follow-up Created 6 years, 11 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.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc
index 910cb0104b214ec80de4dd7872f5a70f1904a145..1bf1588a2aacfb813eb5530bdbb6f512668077b1 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc
@@ -7149,15 +7149,18 @@ TEST_F(GLES2DecoderManualInitTest, BeginEndQueryEXT) {
// Test end fails if no begin.
EndQueryEXT end_cmd;
- end_cmd.Init(GL_ANY_SAMPLES_PASSED_EXT, 1);
+ end_cmd.Init(GL_ANY_SAMPLES_PASSED_EXT, false, 1);
EXPECT_EQ(error::kNoError, ExecuteCmd(end_cmd));
EXPECT_EQ(GL_INVALID_OPERATION, GetGLError());
BeginQueryEXT begin_cmd;
// Test id = 0 fails.
- begin_cmd.Init(
- GL_ANY_SAMPLES_PASSED_EXT, 0, kSharedMemoryId, kSharedMemoryOffset);
+ begin_cmd.Init(GL_ANY_SAMPLES_PASSED_EXT,
+ 0,
+ false,
+ kSharedMemoryId,
+ kSharedMemoryOffset);
EXPECT_EQ(error::kNoError, ExecuteCmd(begin_cmd));
EXPECT_EQ(GL_INVALID_OPERATION, GetGLError());
@@ -7172,6 +7175,7 @@ TEST_F(GLES2DecoderManualInitTest, BeginEndQueryEXT) {
.RetiresOnSaturation();
begin_cmd.Init(
GL_ANY_SAMPLES_PASSED_EXT, kNewClientId,
+ false,
kSharedMemoryId, kSharedMemoryOffset);
EXPECT_EQ(error::kNoError, ExecuteCmd(begin_cmd));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
@@ -7187,7 +7191,7 @@ TEST_F(GLES2DecoderManualInitTest, BeginEndQueryEXT) {
EXPECT_EQ(GL_INVALID_OPERATION, GetGLError());
// Test end fails with different target
- end_cmd.Init(GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT, 1);
+ end_cmd.Init(GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT, false, 1);
EXPECT_EQ(error::kNoError, ExecuteCmd(end_cmd));
EXPECT_EQ(GL_INVALID_OPERATION, GetGLError());
@@ -7195,7 +7199,7 @@ TEST_F(GLES2DecoderManualInitTest, BeginEndQueryEXT) {
EXPECT_CALL(*gl_, EndQueryARB(GL_ANY_SAMPLES_PASSED_EXT))
.Times(1)
.RetiresOnSaturation();
- end_cmd.Init(GL_ANY_SAMPLES_PASSED_EXT, 1);
+ end_cmd.Init(GL_ANY_SAMPLES_PASSED_EXT, false, 1);
EXPECT_EQ(error::kNoError, ExecuteCmd(end_cmd));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
EXPECT_TRUE(query->pending());
@@ -7225,7 +7229,8 @@ static void CheckBeginEndQueryBadMemoryFails(
.RetiresOnSaturation();
// Test bad shared memory fails
- begin_cmd.Init(GL_ANY_SAMPLES_PASSED_EXT, client_id, shm_id, shm_offset);
+ begin_cmd.Init(GL_ANY_SAMPLES_PASSED_EXT, client_id,
+ false, shm_id, shm_offset);
error::Error error1 = test->ExecuteCmd(begin_cmd);
EXPECT_CALL(*gl, EndQueryARB(GL_ANY_SAMPLES_PASSED_EXT))
@@ -7233,7 +7238,7 @@ static void CheckBeginEndQueryBadMemoryFails(
.RetiresOnSaturation();
EndQueryEXT end_cmd;
- end_cmd.Init(GL_ANY_SAMPLES_PASSED_EXT, 1);
+ end_cmd.Init(GL_ANY_SAMPLES_PASSED_EXT, false, 1);
error::Error error2 = test->ExecuteCmd(end_cmd);
EXPECT_CALL(*gl,
@@ -7298,6 +7303,7 @@ TEST_F(GLES2DecoderTest, BeginEndQueryEXTCommandsIssuedCHROMIUM) {
// Test valid parameters work.
begin_cmd.Init(
GL_COMMANDS_ISSUED_CHROMIUM, kNewClientId,
+ false,
kSharedMemoryId, kSharedMemoryOffset);
EXPECT_EQ(error::kNoError, ExecuteCmd(begin_cmd));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
@@ -7310,7 +7316,7 @@ TEST_F(GLES2DecoderTest, BeginEndQueryEXTCommandsIssuedCHROMIUM) {
// Test end succeeds
EndQueryEXT end_cmd;
- end_cmd.Init(GL_COMMANDS_ISSUED_CHROMIUM, 1);
+ end_cmd.Init(GL_COMMANDS_ISSUED_CHROMIUM, false, 1);
EXPECT_EQ(error::kNoError, ExecuteCmd(end_cmd));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
EXPECT_FALSE(query->pending());
@@ -7324,6 +7330,7 @@ TEST_F(GLES2DecoderTest, BeginEndQueryEXTGetErrorQueryCHROMIUM) {
// Test valid parameters work.
begin_cmd.Init(
GL_GET_ERROR_QUERY_CHROMIUM, kNewClientId,
+ false,
kSharedMemoryId, kSharedMemoryOffset);
EXPECT_EQ(error::kNoError, ExecuteCmd(begin_cmd));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
@@ -7342,7 +7349,7 @@ TEST_F(GLES2DecoderTest, BeginEndQueryEXTGetErrorQueryCHROMIUM) {
.RetiresOnSaturation();
EndQueryEXT end_cmd;
- end_cmd.Init(GL_GET_ERROR_QUERY_CHROMIUM, 1);
+ end_cmd.Init(GL_GET_ERROR_QUERY_CHROMIUM, false, 1);
EXPECT_EQ(error::kNoError, ExecuteCmd(end_cmd));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
EXPECT_FALSE(query->pending());

Powered by Google App Engine
This is Rietveld 408576698