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

Unified Diff: gpu/command_buffer/client/gles2_implementation_unittest.cc

Issue 1548443002: Introducing gpu::CommandBufferId as a distinct, IdType<...>-based type. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@type-safe-save-package-id-self-contained
Patch Set: Rebasing... Created 4 years, 10 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
« no previous file with comments | « gpu/command_buffer/client/gles2_implementation.cc ('k') | gpu/command_buffer/client/gpu_control.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/client/gles2_implementation_unittest.cc
diff --git a/gpu/command_buffer/client/gles2_implementation_unittest.cc b/gpu/command_buffer/client/gles2_implementation_unittest.cc
index e408610c6ef1c5194df98583dfacd6172b517b3d..8d50686bb7518c6d50b8c340fca4cbdd7df16dfc 100644
--- a/gpu/command_buffer/client/gles2_implementation_unittest.cc
+++ b/gpu/command_buffer/client/gles2_implementation_unittest.cc
@@ -3757,7 +3757,8 @@ TEST_F(GLES2ImplementationTest, InsertFenceSyncCHROMIUM) {
TEST_F(GLES2ImplementationTest, GenSyncTokenCHROMIUM) {
const CommandBufferNamespace kNamespaceId = CommandBufferNamespace::GPU_IO;
- const GLuint64 kCommandBufferId = 234u;
+ const CommandBufferId kCommandBufferId =
+ CommandBufferId::FromUnsafeValue(234u);
const GLuint64 kFenceSync = 123u;
GLbyte sync_token_data[GL_SYNC_TOKEN_SIZE_CHROMIUM];
@@ -3802,7 +3803,8 @@ TEST_F(GLES2ImplementationTest, GenSyncTokenCHROMIUM) {
TEST_F(GLES2ImplementationTest, GenUnverifiedSyncTokenCHROMIUM) {
const CommandBufferNamespace kNamespaceId = CommandBufferNamespace::GPU_IO;
- const GLuint64 kCommandBufferId = 234u;
+ const CommandBufferId kCommandBufferId =
+ CommandBufferId::FromUnsafeValue(234u);
const GLuint64 kFenceSync = 123u;
GLbyte sync_token_data[GL_SYNC_TOKEN_SIZE_CHROMIUM];
@@ -3853,7 +3855,8 @@ TEST_F(GLES2ImplementationTest, VerifySyncTokensCHROMIUM) {
.RetiresOnSaturation();
const CommandBufferNamespace kNamespaceId = CommandBufferNamespace::GPU_IO;
- const GLuint64 kCommandBufferId = 234u;
+ const CommandBufferId kCommandBufferId =
+ CommandBufferId::FromUnsafeValue(234u);
const GLuint64 kFenceSync = 123u;
gpu::SyncToken sync_token;
GLbyte* sync_token_datas[] = { sync_token.GetData() };
@@ -3906,7 +3909,8 @@ TEST_F(GLES2ImplementationTest, VerifySyncTokensCHROMIUM_Sequence) {
.RetiresOnSaturation();
const CommandBufferNamespace kNamespaceId = CommandBufferNamespace::GPU_IO;
- const GLuint64 kCommandBufferId = 234u;
+ const CommandBufferId kCommandBufferId =
+ CommandBufferId::FromUnsafeValue(234u);
const GLuint64 kFenceSync1 = 123u;
const GLuint64 kFenceSync2 = 234u;
gpu::SyncToken sync_token1;
@@ -3958,7 +3962,8 @@ TEST_F(GLES2ImplementationTest, VerifySyncTokensCHROMIUM_Sequence) {
TEST_F(GLES2ImplementationTest, WaitSyncTokenCHROMIUM) {
const CommandBufferNamespace kNamespaceId = CommandBufferNamespace::GPU_IO;
- const GLuint64 kCommandBufferId = 234u;
+ const CommandBufferId kCommandBufferId =
+ CommandBufferId::FromUnsafeValue(234u);
const GLuint64 kFenceSync = 456u;
GLbyte sync_token[GL_SYNC_TOKEN_SIZE_CHROMIUM];
@@ -3978,7 +3983,8 @@ TEST_F(GLES2ImplementationTest, WaitSyncTokenCHROMIUM) {
cmds::WaitSyncTokenCHROMIUM wait_sync_token;
};
Cmds expected;
- expected.wait_sync_token.Init(kNamespaceId, kCommandBufferId, kFenceSync);
+ expected.wait_sync_token.Init(kNamespaceId, kCommandBufferId.GetUnsafeValue(),
+ kFenceSync);
gl_->WaitSyncTokenCHROMIUM(sync_token);
EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
@@ -4006,7 +4012,8 @@ TEST_F(GLES2ImplementationTest, WaitSyncTokenCHROMIUMErrors) {
// Unverified sync token should produce INVALID_OPERATION.
ClearCommands();
- gpu::SyncToken unverified_sync_token(CommandBufferNamespace::GPU_IO, 0, 0, 0);
+ gpu::SyncToken unverified_sync_token(CommandBufferNamespace::GPU_IO, 0,
+ gpu::CommandBufferId(), 0);
EXPECT_CALL(*gpu_control_, CanWaitUnverifiedSyncToken(_))
.WillOnce(testing::Return(false));
gl_->WaitSyncTokenCHROMIUM(unverified_sync_token.GetConstData());
« no previous file with comments | « gpu/command_buffer/client/gles2_implementation.cc ('k') | gpu/command_buffer/client/gpu_control.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698