| Index: gpu/command_buffer/common/mailbox.h
|
| diff --git a/gpu/command_buffer/common/mailbox.h b/gpu/command_buffer/common/mailbox.h
|
| index 08a970fad856c06221f1db2acd7ac04e0d0de58f..06b4b591da1cbd8a53685247161bda77fd01074c 100644
|
| --- a/gpu/command_buffer/common/mailbox.h
|
| +++ b/gpu/command_buffer/common/mailbox.h
|
| @@ -22,6 +22,15 @@ struct GPU_EXPORT Mailbox {
|
| bool IsZero() const;
|
| void SetZero();
|
| void SetName(const int8* name);
|
| +
|
| + // Generate a unique unguessable mailbox name.
|
| + static Mailbox Generate();
|
| +
|
| + // Verify that the mailbox was created through Mailbox::Generate. This only
|
| + // works in Debug (always returns true in Release). This is not a secure
|
| + // check, only to catch bugs where clients forgot to call Mailbox::Generate.
|
| + bool Verify() const;
|
| +
|
| int8 name[GL_MAILBOX_SIZE_CHROMIUM];
|
| bool operator<(const Mailbox& other) const {
|
| return memcmp(this, &other, sizeof other) < 0;
|
|
|