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

Side by Side Diff: gpu/command_buffer/client/gles2_implementation_unittest_autogen.h

Issue 14456004: GPU client side changes for GpuMemoryBuffers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@glapi
Patch Set: Implement DeleteImageBuffersHelper and remove unused GetNativeBufferForGpuMemoryBuffer Created 7 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 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 // 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 // DO NOT EDIT! 7 // DO NOT EDIT!
8 8
9 // This file is included by gles2_implementation.h to declare the 9 // This file is included by gles2_implementation.h to declare the
10 // GL api functions. 10 // GL api functions.
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 GLuint data[2]; 263 GLuint data[2];
264 }; 264 };
265 Cmds expected; 265 Cmds expected;
266 expected.del.Init(arraysize(ids), &ids[0]); 266 expected.del.Init(arraysize(ids), &ids[0]);
267 expected.data[0] = kFramebuffersStartId; 267 expected.data[0] = kFramebuffersStartId;
268 expected.data[1] = kFramebuffersStartId + 1; 268 expected.data[1] = kFramebuffersStartId + 1;
269 gl_->DeleteFramebuffers(arraysize(ids), &ids[0]); 269 gl_->DeleteFramebuffers(arraysize(ids), &ids[0]);
270 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); 270 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
271 } 271 }
272 272
273 TEST_F(GLES2ImplementationTest, DeleteImageBuffers) {
274 GLuint ids[2] = { kImageBuffersStartId, kImageBuffersStartId + 1 };
275 struct Cmds {
276 cmds::DeleteImageBuffersImmediate del;
277 GLuint data[2];
278 };
279 Cmds expected;
280 expected.del.Init(arraysize(ids), &ids[0]);
281 expected.data[0] = kImageBuffersStartId;
282 expected.data[1] = kImageBuffersStartId + 1;
283 gl_->DeleteImageBuffers(arraysize(ids), &ids[0]);
284 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
285 }
286
273 TEST_F(GLES2ImplementationTest, DeleteProgram) { 287 TEST_F(GLES2ImplementationTest, DeleteProgram) {
274 struct Cmds { 288 struct Cmds {
275 cmds::DeleteProgram cmd; 289 cmds::DeleteProgram cmd;
276 }; 290 };
277 Cmds expected; 291 Cmds expected;
278 expected.cmd.Init(1); 292 expected.cmd.Init(1);
279 293
280 gl_->DeleteProgram(1); 294 gl_->DeleteProgram(1);
281 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); 295 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
282 } 296 }
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 Cmds expected; 493 Cmds expected;
480 expected.gen.Init(arraysize(ids), &ids[0]); 494 expected.gen.Init(arraysize(ids), &ids[0]);
481 expected.data[0] = kFramebuffersStartId; 495 expected.data[0] = kFramebuffersStartId;
482 expected.data[1] = kFramebuffersStartId + 1; 496 expected.data[1] = kFramebuffersStartId + 1;
483 gl_->GenFramebuffers(arraysize(ids), &ids[0]); 497 gl_->GenFramebuffers(arraysize(ids), &ids[0]);
484 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); 498 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
485 EXPECT_EQ(kFramebuffersStartId, ids[0]); 499 EXPECT_EQ(kFramebuffersStartId, ids[0]);
486 EXPECT_EQ(kFramebuffersStartId + 1, ids[1]); 500 EXPECT_EQ(kFramebuffersStartId + 1, ids[1]);
487 } 501 }
488 502
503 TEST_F(GLES2ImplementationTest, GenImageBuffers) {
504 GLuint ids[2] = { 0, };
505 struct Cmds {
506 cmds::GenImageBuffersImmediate gen;
507 GLuint data[2];
508 };
509 Cmds expected;
510 expected.gen.Init(arraysize(ids), &ids[0]);
511 expected.data[0] = kImageBuffersStartId;
512 expected.data[1] = kImageBuffersStartId + 1;
513 gl_->GenImageBuffers(arraysize(ids), &ids[0]);
514 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
515 EXPECT_EQ(kImageBuffersStartId, ids[0]);
516 EXPECT_EQ(kImageBuffersStartId + 1, ids[1]);
517 }
518
489 TEST_F(GLES2ImplementationTest, GenRenderbuffers) { 519 TEST_F(GLES2ImplementationTest, GenRenderbuffers) {
490 GLuint ids[2] = { 0, }; 520 GLuint ids[2] = { 0, };
491 struct Cmds { 521 struct Cmds {
492 cmds::GenRenderbuffersImmediate gen; 522 cmds::GenRenderbuffersImmediate gen;
493 GLuint data[2]; 523 GLuint data[2];
494 }; 524 };
495 Cmds expected; 525 Cmds expected;
496 expected.gen.Init(arraysize(ids), &ids[0]); 526 expected.gen.Init(arraysize(ids), &ids[0]);
497 expected.data[0] = kRenderbuffersStartId; 527 expected.data[0] = kRenderbuffersStartId;
498 expected.data[1] = kRenderbuffersStartId + 1; 528 expected.data[1] = kRenderbuffersStartId + 1;
(...skipping 1311 matching lines...) Expand 10 before | Expand all | Expand 10 after
1810 for (int jj = 0; jj < 1; ++jj) { 1840 for (int jj = 0; jj < 1; ++jj) {
1811 expected.data[ii][jj] = static_cast<GLenum>(ii * 1 + jj); 1841 expected.data[ii][jj] = static_cast<GLenum>(ii * 1 + jj);
1812 } 1842 }
1813 } 1843 }
1814 expected.cmd.Init(1, &expected.data[0][0]); 1844 expected.cmd.Init(1, &expected.data[0][0]);
1815 gl_->DrawBuffersEXT(1, &expected.data[0][0]); 1845 gl_->DrawBuffersEXT(1, &expected.data[0][0]);
1816 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); 1846 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
1817 } 1847 }
1818 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_UNITTEST_AUTOGEN_H_ 1848 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_UNITTEST_AUTOGEN_H_
1819 1849
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698