From e3da72334bfdb422a1874684b197578f10781c81 Mon Sep 17 00:00:00 2001 From: "piman@chromium.org" Date: Fri, 14 Feb 2014 14:12:02 +0000 Subject: Fix (or tag) uses of explicit '64' instead of GL_MAILBOX_SIZE_CHROMIUM That way we can easily change the size later. Security says 64 may be overkill. BUG=None Review URL: https://codereview.chromium.org/138763009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@251306 0039d316-1c4b-4281-b951-d872f2087c98 --- cc/resources/resource_provider_unittest.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'cc/resources') diff --git a/cc/resources/resource_provider_unittest.cc b/cc/resources/resource_provider_unittest.cc index 07247c6..7c2edf0 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); 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 texture; }; typedef ScopedPtrDeque PendingProduceTextureList; @@ -346,7 +346,7 @@ class TestSharedBitmapManager : public SharedBitmapManager { OVERRIDE { scoped_ptr 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 GetBitmapForSharedMemory( base::SharedMemory* memory) OVERRIDE { - int8 name[64] = { 0 }; + int8 name[GL_MAILBOX_SIZE_CHROMIUM] = {0}; name[0] = count_++; SharedBitmapId id; id.SetName(name); -- cgit v1.1