Chromium Code Reviews| Index: cc/resources/resource_provider_unittest.cc |
| diff --git a/cc/resources/resource_provider_unittest.cc b/cc/resources/resource_provider_unittest.cc |
| index 6286e580c5ad63c907f623ec9db3772a11017072..ec9287b862dc5acf53c5206b402148c3db82fa84 100644 |
| --- a/cc/resources/resource_provider_unittest.cc |
| +++ b/cc/resources/resource_provider_unittest.cc |
| @@ -105,7 +105,7 @@ class ContextSharedData { |
| uint32 InsertSyncPoint() { return next_sync_point_++; } |
| void GenMailbox(GLbyte* mailbox) { |
| - memset(mailbox, 0, sizeof(GLbyte[64])); |
| + memset(mailbox, 0, GL_MAILBOX_SIZE_CHROMIUM); |
|
danakj
2014/02/13 17:59:25
this one uses GL_MAILBOX_SIZE_CHROMIUM but the las
piman
2014/02/13 18:57:12
I prefer using sizeof if we have a variable to tak
|
| memcpy(mailbox, &next_mailbox_, sizeof(next_mailbox_)); |
| ++next_mailbox_; |
| } |
| @@ -322,7 +322,7 @@ class ResourceProviderContext : public TestWebGraphicsContext3D { |
| } |
| struct PendingProduceTexture { |
| - GLbyte mailbox[64]; |
| + GLbyte mailbox[GL_MAILBOX_SIZE_CHROMIUM]; |
| scoped_refptr<TestTexture> texture; |
| }; |
| typedef ScopedPtrDeque<PendingProduceTexture> PendingProduceTextureList; |
| @@ -346,7 +346,7 @@ class TestSharedBitmapManager : public SharedBitmapManager { |
| OVERRIDE { |
| scoped_ptr<base::SharedMemory> memory(new base::SharedMemory); |
| memory->CreateAndMapAnonymous(size.GetArea() * 4); |
| - int8 name[64] = { 0 }; |
| + int8 name[GL_MAILBOX_SIZE_CHROMIUM] = {0}; |
| name[0] = count_++; |
| SharedBitmapId id; |
| id.SetName(name); |
| @@ -366,7 +366,7 @@ class TestSharedBitmapManager : public SharedBitmapManager { |
| virtual scoped_ptr<SharedBitmap> GetBitmapForSharedMemory( |
| base::SharedMemory* memory) OVERRIDE { |
| - int8 name[64] = { 0 }; |
| + int8 name[GL_MAILBOX_SIZE_CHROMIUM] = {0}; |
| name[0] = count_++; |
| SharedBitmapId id; |
| id.SetName(name); |